Ask Your Question

differential_drive_controller veers

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 (libgazebo_ros_diff_drive.so) 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 close merge delete

2 Answers

Sort by ยป oldest newest most voted

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?

more

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.

more

Stats

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

Seen: 616 times

Last updated: Sep 19 '19