Formula for differential wheels translation/rotation

Click For Summary
SUMMARY

This discussion focuses on calculating the translation and rotation of a two-wheeled robot simulator using kinematics. Key variables include the angular velocity of each wheel, wheel radius, and the distance between the wheels. The formula derived states that the ratio of outer to inner angular velocities equals the ratio of their respective radii, which is essential for determining the robot's movement. The rotation angle (alpha) is calculated using the formula alpha = d / r, where d is the distance traveled and r is the radius, while the translation involves constructing a vector based on the calculated angles.

PREREQUISITES
  • Understanding of basic kinematics principles
  • Familiarity with trigonometry, specifically triangle properties
  • Knowledge of angular velocity and its implications in motion
  • Experience with 2D coordinate systems and vector mathematics
NEXT STEPS
  • Research "Kinematic equations for differential drive robots"
  • Explore "Implementing vector mathematics in 2D simulations"
  • Learn about "Optimizing real-time calculations in robotics"
  • Study "Using trigonometry for robotic motion planning"
USEFUL FOR

Robotics developers, simulation engineers, and anyone interested in implementing kinematic models for mobile robots will benefit from this discussion.

Han Fastolfe
Messages
2
Reaction score
0
Hi,

I'm building a simple 2D simulator for mobile robots, and I'd like to be able to determine the translation and rotation of a 2-wheeled simulated robot based on simple kinematics (no forces, friction etc). So, given these:

- angular velocity of each wheel (rad/s)
- wheel radius (m)
- distance between the wheels (m)

I'd like to have a formula / method for determining the robot's translation in the x,y plane and its rotation, given a certain timestep size (e.g., given the above three variables, how much will the robot translate and rotate in 64ms). I know that when e.g. the left wheel moves faster than the right, the robot will start to turn to the right, but I can't figure out / find how.

Thanks in advance for the help!
 
Physics news on Phys.org
This is fairly easy. If the wheels run with constant speed the 2 wheeled robot will obviously run in circles.

You can make a drawing, to figure out what the radius is, the basic formula that will result should be:

\frac{\text{outer angular velocity}}{\text{inner angular velocity}}=<br /> \frac{\text{outer radius}}{\text{inner radius}}=\frac{\text{radius} + \text{wheel distance}/2}{\text{radius} - \text{wheel distance}/2}

The rest is high school trigonometry.
 
Thanks for the reply. The speed of the wheels isn't constant, but it is for very small timesteps. So in each timestep the robot controller sets its wheel speed, and I re-compute the new location and rotation angle.

I hadn't made the connection that outer v / inner v = outer r / inner r. So just to be sure that I've got the rest right (high school is a long time ago, but I think this should be correct. There's a diagram here to make it more understandable http://picasaweb.google.co.uk/lh/photo/yyJHKLykyuvlP8MAqKkZgQ?authkey=Gv1sRgCIjKg7CO97_9WA&feat=directlink" ):

Once I know the radius I know the outer and inner radius. From the angular velocity and wheel radius I can compute the distance traveled along the circle each describes. Then the rotation angle alpha the robot will go through in that timestep is

alpha = d / r, where d is distance traveled and r the radius.

So then I have the rotation. For translation I have a triangle formed by a base of length l, which is the distance between the bot's current and new location. Triangle has sides of length r, the top is at the centre of the circle that the bot is describing. The angle between the two sides is alpha. Hence the other two angles (between base and side) are:

beta = (pi - alpha) / 2.

From that it follows that

l = 2*r*cos(beta).

Now, to get the new location, I construct a vector of length l starting at the current location in the direction of the current bearing. I then need to rotate that vector through an angle such that the vector points to the robot's new location. This angle is

gamma = 1/2*pi - beta

The new location is then the point the vector points to.

Would that be correct? Also if anyone has a quicker/more efficient way of doing this, then please do tell since the program needs to do this calculation every timestep, so the quicker the better.

Thanks!
 
Last edited by a moderator:

Similar threads

  • · Replies 15 ·
Replies
15
Views
3K
  • · Replies 22 ·
Replies
22
Views
5K
  • · Replies 5 ·
Replies
5
Views
2K
  • · Replies 60 ·
3
Replies
60
Views
6K
  • · Replies 8 ·
Replies
8
Views
3K
  • · Replies 7 ·
Replies
7
Views
2K
  • · Replies 1 ·
Replies
1
Views
2K
  • · Replies 1 ·
Replies
1
Views
2K
  • · Replies 1 ·
Replies
1
Views
2K
  • · Replies 9 ·
Replies
9
Views
3K