Hello,
I’m currently learn the course: ROS basics 5 days.
Right now I have a problem in the lesson: Understand ROS topics -Publisher.
As for exercise 21:
I create a ROS package as:
catkin_create_pkg beginner_tutorials geomery_msgs rospy
After create the package, I also do as:
catkin_make
source ~/catkin_ws/devel/setup.bash
Then I fellows the solution of exercise to create the .launch and .py.
Finally, when I run the command:
roslaunch exercise21 move_robot.launch
I got the error:
ERROR: cannot launch node of type [exercise_21/move_robot.py]: exercise_21
ROS path [0]=/opt/ros/kinetic/share/ros
ROS path [1]=/home/user/catkin_ws/src
ROS path [2]=/home/simulations/public_sim_ws/src
ROS path [3]=/opt/ros/kinetic/share
But when I run the command:
rosrun exercise21 move_robot.py
The robot moves as the expectation.
I didn’t know what’s the reason.
By the way, it seems when I create a ROS package as publisher, do I have to add the msg lib as dependency? This is not introduced in the course.
Would you give me some advice in future study?