|
Re: Code For Mecanum Wheels
Controlling any holonomic-omnidirectional drive system is the same whether it is any number of omni-wheels or mecanum-wheels. The output of the motors are related by a sin curve. Phase shifting the sin curve by the desired heading results in the proper motor outputs for each of the wheels.
Having had a mecanum drive the last two years, we have attempted a number of control algorithms and have settled on this one. Please note that this algorithm takes advantage of Binary-Radians (256 b-rads per revolution) to simplify the trig math.
I hope that you find this useful in your attempts to control your onmi bot.
__________________
"That mecanum guy"
- Woodie Flowers Finalist Award Winner: 2010 Minnesota North Star Regional
- Mentor and Founder of 7 FRC Teams since 2003.
- FRC Regional Competition Score Keeper/Field Power Controller, Robot Inspector, Control System Adviser, Judge
- Co-Founder, Alumni: Milwaukee FIRST Support Organization
- Board Member, Game Design Committee, Judge, MVP-FTA: Midwest Vex Programs
- Computer Engineering Alumni '06: MSOE
- Embedded Firmware Engineer: Rockwell Automation
Last edited by JonA : 17-02-2008 at 14:09.
Reason: There are 256 b-rads in a revolution as zero is a number too.
|