12868 Commits

Author SHA1 Message Date
Hamish Willee
8236b8da81 Fix up doc links to point to master branch 2020-04-21 08:58:40 +02:00
bresch
c05b70bf86 MPC: initialize hover thrust with parameter even if using HTE
The hover thrust estimator (HTE) starts to run after the first thrust
setpoint is published. Until then, the feedforward of the vertical
velocity controller was unitialized (= 0). This is now set to hover
thrust parameter until the estimate is available.
2020-04-20 20:54:31 +02:00
Todd Colten
7c533e5a53
commander: Clarify airspeed calibration failure warning msg 2020-04-18 13:02:29 -04:00
Matthias Grob
ffa9fdbd56 posix rcS: always disable CPU load check 2020-04-17 18:25:07 +02:00
flbernier
2fca03e1bd Update default rover parameters Ki and Kd 2020-04-17 08:18:10 +02:00
flbernier
45e88aa8d3 Correct Ki and Kd inversion in rover pid_set_parameters 2020-04-17 08:18:10 +02:00
Matthias Grob
8b76c0c023 PreFlightCheck: add checks for CPU and RAM load 2020-04-16 11:45:50 +02:00
mcsauder
6548fde024 Whitespace cleanup to quiet new blank line at EOF git hook. 2020-04-15 23:00:39 -04:00
Julian Oes
d67ecc971c
commander: add check for VTOL airfame on fmu-v2 (#14633)
* commander: add check for VTOL airfame on fmu-v2

This adds a preflight check when a VTOL airframe is configured
on a fmu-v2 where VTOL is no longer included.

* commander: address code review comments
2020-04-15 21:20:42 +02:00
Daniel Agar
b761060c9b perf counters fix perf free and cleanup naming 2020-04-15 16:22:06 +02:00
Daniel Agar
dc2254aa34 WIP: mavlink send hacks 2020-04-15 16:22:06 +02:00
baumanta
050d5de93b add home pos check into global pos check 2020-04-15 11:02:48 +02:00
baumanta
9710289f5f PreFlightCheck: check for RC action switches 2020-04-15 11:02:48 +02:00
Julian Oes
e2b8fd7b11 commander: fix preflight check spam 2020-04-14 10:17:43 -04:00
RomanBapst
338dd45022 vtol: do not control deceleration during backtransition manual, acro or stabilized
Signed-off-by: RomanBapst <bapstroman@gmail.com>
2020-04-14 11:25:09 +02:00
Daniel Agar
7b4f6b6918 sensors/vehicle_angular_velocity: check filter based on time threshold instead of samples
- fixes #14303
2020-04-11 16:07:11 -04:00
Daniel Agar
322671ea27 mc_pos_control: align updates with ekf2 2020-04-10 13:04:06 -04:00
Matthias Grob
38093e4887 mc_pos_control: correct sign of acceleration state
Non-functional change, just change the sign in the correct place to
avoid further confusion.
2020-04-09 17:15:46 +02:00
baumanta
8b89cfc498 change RC action switch thresholds 2020-04-09 14:41:09 +02:00
daniele
38e635e386 navigator_main: allow altitude change when the current lat and lon are still nan
This is a corner case that happens when the user wants to command an
altitude change just after a takeoff. Takeoff doesn't set the current
lat and lon therefore the user had to change altitude twice to get it working.
The first time to set the current lat and lon and the second time to
actually change altitude.
2020-04-08 21:16:31 -04:00
daniele
6ea60b5165 geofence: reposition to current location when violating geofence in hold mode
This can only happen if the vehicle is executing a go to.
2020-04-08 21:16:31 -04:00
daniele
d53dccc319 reposition (goto): add check if goto location is outside the geofence
Before this check we were free to fly outside of a geofence with a goto
command. With this check we ignore the command if the location of the goto
is outside the fence. If this is the case we send back a mavlink warning to
the ground station.
2020-04-08 21:16:31 -04:00
daniele
6b97361c92 add dummy if statement to avoid messing up the pr review 2020-04-08 21:16:31 -04:00
Silvan Fuhrer
4e3f65e376 disable spinup tilt sequence if spinup tilt parameter is set to 0
Signed-off-by: Silvan Fuhrer <silvan@auterion.com>
2020-04-08 21:12:53 -04:00
Silvan
7e4a53f292 VTOL tiltrotor: introduce spin up time with spin up tilt angle
As some tiltrotor systems need a certain tilt angle of their motors in oder to spin up freely,
this commit introduces an additional parameter VT_TILT_SPINUP and sets the motor tilt to
this value if disarmed or within 1s since arming.

The spinup consists of 2 phases:
    1st phase fixed tilt (duration hardcoded to 1s)
    2nd phase transition from spinup tilt to multicopter tilt (hardcoded to 0.5s)

Signed-off-by: Silvan Fuhrer <silvan@auterion.com>
2020-04-08 21:12:53 -04:00
Lorenz Meier
18e78261ab Commander: Add more documentation around USB reboots
If the user disconnects USB we reboot the system to bring it back into a nominal condition before arming. Otherwise we would either have the USB stack running without a cable connected (code running for no reason, which is violating the principle of not running unnecessary code in aviation). Or we would not allow to arm at all if USB was ever connected, which can be confusing if the system is powered off a battery.
2020-04-08 14:11:09 -04:00
Nico van Duijn
59bd3e9f6e Change defaults for MPC_LAND_ALT 2020-04-08 11:52:01 -04:00
Beat Küng
6b0a2649c0 commander: set home position on takeoff
instead of when arming and on takeoff.

It is set on the first takeoff or if there was a disarm event between the
last and the current takeoff.
2020-04-08 14:59:26 +02:00
Beat Küng
80f0892de5 fix commander: set _was_landed before _land_detector topic update
Before _was_landed was set to the same value as the current
_land_detector.landed, thus outside of the update condition,
_was_landed && !_land_detector.landed could never be true.

This affects setting the home position, which is now set upon arming AND
upon takeoff.
2020-04-08 14:59:26 +02:00
Beat Küng
aa6f9280e1 fix commander: set _have_taken_off_since_arming when !landed upon arming
If arming and already !landed, _have_taken_off_since_arming will not be set
and thus auto-disarm after 10s will be triggered (with default config).

This can only happen due to quick state changes, as land detector generally
sets landed=true if !armed.
2020-04-08 14:59:26 +02:00
Daniel Agar
cf37be8c44
ekf2 handle accelerometer clipping
- track clipping per IMU axis and pass through to ecl/EKF
 - update ecl/EKF to include delta velocity clipping changes (PX4/ecl#663)
2020-04-07 20:11:08 -04:00
Beat Küng
4e0441ab0b logger: add data format version tag 2020-04-07 09:59:12 -04:00
Julien Lecoeur
7b12a21565
mavlink: Enable offboard attitude for coaxial airframes 2020-04-07 09:23:03 -04:00
Beat Küng
08bfeb3dc7 mavlink: fix potential busy loop upon USB disconnect
When disconnecting USB poll returns successfully, but the read returns
-1 with ENOTCONN.
In addition this also ensures there's no busy loop when poll returns an
error.

MAVLink continues to work after reconnecting USB.
2020-04-06 12:42:10 -04:00
Claudio Micheli
4cdc58ce8d EscBattery: only publish data if all the ESCs are online
Signed-off-by: Claudio Micheli <claudio@auterion.com>
2020-04-06 15:56:54 +02:00
Julian Oes
c1884975ed esc_battery: several review fixes
Thanks @bkueng.
2020-04-06 15:56:54 +02:00
Julian Oes
ae219c3272 esc_battery: fix timeout check 2020-04-06 15:56:54 +02:00
Julian Oes
f650b91718 battery: check source param inside battery lib
This moves the handling of the BAT%d_SOURCE param inside of the battery
library. Users of the library now pass the source instead of the flag
whether to publish. The battery library then checks if the source is
selected using the param and publishes accordingly.

Since we removed the strange system_source flag, we now need to look at
all batteries in commander.
For current estimation - I think - it makes sense to sum them up.
2020-04-06 15:56:54 +02:00
Julian Oes
b01cdafcf6 boards: add esc_battery to build 2020-04-06 15:56:54 +02:00
Julian Oes
509b8b6b4b First skeleton for esc_battery module 2020-04-06 15:56:54 +02:00
Matthias Grob
ab6606aa46 PreFlightCheck: fix magnometer typo 2020-04-02 13:53:47 +02:00
RomanBapst
2522435f9c vtol_att_control: got rid of VT_B_DEC_SP
Signed-off-by: RomanBapst <bapstroman@gmail.com>
2020-04-02 13:45:52 +03:00
Roman Bapst
47f0e91076 Apply suggestions from code review
Co-Authored-By: Mathieu Bresciani <brescianimathieu@gmail.com>
2020-04-02 13:45:52 +03:00
RomanBapst
005bc97959 tiltrotor: enable l1 and deceleration control during transition
Signed-off-by: RomanBapst <bapstroman@gmail.com>
2020-04-02 13:45:52 +03:00
RomanBapst
a916cc2a26 better comments
Signed-off-by: RomanBapst <bapstroman@gmail.com>
2020-04-02 13:45:52 +03:00
RomanBapst
0184d8196f vtol_type: calculate backtransition acceleration in forward direction
- use track angle to calculate the current forward acceleration

Signed-off-by: RomanBapst <bapstroman@gmail.com>
2020-04-02 13:45:52 +03:00
RomanBapst
47b5d51369 vtol_type: added explicit control over deceleration during backtransition
Signed-off-by: RomanBapst <bapstroman@gmail.com>
2020-04-02 13:45:52 +03:00
RomanBapst
b6a80253d7 run l1 during transition 2020-04-02 13:45:52 +03:00
Beat Küng
1f60a86d32 fix commander: need to copy all battery states in a cycle
Previously if in a cycle only a disconnected battery status updated, the
battery health state would switch to unhealthy during that time.

Fixes intermittent 'Arming denied! Check battery' preflight failures on
v5x with 1 power module connected.
2020-04-02 12:42:00 +02:00
Matthias Grob
70c28c7274 mc_pos_control_params: update MPC_POS_MODE description
- remove deprecated sport mode
- clarify wording
2020-04-02 11:52:44 +02:00