-
Notifications
You must be signed in to change notification settings - Fork 17.2k
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
Rover: add roll and pitch stabilization #11034
base: master
Are you sure you want to change the base?
Conversation
a161be1
to
5775ced
Compare
rebased, might flash this onto a plane just to see if its correcting properly (not to fly) |
5775ced
to
ee8d85a
Compare
d3cb8e6
to
b800e15
Compare
b800e15
to
b10b07a
Compare
df6514e
to
a7375ad
Compare
rebased |
a7375ad
to
64071cf
Compare
Rover/mode.cpp
Outdated
@@ -444,6 +448,38 @@ void Mode::set_steering(float steering_value) | |||
g2.motors.set_steering(steering_value); | |||
} | |||
|
|||
// calculate target roll and pitch angles and output | |||
void Mode::calc_roll_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.
I think we need to split this function up into two or three pieces. So there should be:
- method(s) in the mode class to transform the pilot's inputs into lean angles
- method that takes target lean angles and passes them to the attitude controller and maybe then pushes them directly into the motors class.
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.
I have split into 2 methods and a helper that does them both, hopefully this it is closer to what you had in mind
64071cf
to
6111fd3
Compare
Added some things I though might be useful for walking robots, there is now a ANGLE_MAX param and a motor option bit to disable speed scaling all together. |
6111fd3
to
08727b9
Compare
rebased, hopefully fixed and removed dependency on the removal of RCMAP |
failing CI due to:
|
08727b9
to
e620d0a
Compare
I had not updated the param descriptions to add the new PID filters params, I have now, should pass CI |
e620d0a
to
e932cb9
Compare
tests not passing. |
We do need roll and pitch control support for walking robots at least. |
This adds a roll and pitch angle PID for use with boats with trim tabs. The desired pitch is always zero, the desired roll angle is calculated from the lateral acceleration.
The stabilization is active in all modes except manual and hold. It uses the equivalent plane output functions. currently just outputting on them all. (elevator, aileron, left elevon and right elevon)
Not tested