Hello anyone and everyone!!! I have been searching Chief Delphi endlessly for Mechanum code for one joystick, but I’ve come up empty-handed. This year our team wants to implement a mechanum drive train, but I am not that knowledable about programming C to come up with it on my own so my programming team and I are in need of some help could anyone link us to or provide some code possibly? Thanks for all your help!!!
See 357’s Jester Drive code: http://www.chiefdelphi.com/forums/showthread.php?t=55896&highlight=jesterdrive
Everything’s correct, it’s just spread out so the final equations are just plain addition instead of mystery plusses and minuses (due to vector addition).
Some functions you want out of a mecanum platform are forward and lateral translation, along with rotation. Most single joysticks don’t have 3 axes, unless you can find one with twist, so you can rotate.
Last year, we looked at 190’s code for where to start. Good luck with yours!
Take a look at the vectors for mecanums, they should point in an x direction (opposite each other), and in a y direction (also opposite).
It should just be a simple matter of pwm assignements.
See this Chief Delphi thread about mecanum drive:
If you still need help, just reply with a question.
Does your joystick rotate too? Might be a good idea to have a separate control for that. We used a potentiometer with a record mounted on it as a turntable last year
Last year, we originally had a joystick that twisted (for the z-axis of mecanum drive). But after experiencing lots of problems (namely, it was too difficult to achieve fine control over the short twisting range of the joystick), we swapped twisting out to a second joystick.
Thanks for all of your input!! Now, we’ve decided to go with a tank drive on one joystick and the crab/strafing action on the other…but I am still having difficulties programming that… :ahh:
If by “Tank drive” you mean moving straight and turning, any of the Mecanum Drive codes already posted should still work…just set the forward and turn inputs to the first joystick, and the strafe input to the other one.