Hello everyone,
I have seen that the o-drive style of robot is very popular. I have tried to build one but the programming has seen better days. If somebody could share code with us that would be great or any comments or changes that you recommend would be greatly appreciated. Below is our current code.
Thanks in advance,
Nick
@Nick_S Do you want to control your drive with the joysticks or with the button pad? You have a really terrifying amalgamation of the two, and neither are setup in a way that works well. A good start would probably be to choose one or the other.
X-Drive or Holonomic X-Drive is probably the best way to refer to this drive system. Holonomic is a pretty general term which applies to Mecanum drives as well as a couple of others.
I really enjoyed working out the exact combination of plus and minus to get where i wanted. It was a fun thing to figure out experimentally.
We had a loop, and inside four motor commands set equal to the sum of the three joystick channels we were going to use. Add in a multiplier for each joystick. For each one, set the one channel you are interested in to a multiplier of 1, and then the other two to multipliers of zero.
Here i used LV as Left Vertical, RH as Right Horizontal, etc.
If you know what you want each joystick to do, debug that joystick one motor at a time (change the multiplier to -1 as necessary. Once you do all three joysticks, it will be ready to go.