7

I am trying to create a simulation of a robot with Ackerman steering (the same as a car). For now I'm assuming that it's actually a 3-wheeled robot, with two wheels at the back, and one steering wheel at the front:

Steering robot

Knowing the wheel velocity, and the steering angle a, I need to be able to update the robot's current position and velocity with the new values at time t+1.

The obvious way to do this would be to calculate the position of the centre of rotation, where the axles of the wheels would meet, however, this leads to an undefined centre of rotation when a = 0. This means that the model doesn't work for the normal case of the robot just driving in a straight line.

Is there some other model of Ackerman steering which works over a reasonable range of a?

Rocketmagnet
  • 6,457
  • 5
  • 29
  • 54

2 Answers2

2

I am not sure if this is what you are looking for but the simplest odometry equations for ackermann steering go as follows:

//basic velocity inputs
propel = 0.0; //m/s from rear wheels
steer_angle = a; //radians
delta_t = 0.03; //seconds

//compute odometry values from joint angles
//first get the theta update
delta_th = (propel/L)*std::tan(steer_angle);

//compute odometry update values
delta_x = propel*std::cos(position_th + ((delta_th*delta_t)/2.0));
delta_y = propel*std::sin(position_th + ((delta_th*delta_t)/2.0));

//now update our pose estimate
position_x = position_x + delta_x*delta_t;
position_y = position_y + delta_y*delta_t;
position_th = position_th + delta_th*delta_t;

Maybe this will help someone.

1

This problem is not specific to Ackerman steering but comes up with any model if you try to describe its motion as following a circle of certain radius: A straight line is equivalent to a circle with radius $r \to \infty$.

This is usually not a big problem, though: Just write down the equations of motion. If you want to evaluate these for driving straight, you will find a term that evaluates to "$\frac{0}{0}$" in this case (i.e. an indeterminate form). You can still compute the limit using L'Hôpital's rule and come up with a numerically sane equation for this special case.

sebsch
  • 659
  • 6
  • 15