I am reading the turtlesim tutorial "Moving in a straightline".
http://wiki.ros.org/turtlesim/Tutorials/Moving%20in%20a%20Straight%20Line
I do not understand how the software moves the simulated turtle. The only relevant program segment in the tutorial seems to be in lines 8 and 37-38 (see below). But those lines are about publishing a message, vel_msg
, to a channel turtle1/cmd_vel
. So, I would like to know which instructions actually make the turtle move (since publishing a message does not do the job). Any clarification?
8 velocity_publisher = rospy.Publisher('/turtle1/cmd_vel', Twist, queue_size=10)
...
37 #Publish the velocity
38 velocity_publisher.publish(vel_msg)
Originally posted by Zhoulai Fu on ROS Answers with karma: 186 on 2018-11-26
Post score: 0