320 Commits

Author SHA1 Message Date
bresch
01d0b8800e commander: report GNSS yaw fault to user 2021-08-05 11:10:02 +02:00
Daniel Agar
e900f2ea54 boards: Advanced Technology Labs (ATL) Mantis EDU support and airfarme (SYS_AUTOSTART 4061)
Co-authored-by: Julian Oes <julian@oes.ch>
Co-authored-by: Daniel Agar <daniel@agar.ca>
2021-08-04 17:15:24 -04:00
Daniel Agar
883624d915 lib/geo: move from ecl 2021-07-15 10:38:24 -04:00
Matthias Grob
11556d4e9a Commander: allow disabling RC loss failsafe for mission, hold, offboard independently 2021-06-25 10:46:43 +02:00
Matthias Grob
6ee8f7be0f Commander: switch to static_cast<> for set_nav_state parameters 2021-06-25 10:46:43 +02:00
Thomas
a264541861 explicitly set param2 to 0 in existing *DO_VTOL_TRANSITION commands. add a guard against NaNs. 2021-06-21 22:39:54 +02:00
David Sidrane
ed474794cc commander:Use inttypes 2021-06-16 17:07:47 +02:00
Julian Oes
e828ba4288
commander: send parachute command on termination (#17564)
* commander: send parachute command on termination

This sends the DO_PARACHUTE command to parachute component.

* commander: fix lying comments and printf

* commander: use one flag for termination triggered

This merges the duplicate flags _flight_termination_triggered and
_flight_flight_termination_printed.

* commander: correct variable name

* commander: always send tune with parachute

* commander: fix target_component for parachute cmd

The previous changes were wrong in that all commands were now sent to
the parachute component which doesn't make any sense. Of course only the
parachute command should be sent there.
2021-06-15 11:50:30 +02:00
Julian Oes
8415692f2a commander: enable user override when GPS is lost
When user override using the RC sticks is allowed, I would expect this
feature to also work in the case where GPS is lost and the vehicle goes
into a blind land/descent.

Without this commit, the vehicle would switch to Land mode and a pilot
could not take over control unless they switch to Altitude control in
a ground station.

With this commit, user override works as I would expect it and it will
switch to Altitude control allowing a pilot to recover in this
situation.
2021-06-15 10:36:11 +02:00
bresch
514845592b en-/disable mc position controller using explicit control mode flag 2021-06-09 18:10:22 +02:00
Daniel Agar
ad534561d3 commander: only play safety change tunes if initialized 2021-05-27 10:13:49 +02:00
Julian Oes
4ccc60e2b0 commander: neutral beep on mission with warning
When a mission is uploaded we should beep consistenly:
- valid -> positive
- warn -> neutral
- invalid -> negative

Before this, it was:
- valid -> positive
- warn -> negative
- invalid -> negative
2021-05-20 10:50:54 -04:00
RomanBapst
3ac8c23dd0 commander: added prearm check for geofence violation
- if geofence action is not none, then don't allow arming outside of geofence

Signed-off-by: RomanBapst <bapstroman@gmail.com>
2021-05-10 10:46:49 +03:00
Igor Mišić
d631a5d39f Commander: checking COM_ARM_CHK_ESCS param for ESCs telemetry
COM_ARM_CHK_ESCS set to 0. The user will need to enable it manually.
Co-authored-by: Beat Küng <beat-kueng@gmx.net>
2021-04-22 13:46:08 +02:00
Claudio Micheli
bff99f9794 Commander:esc_checks minor improvements
Signed-off-by: Claudio Micheli <claudio@auterion.com>
2021-04-22 13:46:08 +02:00
Claudio Micheli
371fa98579 Commander/preflight checks: Add monitoring to ESC failures
Signed-off-by: Claudio Micheli <claudio@auterion.com>
2021-04-22 13:46:08 +02:00
Igor Mišić
bd4839e855 commander: changed msg "connection to GCS lost" from critical to info
update
2021-04-15 11:29:02 -04:00
Lorenz Meier
82f319a84a
Commander: Add support for pairing via commandline 2021-04-01 09:56:09 -04:00
TSC21
7abce87ae4 commander: add COM_OBC_LOSS_T for setting onboard computer loss time-out 2021-03-31 13:25:01 +02:00
Matthias Grob
b7600f4e4d Commander: check_posvel_validity use return value 2021-03-30 22:33:01 -04:00
Matthias Grob
29e1e0905c Commander: switch main_state functions to pass by reference 2021-03-30 22:33:01 -04:00
Matthias Grob
531de5c588 Commander: switch all state_machine_helper functions to pass by reference 2021-03-30 22:33:01 -04:00
Matthias Grob
d97fba67e5 Commander: switch helper functions to pass by reference 2021-03-30 22:33:01 -04:00
Daniel Agar
0fa91f7cb0 commander: centralize main_state strings and simplify main state change attempts
* commander: centralize main_state strings and simplify main state change attempts
2021-03-30 17:56:28 +02:00
Claudio Micheli
b001865e5c Commander: clean up logic for flight mode transitions and add joystick mode initialization
Signed-off-by: Claudio Micheli <claudio@auterion.com>
2021-03-30 17:56:28 +02:00
bresch
ace6f81c93 commander: report estimator mag fault detection to ground station 2021-03-25 12:57:36 -04:00
bresch
2c5342acd4 commander: increase nav_test_failed hysteresis time
This is to avoid race condition with the yaw emergency estimator having
the same trigger delay of 1 second. Commander will now give more time to
EKF2 to reset itself before switching to altitude mode.
2021-03-25 12:57:36 -04:00
Julian Oes
2f024a9a8a commander: pass in correct time since boot
This fixes the case where the preflight check fail right after the start
and report "sensors unstable".
2021-03-19 15:58:14 -04:00
garfieldG
e9725a5fa7
Merge pull request #17089 from garfieldG/pr-safety_switch_status
send safety switch status to ground
2021-03-17 05:23:31 +01:00
Inhwan Wee
c67d85945b [commander] more detailed print_status 2021-03-16 01:00:55 -04:00
Matthias Grob
ceb445caa0 Run mc_pos_control for acceleration control mode flag 2021-03-11 10:37:03 -05:00
Daniel Agar
a11d2207e4 commander: simplify failure detector is attitude stabilized check 2021-03-09 10:47:00 -05:00
Daniel Agar
bb12fce66c delete RATTITUDE flight mode 2021-03-09 10:47:00 -05:00
Daniel Agar
263b00b65f
ekf2 support SET_GPS_GLOBAL_ORIGIN and remove globallocalconverter usage
- vehicle_command cmd extended from uint16 to support PX4 internal commands that don't map to mavlink
2021-03-05 18:25:14 -05:00
Daniel Agar
077afdf9aa
commander: extend reliant on opt flow to ALTCTL (degraded from POSCTL)
If you're flying in manual position control mode and lose position the state machine will put you in altitude control mode. Extending the reliant on optical flow relaxed position validity thresholds allows you to potential get back into position control mode with flow alone.
2021-03-05 10:07:36 -05: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
Matthias Grob
5bbc66f3af ManualControl: name, message, comment, const qualifier improvements
addressing review from @bresch, @julianoes and @JonasVautherin
2021-03-04 10:41:21 +01:00
Matthias Grob
a43a829fdf Commander: gate manual control setpoint processing on new data 2021-03-04 10:41:21 +01:00
Matthias Grob
c16b48fd2c Commander: Replace manual_control_setpoint use 2021-03-04 10:41:21 +01:00
Matthias Grob
49c240f49e Commander: simplify rc arming disabling logic 2021-03-04 10:41:21 +01:00
Matthias Grob
37ea78a7ff Commander: move rc arming to ManualControl class
Separating the different arming methods is the next step.
2021-03-04 10:41:21 +01:00
Matthias Grob
ee2d408edc Commander: move rc availability to ManualControl 2021-03-04 10:41:21 +01:00
Matthias Grob
0e1f1a9f57 Commander: use parameters directly in ManualControl 2021-03-04 10:41:21 +01:00
Matthias Grob
dda895c94b Commander: split out rc override logic into ManualControl 2021-03-04 10:41:21 +01:00
Matthias Grob
a4da15edf5 Commander: RC override back to stick change
Instead of deflection mainly because:
- Spring loaded throttle -> bad user experience
- Stale RC data -> Vehicle not savable
2021-03-04 10:41:21 +01:00
Matthias Grob
3d87982bba Commander: reintroduce last stick position 2021-03-04 10:41:21 +01:00
Julian Kent
cdadfabccc Bring back RC throttle override with a parameter to disable it 2021-03-04 10:41:21 +01:00
Matthias Grob
c2151cb4fa Commander: remove unused arm mode command residue 2021-02-26 07:38:02 -05:00
Julian Oes
e6b1775bb6 vmount/navigator/mavlink: gimbal v2 changes
This is a collection of commits all having to do with changes in the
Mavlink gimbal v2 protocol as described in:
https://mavlink.io/en/services/gimbal_v2.html
2021-02-17 13:54:34 -05:00
Daniel Agar
5abf29d93c
commander: auto TAKEOFF to LOITER/MISSION minor fix to avoid failsafe confusion
- base on nav_state rather than main_state
2021-02-16 13:02:14 -05:00