No module named robot_control.rotate_robot

when i run python rotate_robot_test.py in ibraray unit test module it throws error:

Traceback (most recent call last):
File “rotate_robot_test.py”, line 3, in
from robot_control.rotate_robot import RobotControl
ImportError: No module named robot_control.rotate_robot

i followed the same procedure as mentioned in notebook

1 Like

Hello @vishrutsingh1,

Did you follow all the steps indicated in Exercise 1.1 from the Basic Concepts Unit? If you did, then make sure that you compile and source your workspace with the following commands:

cd ~/catkin_ws/
catkin_make
source devel/setup.bash

If you follow all these steps, it should work properly (I just tested it here). Let me know if you can fix the issue.

Best,

Now its working thank you . I just forgot to do source devel/setup.bash

1 Like

Hello Alberto

I had the same problem yesterday. I also solved the problem this way. But it was not clear at the reading of the lesson that it had to be compiled at that time.

If i well remember, at this point we never spoke of how, why and when we create theses modules:
- In the Python for Robotics, we used an existing module
- In ROS in 5 days Using python class in ROS , we only create and use class not a module

It would be good to have a litle bit more explanation ( in one of theses reusable modules )

1 Like

Hello @fgenestcvdl,

Can you please specify in which Unit/Course you had this problem? So that I can update the notebook to add a clarification about this issue.

Best,

Hi I had the problem in the Unit testing module unit 1.

Basicaly a few things are missing.

From an execution point of view, you could simply add before the text
Great! So let’s now execute our script and see how it works. But for that, let’s first make sure that it has execution permissions.

But i thing that some more explanation are required about the " unusual" things that we have done the previous lines
adding this extra directory under src so we have
robot_control/src/robot control
adding the init.py and the setup.py
then the required compilation

This is something not the way we worked in the others modules. Why …
And it is not explained in the rest of this module either.

Just to correct a typo

From an execution point of view, you could simply add that we have to compile before the text