29 Commits

Author SHA1 Message Date
Matthias Grob
bbb04ab4b8 Remove relaying of maximum altitude through land detector 2022-01-05 14:54:59 +01:00
Daniel Agar
019eaf7038 multicopter: minimize dt jitter by using estimate timestamp_sample 2021-12-17 17:52:28 -05:00
Matthias Grob
35d4986ea7 FlightTasks: remove updateFinalize() concept because it got obsolete 2021-11-18 19:12:44 -05:00
Matthias Grob
b36dbf8de4 Remove AutoLineSmoothVel, merged into Auto 2021-11-16 10:08:47 +01:00
Silvan Fuhrer
f02786d112 Navigator/Commander: make GPS failsafe consitent: switch to Descend also for FW and VTOL
- remove GPS failsafe mode
- for VTOL: transition to hover in Descend (unless NAV_FORCE_VT is not set)

Signed-off-by: Silvan Fuhrer <silvan@auterion.com>
2021-11-05 12:09:39 +03:00
David Sidrane
85f4f13e8a flight_mode_manager:Use inttypes 2021-06-16 17:07:47 +02:00
Matthias Grob
ee87257a8d FlightModeManager: move velocity control feedback into FlightTask
This was only handled outside because FlightTaks lived in the
multicopter position controller which produces the data that was
needed but now it doesn't make sense anymore to handle this
subscription separately.

It's better to have it inside the base task to have the data available
on task activation sucht that e.g. Altitude mode can take over smoothly
from Position mode.
2021-05-04 16:47:48 +02:00
Matthias Grob
89b502b9a0 FlightModeManager: remove switching out of a task for every mode change
This was an idea to be able to reinitialize on mode change e.g. from
Holde mode to Land mode which are currently all still handled by
FlightTaskAuto and don't require a task switch.

But I found out it leads to issues because the last setpoint and the
ekf reset counter state from the previous task are lost and as a result
the setpoint transition cannot be handled consistently anymore.
2021-03-11 00:40:27 +01:00
Matthias Grob
54fe0ae98c FlightModeManager: rename updateVelocityController{IO} to {Feedback} 2021-03-11 00:40:27 +01:00
Daniel Agar
d0c9a5fc93
OFFBOARD mode architecture overhaul (#16739)
- handle SET_POSITION_TARGET_LOCAL_NED and SET_POSITION_TARGET_GLOBAL_INT with ORB_ID(trajectory_setpoint)
 - FlightTaskOffboard not needed at all
 - bypass position_setpoint_triplet entirely (start removing extraneous fields)
 - simplify offboard_control_mode to map to supported control modes
2021-03-05 09:39:46 -05:00
Daniel Agar
266ea377da move takeoff state machine flight_mode_manager -> mc_pos_control 2021-03-03 18:53:56 +01:00
Daniel Agar
0ba1bc0ce1 MPC_POS_MODE remove old metadata and explicitly handle invalid configuration 2021-03-01 09:10:11 +01:00
Matthias Grob
fbd64fbdd8 FlightModeManager: publish takeoff status 2021-01-31 11:37:00 +01:00
Daniel Agar
d1dfa26903 consume all available queued vehicle_commands 2021-01-26 12:00:18 -05:00
Matthias Grob
031bbb7f3e FlightModeManager: handle commands all the time
Moving the command handling to a separate function that gets called
whenever a vehicle command is available to always react on commands
and not just when already a task is running.

This solves e.g. commanding an Orbit when in Staibilized.
2021-01-17 15:46:30 +01:00
Matthias Grob
df54f938ef FlightModeManager: correct setpoint struct initialization
It is important that setpoints get initialized with NAN and not overwritten
if specifically set by a successful flight task execution. It's then
clear if any setpoints were intentionally and successfully set.
Crucial for the position controller's emergency failsafe and the
seamless setpoint handover to the next flight task.
2021-01-17 15:46:30 +01:00
Matthias Grob
63db61a700 FlightModeManager: correct acceleration setpoint feedback naming
The variable was never renamed correctly in this in between layer when
we switched from normalized thrust to acceleration setpoints.
2021-01-17 15:46:30 +01:00
Daniel Agar
4d7b875ee2 flight_mode_manager: merge with flight_tasks 2021-01-17 15:46:30 +01:00
xdwgood
802c68a62e Do not run transition flight task when not enable altitude control 2021-01-08 10:28:00 +01:00
RomanBapst
fe2e299046 FlightModeManager: small rebase change
Signed-off-by: RomanBapst <bapstroman@gmail.com>
2020-12-30 10:25:08 -05:00
Matthias Grob
e92795b474 Temporary logging addition to debug CI 2020-12-30 10:25:08 -05:00
Matthias Grob
fafbb687d8 FlightModeManager: fix integral reset on ground
This information could also be used for yaw and integral
resets of the lower level controllers.
2020-12-30 10:25:08 -05:00
Matthias Grob
62ada2e2dc FlightModeManager: restore weathervane calls
I had to do an extra subscription to the vehicle attitude.
I don't know how to test this.
2020-12-30 10:25:08 -05:00
Matthias Grob
aa888223f0 FlightModeManager: fix takeoff state in stabilized mode 2020-12-30 10:25:08 -05:00
Matthias Grob
8edb06e94f FlightModeManager: make sure emergency failsafe works 2020-12-30 10:25:08 -05:00
Matthias Grob
8329208b84 FlightModeManager: fix takeoff ramp from zero 2020-12-30 10:25:08 -05:00
Matthias Grob
88c274b3cd MulticopterPositionControl: 2nd pass to move to FlightModeManager 2020-12-30 10:25:08 -05:00
Matthias Grob
f52bad87e2 mc_pos_control: separate out flight_tasks (into FlightModeManager) 2020-12-30 10:25:08 -05:00
Matthias Grob
fa7170bc4f Add FlightModeManager
to separate out setpoint generation from controllers
2020-12-30 10:25:08 -05:00