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

Click For Summary

Discussion Overview

The discussion revolves around converting the speed and direction of a two-wheeled robot into the individual wheel speeds required for movement. Participants explore the relationship between the robot's speed (in mm/s), the angle of travel (in radians), and how these parameters affect the velocities of the left and right wheels.

Discussion Character

  • Technical explanation
  • Conceptual clarification
  • Exploratory

Main Points Raised

  • One participant seeks a formula to convert the robot's speed and angle into the speeds of its two wheels.
  • Another participant questions the meaning of the angle, asking whether it refers to the rotation angle of the wheel or the direction of travel.
  • A participant clarifies that the angle represents the direction of travel relative to the robot's current position, noting that the robot turns by adjusting the velocities of its wheels.
  • Further elaboration includes a detailed explanation of how to calculate the required wheel speeds based on the desired linear speed and angular velocity, incorporating the radius of the wheels and the distance between them.
  • One participant expresses gratitude for the clarification provided by others in the discussion.

Areas of Agreement / Disagreement

Participants generally agree on the need to convert speed and angle into wheel speeds, but there is some initial confusion regarding the definition of the angle and how it relates to the robot's movement. The discussion remains exploratory without a definitive consensus on the formula.

Contextual Notes

Participants discuss the importance of specific parameters such as wheel radius and axle length, which are necessary for accurate calculations but are not fully defined in the initial query.

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 [itex]2\pi R[/itex], where R is the radius of the wheels in mm, that would mean that you want the wheel to rotate a fraction [itex]20/(2\pi R)= 10/(\pi R)[/itex] of its circumference and so that same fraction of a whole rotation, [itex]2\pi[/itex]radians: you want both wheels to turn at [itex]10/(\pi R)(2\pi)= 20/R[/itex] 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
18
Views
3K
  • · Replies 15 ·
Replies
15
Views
3K
  • · Replies 23 ·
Replies
23
Views
5K
  • · Replies 6 ·
Replies
6
Views
1K
  • · Replies 1 ·
Replies
1
Views
6K
  • · Replies 5 ·
Replies
5
Views
2K
  • · Replies 1 ·
Replies
1
Views
6K
  • · Replies 13 ·
Replies
13
Views
3K
Replies
5
Views
2K
  • · Replies 2 ·
Replies
2
Views
5K