Translating velocity and angle into wheel speed (for a two wheel robot)

Click For Summary
SUMMARY

This discussion focuses on converting the speed and angle of a two-wheeled robot into individual wheel velocities. The key formula involves the robot's speed (in mm/s) and the angle of travel (in radians), which determines how fast each wheel should turn. Specifically, to achieve a desired speed of 20 mm/s and an angular velocity of 0.4 radians, the left wheel should rotate at 18 mm/s and the right wheel at 21 mm/s. The calculations also take into account the wheel radius (R) and the distance between the wheels (L) to accurately determine the required wheel speeds for both straight movement and turning.

PREREQUISITES
  • Understanding of basic robotics concepts, specifically two-wheeled robot dynamics.
  • Familiarity with angular velocity and linear speed calculations.
  • Knowledge of wheel circumference and radius (R) in mm.
  • Ability to perform mathematical operations involving radians and linear motion.
NEXT STEPS
  • Research the mathematical relationship between linear speed and angular velocity in robotics.
  • Learn about wheel radius (R) and its impact on robot movement calculations.
  • Explore the concept of axle length (L) and its effect on turning radius and wheel speed.
  • Study control algorithms for two-wheeled robots to optimize movement and turning.
USEFUL FOR

Robotics engineers, hobbyists building two-wheeled robots, and anyone interested in programming robot motion control systems.

Marcos_84
Messages
3
Reaction score
0
Hello.

I'm coding a controller for a two wheeled robot whos speed and angle is determined by the velocity of it's two wheels.

The problem is, my code does calculations using speed (mm/s) and angle (radians).

So I need someway of converting that speed and angle into the velocity of the two wheels of the robot.

It sounds really simple but I just can't work out what the exact formula is.

Any clues?

Thanks!
 
Physics news on Phys.org
Speed I am guessing, is the speed of the robot. But what is the angle? Is that rotation angle of the wheel or direction of travel?

You need to be very specific about the smallest details if you want help. We cannot see your robot or read your mind, you have to tell us.
 
Yes, the angle is the direction of travel of the robot relative to it's current position. The wheels are unable to 'steer' as such. Rather, the robot turns by altering the velocity of each of it's two wheels.

For example, if I passed a function two values, speed=20mm/s and angle = +0.4radians I need that function to convert to the speed of each wheels which should end up something like left_wheel=18mm/s, right_wheel= 21mm/s. So that the robot will then travel at a speed of 20mm/s at an angular velocity of 0.4 radians.

Hope that makes sense.
 
It's still not clear what you mean by passing the angle. What you can control is, rather, the rate of change of that angle, just as you control the speed or rate of change of position.

If you want the robot to go a 20 mm/s, then the circumference of the wheels has to move 20 mm/s. Since the circumference is 2\pi R, where R is the radius of the wheels in mm, that would mean that you want the wheel to rotate a fraction 20/(2\pi R)= 10/(\pi R) of its circumference and so that same fraction of a whole rotation, 2\piradians: you want both wheels to turn at 10/(\pi R)(2\pi)= 20/R radians per second. In general, to move x mm/s in a straight line, the wheels will have to turn at x/R radians/s.

In order to turn, one wheel will have to turn faster than the other and to have ONLY a turn, one wheel will have not turn at all. To turn and move, add the "turning" speed to the "moving" speed of one wheel. In order to turn an angle an angle of 0.4 radiansper second, you will have to take the distance between the wheels into account. If the distance between the wheels (axle length) is L mm, a 0.4 radian turn will cover a distance of 0.4L mm. In order to have moved that in one second, the wheel will have had to turn, as above, 0.4L/R. More generally, in order to turn at y radians per second, the "outside" wheel will have had to turn at yL/R radians per second.

In order to move forward at x mm/s and turn at y radian/s, the inside wheel will have to turn at x/R radians per second while outside wheel turns at x/R+ yL/R= (x+ yL)/R radians per second. Again, R and L are in mm since x is in mm/s and y is in radians/s.
 
OK. That definitely clears things up for me.

Thanks a lot for the help.
 

Similar threads

  • · Replies 4 ·
Replies
4
Views
2K
Replies
18
Views
3K
  • · Replies 3 ·
Replies
3
Views
2K
  • · Replies 15 ·
Replies
15
Views
3K
Replies
67
Views
4K
  • · Replies 23 ·
Replies
23
Views
5K
Replies
3
Views
1K
  • · Replies 6 ·
Replies
6
Views
658
  • · Replies 22 ·
Replies
22
Views
5K
  • · Replies 7 ·
Replies
7
Views
3K