ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange |
1 | initial version |
However, when I exit the node from the terminal (by pressing Ctrl + C), the bot keeps rotating in the Gazebo environment. Why is this happening?
I even checked the following in the terminal - rostopic echo /cmd_vel. It didn't return anything. How is then the bot rotating?
That happens because the Gazebo controller plugin (gazebo_ros_diff_drive
) only updates the velocities when a new message is published on the cmd_vel
topic. Unless you tell it to do something different, e.g., a zero velocities message on node shutdown, the robot will just continue to follow the last command.
I am publishing to /cmd_vel but the bot isn't rotating in the Gazebo world.
That one is unexpected and requires troubleshooting. Are there any errors/warnings? What does rosrun rqt_graph rqt_graph
show when that happens?