|
Re: Omnidrive help
Assuming you have your omniwheels in a typical 45 degree setup "cutting the corners" of your drive base, the code is conceptually very simple.
Start with three values: frontward velocity, rightward velocity, and clockwise turn rate. (Negative values will represent backward, leftward, or counterclockwise.)
Compute the four motor speeds like this:
left front = forward + rightward + turn
left rear = forward - rightward + turn
right rear = forward + rightward - turn
right front = forward - rightward - turn
Of course, there are more details to work out, like how to deal with overflowing the valid range of motor control, and how to determine the control values in the first place.
|