Unit 2: Library Unit Tests

Hello,
in Unit 2: Library Unit Tests there is Exercise 2.1

First of all, inside the robot_control , let’s create a new folder named test . Inside this folder, we are going to place a script like the following one:

but there is two folders robot_control from previous exercise
I have an error

user:~/catkin_ws/src/robot_control/test$ python rotate_robot_test.py
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
user:~/catkin_ws/src/robot_control/test$

Thanks for the help

Hello @artemmelnyk,

In this exercise, the robot control folder refers to the 1st one. You will see this more clear in the commands and images shown in the Exercise. I will update the notebook tough to make this more clear also.

About the error, it looks like you haven’t compiled/sourced your workspace. If you completed correctly the previous Unit, it should work by doing the following:

cd /home/user/catkin_ws
catkin_make
source devel/setup.bash

Best,