13526 Commits

Author SHA1 Message Date
RomanBapst
447e14906c TECS: log more TECS states to enable better analysis
Signed-off-by: RomanBapst <bapstroman@gmail.com>
2021-01-13 21:21:07 +03:00
RomanBapst
d0e8b882a2 TECS: added alpha filter classes to energy rate and tas derivative
Signed-off-by: RomanBapst <bapstroman@gmail.com>
2021-01-13 21:21:07 +03:00
Julian Kent
be0f5a7fe4 Fix implicit float->double conversions in tests 2021-01-13 10:26:10 +01:00
Julian Kent
2d6758a39d Cleanup of dataman mocks and check interval definition 2021-01-13 10:26:10 +01:00
Julian Kent
a97a4d8bb8 Fix enum and param update 2021-01-13 10:26:10 +01:00
Julian Kent
c745c8bb45 Small navigator refactor/cleanup 2021-01-13 10:26:10 +01:00
Julian Kent
04d859e36e Fix test failure from parameter autosave starting WQ 2021-01-13 10:26:10 +01:00
RomanBapst
f97dcde4e2 GeofenceBreachAvoidanceTest: added tests for max dist to home
Signed-off-by: Julian Kent <julian@auterion.com>
2021-01-13 10:26:10 +01:00
RomanBapst
3fa15cec91 GeofenceBreachAvoidance: improve behavior when using max dist to home option
- ensure that the vehicle is loitering with sufficient clearance to the boundary

Signed-off-by: Julian Kent <julian@auterion.com>
2021-01-13 10:26:10 +01:00
RomanBapst
0ac597fba8 Use new GeofenceBreachAvoidance from Navigator
Signed-off-by: Julian Kent <julian@auterion.com>
2021-01-13 10:26:10 +01:00
RomanBapst
e536868104 Add GeofenceBreachAvoidance class
Signed-off-by: Julian Kent <julian@auterion.com>
2021-01-13 10:26:10 +01:00
Daniel Agar
a57b9f9381 delete drv_baro.h, drv_mag.h, drv_range_finder.h, drv_device.h and purge UAVCAN CDev usage 2021-01-12 22:04:52 -05:00
Daniel Agar
48f125f150 estimated IMU bias preflight checks
- commander preflightcheck use estimator_sensor_bias message instead of EKF state index magic number
 - ekf2 publish estimated bias limits in estimator_sensor_bias
 - preflightcheck only error if bias estimate exceeds half of configured limit (delete COM_ARM_EKF_AB and COM_ARM_EKF_GB parameters)
2021-01-12 09:09:42 +01:00
Daniel Agar
abec2bd8df
msg: estimator_status_flags shorten fields
- previously this message exceeded the logger total field length (1500 bytes)
2021-01-11 11:49:51 -05:00
Daniel Agar
04f9ada500
ekf2: selector improve fallback selection when the primary becomes unhealthy
- if an ekf instance becomes unhealthy prefer switching to the next best healthy instance on a different IMU
2021-01-11 09:38:26 -05:00
Daniel Agar
967d35a6b6
rate limit most parameter_update subscriptions
- parameter updates can be quite expensive because they trigger nearly all modules to reload all of their parameters immediately
 - limit modules from updating faster than once per second
2021-01-10 21:09:15 -05:00
bazooka joe
9b9163813d avoid re-initiate RTL or land in battery emergency
if the mode is already running
2021-01-10 21:19:52 +01:00
Matthias Grob
3cc8e7a210 commander_params: Make multicopter only COM_RC_OVERRIDE more visible 2021-01-10 21:12:09 +01:00
TSC21
cef3d36af2 simulator: delete PublicationMulti ptrs for sensor_gps 2021-01-10 19:58:54 +01:00
Daniel Agar
f73d93ef6c ekf2: selector improve status reporting
- publish estimator_selector_status at minimal rate or immediately on change
 - log all estimator_selector_status updates
2021-01-10 19:25:53 +01:00
Matthias Grob
2fc212e064 geofence_params: clarify EKF vs baro altitude source 2021-01-10 18:40:58 +01:00
Hamish Willee
d5c8d0a233 GF_ALTMODE: Update in line with Lorenz feedback 2021-01-10 18:40:58 +01:00
Hamish Willee
d43444fce7 geofence: GF_ALTMODE clarification 2021-01-10 18:40:58 +01:00
Muesli_Reep
fe7908feb0
Simulator: Added remote host option (#15443)
* Added an option to the Simulator module to connect to remote Gazebo servers.

This is usefull when the Gazebo simulation is running on a different host than the PX4 instance.
For example, we are running instances of PX4 with a companion application in multiple Dockers, for swarming simulations, which then connect to a remote Gazebo server.

A "-t" input argument has been added and can be called from the rcS startup script as: simulator start -t "192.168.178.122" $simulator_tcp_port

* _tcp_remote_ipaddr defaults to nullptr. This way testing against nullptr it can be determined if localhost or remote host is desired by the user.
* Documented the option in usage().

Signed-off-by: Peter Blom <peterblom.mail@gmail.com>
2021-01-10 18:37:37 +01:00
Jaeyoung-Lim
b3257c0bf2 Support relative altitude for offboard global position setpoints
Previously the coordinate_frame flag for setpoint_target_global_int message was not handled, resulting in the vehicle to not handle altitude correctly. This commit handles the relative altitude correctly.
2021-01-10 17:54:53 +01:00
Daniel Agar
662f177830 ekf2: multi instance numbering consistent with uORB publication instances 2021-01-09 13:20:26 -05:00
Daniel Agar
c3fc96fd42 uORB::PublicationMulti add get_instance() 2021-01-09 13:20:26 -05:00
Daniel Agar
b9a721726d
sensors/vehicle_magnetometer: respect calibration offset update success
- the magnetometer calibration offset setter returns false if the new offset change is negligible
2021-01-08 15:34:48 -05:00
Silvan Fuhrer
706f806943 VTOL: standard VTOL and Tiltrotor manual MC throttle during transition
This sets the throttle of the Multicopter actuators to the throttle stick position
while in Stabilized, Acro or Manual mode.

Signed-off-by: Silvan Fuhrer <silvan@auterion.com>
2021-01-08 10:28:00 +01:00
xdwgood
802c68a62e Do not run transition flight task when not enable altitude control 2021-01-08 10:28:00 +01:00
Daniel Agar
bf330a51b2
sensors/vehicle_magnetometer: reduce offset update message length to fit 2021-01-08 01:22:31 -05:00
Thies Lennart Alff
eb60479e4c
UUV introduce param to skip controller (#15706)
* added skip_ctrl param to uuv

* fixed formatting
2021-01-08 06:50:40 +01:00
Daniel Agar
88f8da27ef
save learned mag bias per sensor (Multi-EKF support)
- handle saving the mag bias per sensor (across all estimator instances using that mag) in sensors/vehicle_magnetometer
 - this is now saving back to the actual mag calibration CAL_MAGn_OFF{X,Y,Z}
 - ekf2 reset mag mag bias on any magnetometer or calibration change
 - use Kalman filter scheme to update stored mag bias parameters using all available bias estimates for that sensor

Co-authored-by: Paul Riseborough <gncsolns@gmail.com>
2021-01-07 09:54:13 -05:00
Matthias Grob
f435bea57c state_machine_helper: orbit failsafe just with data link loss
RC is like the comment says not required.
2021-01-07 13:31:05 +01:00
Jaeyoung-Lim
d2b0f63e1f Handle offboard mode with acceleration setpoints
The case when acceleration setpoints were being passed in offboard mode was triggering control_climbrate_mode. This prevented the vehicle from taking off, since it made the vehicle skip the rampup phase of the takeoff
This commit fixes this by handling the case properly
2021-01-06 20:38:18 +01:00
Paul Riseborough
64ed96bd95
ekf2: Correct airspeed used by EKF for calibration errors 2021-01-05 19:22:53 -05:00
Silvan Fuhrer
850d0bc588 vtol_type: remvoe const from function declaration
Signed-off-by: Silvan Fuhrer <silvan@auterion.com>
2021-01-04 15:32:00 +01:00
RomanBapst
0871f0f52d vtol: refactor of maximum pwm value settings for main and alternate motors
- main motors are the ones which are meant to be used as propulsion in fw mode
- alternate motors are the ones usually meant to be switched off in fw mode

Signed-off-by: RomanBapst <bapstroman@gmail.com>
2021-01-04 15:32:00 +01:00
Silvan Fuhrer
92634e7549 RTL: during climb, set NAV_CMD_WAYPOINT for RW modes, NAV_CMD_LOITER_TO_ALT for FW
Do not use LOITER_TO_ALT for rotary wing mode as it would then always climb to
at least MIS_LTRMIN_ALT, even if current clib altitude is below
(e.g. RTL immediately after take off)

Signed-off-by: Silvan Fuhrer <silvan@auterion.com>
2021-01-04 11:58:16 +01:00
Silvan Fuhrer
0b86c11c66 FW POS: remove setting of curr_sp to LOITER if next wp invalid
Signed-off-by: Silvan Fuhrer <silvan@auterion.com>
2021-01-04 11:58:16 +01:00
Silvan Fuhrer
55a1d090a1 RTL: use NAV_CMD_LOITER_TO_ALT for Climb state
Signed-off-by: Silvan Fuhrer <silvan@auterion.com>
2021-01-04 11:58:16 +01:00
RomanBapst
68f27ba7b7 navigator: deactivate line following after backt-ransition and before landing
- especially when there are strong winds it's better to just go straight
to the landing point instead of trying to follow the planned path

Signed-off-by: RomanBapst <bapstroman@gmail.com>
2021-01-04 11:58:16 +01:00
RomanBapst
b63f756745 navigator: don't execute land pattern if vtol in rotary wing mode
- if vtol and in rotary wing mode then don't execute the mission landing
because it's designed to be flow as a fixed wing
- if vtol and in rotary wing mode and mission land is available then fly directly
to landing point and don't go home!

Signed-off-by: RomanBapst <bapstroman@gmail.com>
2021-01-04 11:58:16 +01:00
RomanBapst
6c3f413379 mission: reset work_item_type during mission inactivation
- this fixes a race condition which happens when an RTL is triggered
during the final approach of a mission landing. In that case the mission inactive
method is never called.

Signed-off-by: RomanBapst <bapstroman@gmail.com>
2021-01-04 11:58:16 +01:00
RomanBapst
b63f202b3c various fixed for bugs encountered during testing
Signed-off-by: RomanBapst <bapstroman@gmail.com>
2021-01-04 11:58:16 +01:00
RomanBapst
cfb3cdc82f rtl: use math namespace
Signed-off-by: RomanBapst <bapstroman@gmail.com>
2021-01-04 11:58:16 +01:00
RomanBapst
94d3ab28ee rtl: fixed computation of return altitude when mission landing is available
Signed-off-by: RomanBapst <bapstroman@gmail.com>
2021-01-04 11:58:16 +01:00
RomanBapst
12875f7869 mission: when land start marker present, look for loiter to altitude item
instead of using the previous waypoint as landing target
- the previous waypoint could be miles away

Signed-off-by: RomanBapst <bapstroman@gmail.com>
2021-01-04 11:58:16 +01:00
RomanBapst
e0c394a00b mission: fixed bug in computation of landing altitude
Signed-off-by: RomanBapst <bapstroman@gmail.com>
2021-01-04 11:58:16 +01:00
RomanBapst
a4a03e86da mission: be more intelligent about saying that we are on a mission landing
- previously the decision of being on a landing pattern was taken by just
looking at the current mission index. However, even if the current mission
index indicates a landing pattern the vehicle could be at an arbitrary location, far
from being established on the pattern.

Signed-off-by: RomanBapst <bapstroman@gmail.com>
2021-01-04 11:58:16 +01:00