This isn’t strictly VEX related, but I think there’s a number of people here who could help with this.
I’m working on an animation project with Blender, and I need some help with a formula.
I have a tank drive, with an all omni-wheel chassis (so point turns). It is 10 inches wide (from center of left wheel to center of right wheel), and 8 inches long.
Blender has a drivers feature, which allows you to drive the location/rotation/scale of any object from the location/rotation/scale of another. I need to drive the rotation of the wheels according to the position and rotation of the chassis. The way it works is, there’s box for the formula that drives the driven object and boxes to declare variables from driver objects.
It is very easy to drive the wheels for when the chassis moves forward/backward, but I need help on the rotation part. With a 10 inch wide wheelbase, what formula would I need to use to drive the wheels with the chassis when it turns and moves forwards. I know not many people here use Blender, but that shouldn’t matter. It’s much more of a math problem.
I need a formula to describe wheel rotation when given input values from both the position forwards and rotation
I would appreciate any help that anyone could offer.
No, I’m trying to move the wheels based on robot movement, not vice-versa. To mimic real-world movement, to make it look like the wheels are turning well.
We’re going to imagine your robot is moving in an arc but the radius is 0 since that’s pretty much what a point turn is. From here all we need is the width of your drivebase(10 inches). Also, the arc length is just the distance that the wheel will travel
Arc length Formula:
Arc Length = 2pi(radius) x (angle/360)
Since the distance between your wheels are 10 inches, we can substitute in 10 for our radius.
Arc length = 2pi(10) x (angle/360)
Now we solve the equation a bit
Arc length = 20pi x (angle/360)
Then we put the arc length into terms of wheel rotation using the wheel circumference(about 12.56 inches)
Ok then. I assume you are rotating by degrees in which case get the radius of your wheel base (you probably want to measure it from one corner of the drive to the other corner) then you will get the amount of distance each wheel has to travel for a 360 turn. Divide that by 360 and multiply by the amount of degrees you want to turn.
Assuming your wheels are rotating off of degrees/s or what have you you need to get the circumference of them as well. For every full rotation of the chassis is a (drive rotation circumference/wheel circumference) amount of rotations for the wheel.
a = robot center’s forward/backward position in inches
b = robot’s orientation in degrees (no rotation = 0 degrees, clockwise is positive)
d = wheel diameter in inches
w = wheel rotation in degrees
Left Wheels:
w = (360a)/(pi*d) + (10b)/d
Right Wheels:
w = (360a)/(pi*d) - (10b)/d
Note that each wheel is made up of an independent component. For just turning, you’ll have
w = (10b)/d
and
w = (-10b)/d.
A position and rotation of the robot does not map to a single set of wheels rotations since you can get to any position in many different ways.
A driver would need to know the entire path, which it cannot. You would need to use scripting (a feature built into blender) or find an add-on which can do this.
for simple point turns this ratio should work. If we new the actual turning center of the robot then we would need to change the math, but going off the assumption the robot turns around the drivetrain’s center, this should be accurate