I just got started on the Python section from the ROS Prerequisites Exam. Everytime i try to execute something that uses the robot_control_class.py i get this error, that it connot find rospy
user:~$ /usr/bin/python3 /home/user/catkin_ws/src/python_exam/robot_control_class.py
Traceback (most recent call last):
File "/home/user/catkin_ws/src/python_exam/robot_control_class.py", line 3, in <module>
import rospy
ModuleNotFoundError: No module named 'rospy'
or from another file with import:
user:~$ /usr/bin/python3 /home/user/catkin_ws/src/python_exam/task1.py
Traceback (most recent call last):
File "/home/user/catkin_ws/src/python_exam/task1.py", line 1, in <module>
from robot_control_class import RobotControl
File "/home/user/catkin_ws/src/python_exam/robot_control_class.py", line 3, in <module>
import rospy
ModuleNotFoundError: No module named 'rospy'