0
$\begingroup$

Rosanswers logo

Hi,

I am trying to simulate a small 4WD differential drive robot in Gazebo. I am using the erratic_gazebo_plugin diffdrive_plugin controller which I modified to work with a 4WD system.

My simulation works fine when I use the erratic's wheel diameter of .15 m. But when I change the diameter to .1 m for my wheels the odometry published claims the robot is moving at .7 m/s despite me commanding 1 m/s in the Twist msg.

I am using a moment of inertia of ixx = 0.01 ;ixy = 0 ; ixz = 0 ; iyy= .01 ; iyz = 0 ; izz = .01.

My wheel mass is .1 kg

I think my issue has to do with the mu1, mu2, kp, and kd parameters currently I have them set at mu1 = 200 ; mu2 = 100 ; kp = 1000000 ; and kd = 1.

I guess my issue is I am unclear how these parameters are used in the simulator as well as what is the effect decreasing the wheel diameter. I can trick the simulator by decreasing my wheel diameter in the controller's parameters but I would like to understand why this phenomenon occurs.

Any help would be much appreciated.

Thanks, Matt


Originally posted by malvarado on ROS Answers with karma: 80 on 2012-11-06

Post score: 2


Original comments

Comment by Arkapravo on 2012-11-06:
@Malvarado Gazebo has a known issue with very low moments of inertia

Comment by malvarado on 2012-11-07:
I am using the moment of inertia values that are used in the erratic URDF. What do you recommend I increase them to?

Comment by SL Remy on 2013-02-01:
was this concern ever resolved?

Comment by malvarado on 2013-03-07:
No this was never resolved

Comment by dmngu9 on 2015-02-03:
hey, im trying to add differential drive to my custom robot but dont know how. Can you give me any instructions please? I have my robot urdf file from solidworks already

$\endgroup$

1 Answer 1

0
$\begingroup$

Rosanswers logo

Try changing the odometrySource parameter of your differential drive plugin from world to encoder.

This fixed it for me.

Edit: This actually breaks the linear velocity you get from odom. See also: https://github.com/ros-simulation/gazebo_ros_pkgs/issues/327


Originally posted by AReimann with karma: 88 on 2015-05-26

This answer was ACCEPTED on the original site

Post score: 1

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.