ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question

Velocities in gazebo

asked 2011-10-24 13:32:48 -0500

adesh gravatar image

updated 2012-03-21 11:07:22 -0500

kwc gravatar image

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 flag offensive close merge delete


Where are you issuing these velocity commands? Are you using cmd_vel?
DimitriProsser gravatar image DimitriProsser  ( 2011-10-24 23:45:28 -0500 )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 ?
adesh gravatar image adesh  ( 2011-10-25 04:32:22 -0500 )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).

hsu gravatar image hsu  ( 2012-03-22 15:32:47 -0500 )edit

1 Answer

Sort by ยป oldest newest most voted

answered 2012-03-21 10:23:16 -0500

tfoote gravatar image

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.

edit flag offensive delete link more

Question Tools


Asked: 2011-10-24 13:32:48 -0500

Seen: 2,426 times

Last updated: Mar 21 '12