I have seen a few threads about deadbands but none tackle the issue that the normal deadband code cause the joystick value to jump from 0. I created a “paper” about Deadbands and what I have found to be the best way to code them.

This is my first white “paper”. Please let me know if there are any changes that should be made.

The only thing this paper may need to add to talk about is that deadbands prevent stalling the motors at very low voltages and this code does not currently adjust for that but from the testing the code its negligible and does not impact drive ability.

1 Like

Pertinent and informative. I like it, and will forward it on to our students! Well done!

2 Likes

Two thoughts that would fit in well in your paper:

Have you considered the built in “deadband” on the robot side of the equation? More properly known as a Feed-Forward term.

If I have a joystick at 0.06 with a deadband of 0.05, your equation would output 0.01 to the robot. A real robot might not move until 0.10, so you would get smoother control over all joystick values by, in this case, outputting 0.11 to the robot (so that when the driver wants to move, the robot moves). This is basically a feedforward of 0.10, but only applied outside the deadband.

It’s also very common to put drive outputs as the square, cube, or other exponentiation of the joystick input. This helps drivers control the robot better at low speeds, rather than high. Generally the difference between 10 and 20% has more impact on robot control than the difference between 80 and 90%. Generally the exponent is chosen based on driver preference, but you have to be careful to maintain the sign (+/-), depending on your choice.

1 Like

All good points. I did mention the motor stalling issue in post. I haven’t touched much with Velocity Controlled drive-train compared to Voltage Controlled so I know very little about Feed-Forwarding. I have heard a bit about having the drive outputs on some curve but at least on my team we never found a need to do so.

I will probably talk to some other teams to find out their systems to add to this paper. But I wanted to get it out for now so the teams that are less advanced in their control systems could find a good reference.

You can feed-forward on voltage controlled, you just need to find the voltage that reliably, but just barely, doesn’t move your robot. Once you know that value you can add it to the joystick value (0.00 becomes 0.10 or similar, and be careful of scaling near 1.00).

It’s not super important for the drive base, but is probably a ‘good practice’. It’s more helpful for other mechanisms, such as arms or elevators. Feedforward is (probably) the simplest of the ‘advanced control loop’ ideas, but is criminally under-utilized.

This is the best resource I’ve seen for deadbands, which comes to some of the same conclusions as you, but goes a couple steps farther: http://www.third-helix.com/2013/04/12/doing-thumbstick-dead-zones-right.html

There are lots of subtle tweaks you can make to deadzones to get them feeling nicer. It’s also pretty easy to experiment with if you’re bored in the offseason!

3 Likes

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.