-
Notifications
You must be signed in to change notification settings - Fork 13.6k
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
FW pos C: fix altitude control for VTOL/FW by also publishing attitud… #12920
Conversation
…e sp if in altitude, not only if position or velocity controlled Signed-off-by: Silvan Fuhrer <silvan@auterion.com>
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.
lgtm, better than relying on not being offboard :)
It's already the 2nd time I see that something works because the vehicle is not offboard, might be useful to double check all those if !offboard
at some point.
@@ -1746,7 +1746,8 @@ FixedwingPositionControl::Run() | |||
if (_control_mode.flag_control_offboard_enabled || | |||
_control_mode.flag_control_position_enabled || | |||
_control_mode.flag_control_velocity_enabled || | |||
_control_mode.flag_control_acceleration_enabled) { | |||
_control_mode.flag_control_acceleration_enabled || | |||
_control_mode.flag_control_altitude_enabled) { |
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.
@sfuhrer Nitpick, but maybe you can use flag_control_climb_rate_enabled. I think that's how it's used in other locations and in theory could run TECS in climb rate mode. What do you think? Otherwise good to go.
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 don't think it matters right now, but we should do a pass to make sure these are handled consistently and to even know where the holes are in offboard.
Fixes #12910.
The VTOL altitude control in FW mode was broken with #12532. Before the attitude sp was always published if not on offboard control or in position/velocity control. This PR adds Altitude control support there (thus not relying on the "not offboard" flag as before.
Probably also applies for FW flown in ALT control.