120 Commits

Author SHA1 Message Date
Matthias Grob
ca711fecc7 Commander: improve message for RC override event 2019-10-09 15:34:46 +02:00
Matthias Grob
c1faea8d32 Commander: add const qualifiers for clarity 2019-10-09 08:03:07 +02:00
Daniel Agar
a5895e5a99
Revert "commander: update parameter strings to class enum"
This reverts commit c322f1d1568b73327916ce2363c80375e3b5485b.
2019-10-03 11:28:44 -04:00
Daniel Agar
c322f1d156 commander: update parameter strings to class enum 2019-10-02 19:43:32 -04:00
Daniel Agar
c8e59c4e39 parameter_update use uORB::Subscription consistently 2019-09-29 10:49:03 -04:00
bresch
6139812293 FailureDetector - use standard topic subscription for attitude topic and
pass vehicle_status from commander instead of subscribing to it.
2019-09-24 14:17:58 +02:00
Matthias Grob
412b44ff6e Commander: allow RC to override during RTL 2019-09-23 12:42:33 +02:00
Matthias Grob
4f44fde080 Commander: remove not disarming by RC message
Refactoring the condition to be more clear.
2019-09-23 12:42:33 +02:00
bazooka joe
fb3a91cc4f added circuit_breaker_enabled_by_val()
added and using circuit_breaker_enabled_by_val() where possible instead of circuit_breaker_enabled() which search for cbrk parameters by name, which is extensive process.
2019-09-22 13:55:40 -04:00
Julien Lecoeur
47355333ad Clarify comment 2019-09-02 10:47:40 -04:00
Julien Lecoeur
9c50f5ea08 Add parameter COM_PREARM_MODE
Condition to enter the prearmed state, an intermediate state between disarmed and armed
 * in which non-throttling actuators are active.
 *
 * @value 0 Disabled
 * @value 1 Safety button
 * @value 2 Always
2019-09-02 10:47:40 -04:00
Daniel Agar
891aae0377
commander increase cpu overload threshold
* the large 20% margin is no longer appropriate now that nearly all work in the system is
scheduled (moved out of ISRs) and represented in the load percentage
 * closes https://github.com/PX4/Firmware/issues/12753
2019-09-01 14:55:05 -04:00
Julien Lecoeur
84eeacfb38 Offboard failsafe actions: add DISABLED, LOCKDOWN and TERMINATE options 2019-08-21 07:56:20 -07:00
Julien Lecoeur
4c9288d993 Commander: cleanup COM_POSCTL_NAVL parameter
- move to px4::params
- use enum
2019-08-21 07:56:20 -07:00
Beat Küng
a7eed520b4 commander: refactor module usage output 2019-08-19 10:54:56 +02:00
Beat Küng
878ed8136c commander: add 'commander arm -f' command to force arming
This allows to bypass preflight and prearm checks.
During development there are regular cases where I just want to arm the
board/vehicle no matter what, and the preflight checks are guaranteed to
fail (e.g. sensors uncalibrated, inconsistent, powered via USB, etc.).
Allowing an easy and quick way to arm (assuming you know what you are
doing) helps to speed up development considerably and is less frustrating.
2019-08-19 10:54:56 +02:00
Jimmy Johnson
963467b4df splitting preflight and land disarm times into 2 parameters 2019-08-14 14:17:33 +02:00
Claudio Micheli
2eb9fb9ed6 Commander: move esc_status as local variable.
Signed-off-by: Claudio Micheli <claudio@auterion.com>
2019-08-09 09:41:17 +02:00
Claudio Micheli
09d79b221f Simplified esc_status healthiness logic.
Signed-off-by: Claudio Micheli <claudio@auterion.com>
2019-08-09 09:41:17 +02:00
Claudio Micheli
75c336c00c uavcan_main: replaced printf messages with PX4_INFO
Signed-off-by: Claudio Micheli <claudio@auterion.com>
2019-08-09 09:41:17 +02:00
Claudio Micheli
187a025dfe Commander: added esc_status prearm checks
Signed-off-by: Claudio Micheli <claudio@auterion.com>
2019-08-09 09:41:17 +02:00
Daniel Agar
a917f22b65
sensors: create vehicle_acceleration module (#12597) 2019-08-07 05:05:48 -04:00
Daniel Agar
8f5b7de498
uORB::Subscription minor API cleanup
* the forceInit() method was combined with the existing subscribe()
 * delete unused last_update()
2019-08-06 10:28:49 -04:00
Andrei Korigodski
4d5f922e7a commander: use shutdown_if_allowed() to check for shutdown safety
Signed-off-by: Andrei Korigodski <akorigod@gmail.com>
2019-08-05 05:55:33 -07:00
Andrei Korigodski
5133453822 vehicle_status: replace ARMING_STATE_REBOOT with ARMING_STATE_SHUTDOWN
Signed-off-by: Andrei Korigodski <akorigod@gmail.com>
2019-08-05 05:55:33 -07:00
Andrei Korigodski
4a330c6e0a commander: do not reboot on USB disconnect when armed
Signed-off-by: Andrei Korigodski <akorigod@gmail.com>
2019-08-05 05:55:33 -07:00
Daniel Agar
e69398c09f introduce uORB::PublicationQueued and transition most orb_advertise_queue usage 2019-08-04 10:08:09 -04:00
Matthias Grob
d0f1a551e9 manual_contol_setpoint: fix mode slot numbering (#12578)
* This fix is necessary because usually uORB structs get initialized with
all zeros and then get filled with the fields that are actually in use.
 * The number 0 for the mode slot was already commanding to switch to the
mode in slot one even though for example the joystick input via mavlink
does not use this mechanism at all.
2019-08-01 12:27:58 -04:00
Julian Oes
98dfa30838 commander: fix disarming for rovers
We have to ignore the landed flag for rovers, it doesn't really apply
for them.
2019-07-26 02:52:38 -07:00
Julian Oes
308d91e5ff commander: prevent potential disarms in-air
This fixes the terrifying case where the drone disarms in-air just
because it receives a MAVLink disarm command. We now check param2 for a
magic number which enforces arming/disarming.

This is added to the mavlink protocol in:
https://github.com/mavlink/mavlink/pull/1162
2019-07-26 02:52:38 -07:00
Matthias Grob
706500f19c Commander: make RC override multicopter only
AAs discussed in the devcall this functionality is only useful for
rotary-wing (multicopter) flying since it's a big safety hazard to
accidentally bring a fixed wing out of an auto mode e.g. a mission
and fly away in a straight line or into an obstacle.
2019-07-22 09:57:37 +02:00
Matthias Grob
5c1ab06343 Commander: pure refactor of RC override conditions 2019-07-22 09:57:37 +02:00
Daniel Agar
4e360064d9
commander refactor and cleanup offboard control mode 2019-06-15 20:45:26 -04:00
Timothy Scott
c4bb6b53e8 Changed soft stop check 2019-06-13 10:04:26 +02:00
Timothy Scott
21760a5856 Changed constant name to UNMANNED_GROUND_VEHICLE 2019-06-13 10:04:26 +02:00
Timothy Scott
714c90b9db Updated code style to fix confusing if conditions 2019-06-13 10:04:26 +02:00
Timothy Scott
a134da6e12 Removed is_rotor_wing, replaced with vehicle_type 2019-06-13 10:04:26 +02:00
Daniel Agar
6816f2a4ce
commander force offboard control update when first entering mode
- fixes #12241
2019-06-12 20:25:05 -04:00
bresch
33a94c8191 Failure detector - change snake_case function names to camelCase 2019-06-05 16:53:08 +02:00
bresch
03ad4ffd47 FailureDetector - Add is_failure() function to simplify the interface; the user does not need to check the bitmask 2019-06-05 16:53:08 +02:00
bresch
d3c9436f84 flight termination - rename in_flight_termination to flight_termination_triggered 2019-06-05 16:53:08 +02:00
bresch
59265f6663 Failure detector - Add flight termination comments, make format 2019-06-05 16:53:08 +02:00
bresch
81bb7888de Failure Detector - Add Failure Detector check to preflight checks 2019-06-05 16:53:08 +02:00
bresch
7b531bcaef Failure Detector - Play TONE_PARACHUTE_RELEASE_TUNE when force failsafe is set 2019-06-05 16:53:08 +02:00
bresch
ba93f9b983 FailureDetector - Update failure detector logic in commander. 2019-06-05 16:53:08 +02:00
Daniel Agar
3faab909d7 commander move most orb subscriptions to uORB::Subscription 2019-06-04 18:44:51 -04:00
bresch
2307c7c390 Geofence - Rename _warning_action_on to _geofence_warning_action_on
since it is only set by the geofence logic. Simplify conditions in IF
statements.
2019-06-04 08:35:56 +02:00
bresch
f8f967f073 Geofence - Change from "re-engage geofence failsafe every 10s when
outside the fence" to "engage geofence failsafe on transition". This
way, the pilot is not stucked in the non flight zone and can switch to
a manual mode and fly back or trigger RTL.
2019-06-04 08:35:56 +02:00
bresch
427b2e6636 Geofence - Do not trigger geofence failsafe while in low battery
failsafe action.
Also move geofence flags from static variables declared into the if
statement to private members of the class.
2019-06-04 08:35:56 +02:00
pedro-roque
a707403eaf mc_att_ctrl: added yawrate control from offboard.
This commit adds Roll Pitch Yawrate Thrust (RPYrT) setpoint control to the
PX4 stack, enabling the UAV to follow specific yawrates sent from
offboard. It also introduces individual body_rate flags, along the
lines of mavros.

Tested on a MoCap enabled flight arena in KTH Royal Institute of
Technology, Stockholm. The MAV receives RPYrT setpoints from an
external PID controller to stabilize around position setpoints.
The UAV is also externally disturbed to assess the stability to
external unmodeled events.

Fixed Kabir comments.

Removed deprecated ignore_bodyrate.

Fixed integration test.
2019-06-04 08:26:09 +02:00