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

asked 2016-02-11 07:37:37 -0500

softelli gravatar image

Hello. I am new in the use of ROS-Gazebo simulation. 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: cmd_vel_vs_odometry

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":

<plugin name="differential_drive_controller" filename="libgazebo_ros_diff_drive.so">
    <alwaysOn>true</alwaysOn>
    <updateRate>100</updateRate><!-- original = 100 -->
    <leftJoint>base_right_wheel_joint</leftJoint>
    <rightJoint>base_left_wheel_joint</rightJoint>
    <wheelSeparation>0.39</wheelSeparation>
    <wheelDiameter>0.15</wheelDiameter>
    <torque>5</torque>
    <commandTopic>cmd_vel</commandTopic>
    <odometryTopic>odom</odometryTopic>
    <odometryFrame>odom</odometryFrame>
    <robotBaseFrame>base_link</robotBaseFrame>
</plugin>
edit retag flag offensive close merge delete

Comments

I'm doubling this question on link:[answer-ros-org-226287](http://answers.ros.org/question/226287/different-values-in-cmd_velangularz-and-odomangularz/)

softelli gravatar imagesoftelli ( 2016-02-11 07:44:10 -0500 )edit
softelli gravatar imagesoftelli ( 2016-02-11 09:36:25 -0500 )edit

Can you try gazebo6?

nkoenig gravatar imagenkoenig ( 2016-02-11 19:10:53 -0500 )edit

Thanks for reply, nkoenig! I change Gazebo 2.x to 6.5.1. But the offset remains. Please, see the links above: https://drive.google.com/open?id=0B_slYV4s5-q9clo3X1NHVl9Ud0E (blue = linear speed to cmd_vel, red = odom..x, cyan = base_pose...x) https://drive.google.com/open?id=0B_slYV4s5-q9WXNQTk9IUUlnUG8 (blue = angular speed to cmd_vel, red = odom..z, cyan = base_pose...z) Thanks in advance!

softelli gravatar imagesoftelli ( 2016-02-11 22:44:16 -0500 )edit