Intuitive strafing controls

01-31-2019, 12:16 PM

New team here, and we are looking toward competing NEXT year, so we've got some time. Yesterday we installed our mecanum wheels, and set it up to use the left & right dpad for strafing controls. And we are using the joystick for normal driving. But I wonder what other innovative and intuitive controls teams are using.

You can control a mecanum drive just like an omniwheel holonomic drive. Have a single stick. Push forward, go forward. Push left, go left. Push diagonal, go diagonal. Use another stick left-right (or dpad buttons) for turning.

If you really want to get fancy, use a gyro and do field centric control. Push the stick away from you, the robot goes away from you (no matter which way it is turned!). Pull the stick towards you, the robot comes towards you (no matter which way it is turned!).

Comment

The team tried that yesterday (using a single joystick) but they felt that the zero point when the stick was centered caused the motors to chatter because the sticks weren't exactly 0.0, but had some small value. I think they would like the simplicity of using a single joystick so maybe they could try it again, and maybe put in some minimum value before the robot starts moving.

You gyro idea sounds really cool!

Comment

I doubt the joysticks are causing the chattering. The joysticks should have a dead zone built-in so that values below a certain level (I believe the default is 0.2) are rounded down to zero. What do you mean by the motors chatter? At what speed are the motors turning when they "chatter"? Do the motors still "chatter" if the wheels are off the ground?

Comment

I didn't see it, so I don't really know for sure. But that explanation made sense to me. Like if the value was close to zero, sometimes positive and sometimes negative. I'll ask them if they want to try it again. They got the drive working right at the end of practice, and they realized that they had the controls reversed, so practice tomorrow they already know they need to fix that (easy fix). So maybe they can see if they can get the joystick control working.

Comment

I'm guessing here - but I think the chatter is probably a coding problem. (been there done that with my team..... more than once)
When they changed the code to use one joystick for all directions did they leave in the code to strafe using d-pad?
If so the joystick part is probably setting one power and then the d-pad code is setting it back to 0. So every loop thru the code it's setting the power twice, each time being a different power.

I know for my team this was their first year using mecanum.
They originally used one joystick x=turn, y=forward/back and the other joystick x=strafe.
They resisted a bit but I did get them to one joystick x=side, y=forward/back and the other joystick x=turn and after a short learning curve liked that better.