ImportError: cannot import name RobotControl from robot_control_class

can u help me how i can get robot _control class for the free course

Traceback (most recent call last):
  File "method.py", line 1, in <module>
    from robot_control_class import RobotControl
ImportError: cannot import name 'RobotControl' from 'robot_control_class' 

(/home/user/catkin_ws/src/robot_control/robot_control_class.py)

Hi @maznah13,

Welcome to our community.

Did you manage to solve the problem?

If not, remember to source your catkin_ws before running method.py with:

source ~/catkin_ws/devel/setup.bash

python3 method.py

Please let us know if you are still stuck.

Hey @ralves ,

I’m embarrassed to admit, but I’m still stuck with this same problem. I’ve copied and pasted the above script in the terminal and I’ve tried following a few youtube videos on how to set up a workspace, but I’m still unable to import RobotControl. I’m sure I’m messing up something very simple, but I can’t seem to figure it out.

Sure enough, the actual robot_control_class.py file had some mistakes in it (my fault) and it’s working correctly now!

3 Likes