Ask Your Question

Different values in /cmd_vel/angular/z and /odom/.../angular/z

asked 2016-02-10 21:26:06 -0500

softelli gravatar image

Hello. I am new in the use of ROS. I'm using simulation with model p3dx in ROS Indigo and Gazebo 2.x in Ubuntu 14.04 64bits. I'm struggling with the difference between: a) the cmd_vel.angular.z values (value sent to the robot) and b) the odom.twist.twist.angular.z (value obtained from odometry), after stabilize the speed, exacly as link image: link text

In the model p3dx using the differential-drive library, for which the sending angular velocity values (cmd_vel / angle / z). I wonder if this can be solved with configuration or is a platform of error.

Below the library insertion section in "pioneer3dx.gazebo":

  <!-- differential drive -->
    <plugin name="differential_drive_controller" filename="">
        <updateRate>100</updateRate><!-- original = 100 -->
edit retag flag offensive close merge delete


What kind of different data? You're dealing with real values here.

dornhege gravatar image dornhege  ( 2016-02-11 06:21:44 -0500 )edit

I did not talk about "different data", but different values (angular speed) - as shown in the picture of the reported link. In the first, the angular velocity sent by control to cmd_vel is 0.385, while odometry returns 0.550 even after stabilize for PID joints action.

softelli gravatar image softelli  ( 2016-02-11 07:18:33 -0500 )edit

This also happens in the other two commands sent to cmd_vel. These values are also displayed in "rostopic echo". I think it can be fixed by some hidden configuration or is the problem Gazebo or drive-differential library.

softelli gravatar image softelli  ( 2016-02-11 07:22:07 -0500 )edit

I'm doubling the discussion on gazebosim-12559

softelli gravatar image softelli  ( 2016-02-11 07:47:05 -0500 )edit

I found this issue and this video which maybe related.

softelli gravatar image softelli  ( 2016-02-11 09:42:20 -0500 )edit

By suggest of another user, I change Gazebo 2.x to 6.5.1. But the offset remains as links above:

softelli gravatar image softelli  ( 2016-02-11 22:55:18 -0500 )edit

1 Answer

Sort by ยป oldest newest most voted

answered 2016-03-04 22:04:51 -0500

robustify gravatar image

It looks to me like the differential drive kinematic properties specified in the Gazebo plugin parameters (wheelSeparation and wheelDiameter) could be different from the actual values of the simulated robot model.

I would look at the URDF model of the robot and make sure that the actual wheel radius and separation distance match what you're putting in to the plugin. If they are different, the plugin will compute incorrect wheel speed commands, which would result in the discrepancy you're experiencing.

edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools



Asked: 2016-02-10 21:26:06 -0500

Seen: 636 times

Last updated: Mar 04 '16