Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Hold Climber Position with Motor Stalls #35

Open
karagenit opened this issue Feb 27, 2018 · 2 comments
Open

Hold Climber Position with Motor Stalls #35

karagenit opened this issue Feb 27, 2018 · 2 comments

Comments

@karagenit
Copy link
Contributor

Here's my thought:

GamepadClimberControl: when the joystick input is between 20% and -20%, we engage the brake and set the motors to a known stall power (e.g. 15%).

Has the downside of possibly triggering the pneumatics a lot if we're holding the stick right around 20% (we could disengage at 30% and engage at 20% to prevent that).

@paul-blankenbaker
Copy link
Contributor

I like the 20% engage and 30% dis-engage range. However, I think the output power needs to be compensated based on whether you are going up or down (a gain multiplier):

final static double UP_GAIN = 1.0; // Allow full power going up
final static double DOWN_GAIN = 0.25; // Greatly reduce max power when going down

// Do you new checks on enable/disable brake
// Then apply gain setting to ouput power based on direction
power = (power > 0) ? power * UP_GAIN : power * DOWN_GAIN;

@karagenit
Copy link
Contributor Author

I don't know if the "gains" will be necessary - I plan on simply setting peak outputs on the Talons to limit the speed when climbing.

Anyway, I hope that none of this stall + brake stuff will be necessary. Ideally, we'll fix the brake such that it's able to hold the robot completely on its own. We readjusted it a bit ago, and I plan on testing it tomorrow. I'll probably implement this change in a branch, so we can merge it in if the brake isn't good enough.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants