Gazebo | Ignition | Community
Ask Your Question

differential_drive_controller veers

asked 2019-09-18 10:17:15 -0500

RedDave gravatar image

I have been through several very similar basic tutorials for building a simulated mobile robot in Gazebo. They all consist of a pair of wheels, a chassis and a caster. In each case the vehicle is connected to the differential_drive_controller ( plugin.

I am trying to understand the behaviour. When I send a new speed demand (using teleop_twist_keyboard) the vehicle moves. I start the vehicle pointing along the x-axis. The speed demand that I apply is forwards. My expectation is that the vehicle should move exactly along the x-axis, since there should be no forces to rotate the vehicle. However, within 10m the vehicle has rotated by about 45deg.

Does the gazebo simulator add noise to the simulation/control? Is there some other explanation for this behaviour?

edit retag flag offensive close merge delete

2 Answers

Sort by ยป oldest newest most voted

answered 2019-09-19 04:16:08 -0500

RedDave gravatar image

The vehicle is completely symmetrical. If there is no noise in the system, if the vehicle is sent a forward linear velocity then the vehicle should exactly drive forwards.

I know that I can control the vehicle (I've been doing that for many years with real vehicles) but before I start on that I want to understand the simulator. Unless told otherwise a simulation should be perfect. An object with only forward force on it should move exactly forward.

Why would a simple vehicle with 2 wheels and a caster (which is what I have) have this behaviour?

edit flag offensive delete link more

answered 2019-09-19 03:07:58 -0500

Tobi92 gravatar image

updated 2019-09-19 03:09:31 -0500

It depends by your architecture. I make you an example. Even if no forces rotate the vehicle, even if you just send a linear velocity command on x axis, if the wheels of the rover are "crooked" then the rover will forcely rotate. For example, simple rovers with 2 wheels and a caster may involve this behaviour.

Then, to avoid that, you shall: - Modifying your rover architecture - Modifying your program in order to: (i) send a linear velocity, (ii) sometime get a pose, (iii) if the pose is 'crooked' then send a little angular velocity command.

edit flag offensive delete link more
Login/Signup to Answer

Question Tools

1 follower


Asked: 2019-09-18 10:17:15 -0500

Seen: 504 times

Last updated: Sep 19 '19