I have completed ROS in five days exercise 2.1 but I can’t stop the robot from going around in circles. I was wondering what is the best way to stop the robot from continuously running the code.
You need to publish into the /cmd_vel topic a message with all the velocities set to 0. You can do this by using the rostopic pub command. It will be something like this:
rostopic pub /cmd_vel geometry_msgs/Twist "linear: x: 0.0 y: 0.0 z: 0.0 angular: x: 0.0 y: 0.0 z: 0.0"