views:

288

answers:

3

In box2d physics engine I can set a motor speed for a joint on my wheel in Radians/Second.

What would be an expression I could set the speed to so the final actual "speed" of the wheel would be the same regardless of wheel radius.

Presently, I'm setting the Wheel speed as a constant, wheelSpeed = 20. But this has the effect of making large wheels faster than small ones. I want the radius to be used in figuring the radians/sec for the motor speed so I will get the same effective speed regardless.

So, if it was a small wheel, it would have to turn much more often than a large one.

I think I need to do something like 2 * PI * Radius / 180 * Speed? Or something similar, but I can't figure it out exactly.

I want to based the wheel motor speed (in radians/sec) it so the final "speed" of the wheels is constant regardless of size of the wheel.

+1  A: 

The circumference of the wheel is proportional to the radius, therefore in order to keep the radial velocity in linear units/second constant, divide by the increase in radius.

For example, at radius R, the radial velocity is 1 rad/sec. Then if you increase the radius to 2R, the radial velocity should be 1/2 rad/sec.

1800 INFORMATION
Slight nitpick on phrasing: you divide by the radius, not the increase in radius.
David Zaslavsky
No, you divide by the increase, the ratio that is, between the original radius and the new radius
1800 INFORMATION
+6  A: 

There are 2 PI radians in a full circle and your circle length is the circumference (2 PI R).

So, if you want a constant speed of the circumference running past a point, you need a radial speed of:

Y = 2 PI / 2 PI R

or:

Y = 1/R

In other words, make the value a factor of the inverse of your radius.

paxdiablo
+2  A: 

If v is speed, w is frequency, and r is radius: the equation is v = w * r, or w = v / r. So just take your desired velocity, divide by the radius of the wheel, and set that as the angular velocity.

David Zaslavsky