-
Notifications
You must be signed in to change notification settings - Fork 19
Add balance control to foot controller #1636
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
base: main
Are you sure you want to change the base?
Conversation
Co-authored-by: Ysobel Sims <35280100+ysims@users.noreply.github.com>
| @@ -1,3 +1,5 @@ | |||
| log_level: DEBUG | |||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| log_level: DEBUG | |
| log_level: INFO |
| right_elbow: -0.7 | ||
| left_elbow: -0.7 | ||
|
|
||
| # Use balance control. NOTE: correction_enabled must be true in FootController config |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| # Use balance control. NOTE: correction_enabled must be true in FootController config | |
| # Use balance control |
| right_elbow: -0.7 | ||
| left_elbow: -0.7 | ||
|
|
||
| # Use balance control. NOTE: correction_enabled must be true in FootController config |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| # Use balance control. NOTE: correction_enabled must be true in FootController config | |
| # Use balance control |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
or maybe the comment isn't needed anymore
| roll_error, | ||
| pitch_error)); | ||
| } | ||
| return; // Do not apply control if the error is too large |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
rather than return here, flip the logic and wrap the control updates in this if so that we just pause increasing/decreasing desired roll/pitch and don't reset our desired pitch to the nominal
| // Graph final corrected desired values | ||
| emit(graph("Balance/Desired_Roll_Final", desired_roll)); | ||
| emit(graph("Balance/Desired_Pitch_Final", desired_pitch)); | ||
| } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
it would be good to apply a slew rate limit to these, just as a safety precaution. so basically just add a limit on the maximum change in desired pitch and roll per second, just so that if we get bad sensor data (like a faulty gyro reading) this doesn't blow up
P.S. It's probably not critical that we have this in and use it for robocup. I was thinking it might help with the tilting during get ups and starting to walk again when the batteries get low.