ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | Q&A answers.ros.org

# Velocities in gazebo

Hi I am working on Turtlebot in Gazebo environment and have questions about the way velocities and the units worki in gazebo. I know that to take a turn we need to give both linear and angular velocities. If I want to turn the turtlebot through 90 degrees (Pi/2 radians) say in 4 sec, can I give (Pi/8)rad/sec as my angular velocity? I tried controlling angle this way but its not turning the robot in the proportion that I want. Also how does the linear velocity play role here.If any body can explain by some example, (like to turn through w degrees in x secs, linear vel should be y m/sec and angular velocity should be z rad/sec ) it will be a great help. - Thanks Anup

edit retag close merge delete

Where are you issuing these velocity commands? Are you using cmd_vel?
( 2011-10-24 23:45:28 -0600 )edit
Yes, I am issuing it using cmd_vel topic for this. What I want to do is if my algorithm calculations give a value of 45 degrees and a linear velocity of 1.5 m/sec. I want to turn through 45 degrees and update my speed to 1.5 m/sec. Any idea what combination of angular.z and linear.x should I use ?
( 2011-10-25 04:32:22 -0600 )edit

how much off are you from desired velocities? and if you set "iters" in the physics section of your world file to 100, does it improve? (you can use dynamic_reconfigure to do this).

( 2012-03-22 15:32:47 -0600 )edit

Sort by ยป oldest newest most voted

When you set angular velocity it is only instantaneous. The units follow REP 103

If you want the TurtleBot to turn to a specific angle you need to use some form of controller to watch the position and send commands to the base to adjust the angular velocity over time to achieve the desired position. If you parameterize this controller you can set the desired turn rate. However you will still be subject to dynamic constraints on acceleration etc.

more