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

Simulating Small Differential Drive Robot in Gazebo

asked 2012-11-06 11:44:05 -0500

malvarado gravatar image

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

edit retag flag offensive close merge delete

Comments

@malvarado Gazebo has a known issue with very low moments of inertia

Arkapravo gravatar image Arkapravo  ( 2012-11-06 19:13:35 -0500 )edit

I am using the moment of inertia values that are used in the erratic URDF. What do you recommend I increase them to?

malvarado gravatar image malvarado  ( 2012-11-07 11:14:33 -0500 )edit

was this concern ever resolved?

SL Remy gravatar image SL Remy  ( 2013-02-01 02:29:49 -0500 )edit

No this was never resolved

malvarado gravatar image malvarado  ( 2013-03-07 14:09:50 -0500 )edit

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

dmngu9 gravatar image dmngu9  ( 2015-02-03 22:30:59 -0500 )edit

1 Answer

Sort by ยป oldest newest most voted
1

answered 2015-05-26 02:19:42 -0500

AReimann gravatar image

updated 2015-05-27 03:26:35 -0500

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/gaz...

edit flag offensive delete link more

Question Tools

2 followers

Stats

Asked: 2012-11-06 11:44:05 -0500

Seen: 2,304 times

Last updated: May 27 '15