Velocity of robot (turtlebot)

How to vary the velocity of the robots which is running in Gazebo environment and how to visualise it ?

Thanks in advance !!

Hi @dhanaprakaashg

you have 2 choices

  1. Publish velocity commands via shell: rostopic pub /cmd_vel [TAB] + [TAB]
    You just have to change the numbers in order to publish.

  2. teleop_twist_keyboard

     rosrun teleop_twist_keyboard

copy and pasted this command on shell and start to move the robot via keyboard letters.

  1. Create a publisher for /cmd_vel topic which is the topic that makes robot move.

Let me know if I solved your doubts.


Hi, Thanks for your reply. I need to change the velocity during autonomous navigation. Say current speed is 3 m/s, i want to change to 5 m/s. Please help me where i can do it.

You need to write this in a Node you create and launch as part of your autonomous navigation logic, such that the speed is varied based on certain conditions. You can even have a formula for it.

If you have not taken the ROS Basics course, you should take it to get some ideas.