Commit Graph

13550 Commits

Author SHA1 Message Date
Ricardo Marques 78c05275d2 tailsitter: Fix differential thrust in FW mode.
Signed-off-by: Ricardo Marques <marques.ricardo17@gmail.com>
2021-01-18 09:04:27 +01:00
David Jablonski 2ed48f041c mavlink: Templated SCALED_IMU mavlink stream 2021-01-17 12:32:51 -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
bresch eaa2ae9dc9 ekf2: add param to enable synthetic mag Z fusion mode 2021-01-17 12:06:59 +01:00
bresch 983234e29d ekf2: add param to set rng check hysteresis 2021-01-17 12:06:59 +01:00
Silvan Fuhrer 195a900ecf change default of RTL_LAND_DELAY to 0
Signed-off-by: Silvan Fuhrer <silvan@auterion.com>
2021-01-17 12:05:30 +01:00
Silvan Fuhrer cee4016665 Preflight checks: Airspeed checks update
-check for valid airspeed_validated (declared valid plus updated less than 1s ago)
-added param (COM_ARM_ARSP_EN) to enable/disable check for max airspeed for arming set max
airspeed limit to half of stall airspeed

Signed-off-by: Silvan Fuhrer <silvan@auterion.com>
2021-01-16 10:26:55 -05:00
Matej Frančeškin ba6a8080ea mavlink: don't respond to MAV_CMD_REQUEST_MESSAGE if component doesn't match
PX4 is responding with NACK to MAV_CMD_REQUEST_MESSAGE from a GCS to
payload-manager which confuses a GCS.
PX4 shouldn't respond to commands that are not broadcasted or specificaly
addressed to it.
2021-01-15 10:57:20 -05:00
Julian Oes 5ae5c03c66 mavlink: handle param4/5 from mission_item_int
It turns out that we did not properly handle param4 and param5 if they
are transferred using mission_item_int if the frame is
MAV_FRAME_MISSION.
2021-01-15 10:57:20 -05:00
Thomas df41c99b61 make failsafe handling consistent over all VTOL types 2021-01-15 09:19:07 +03:00
Thomas 38e46ff341 Rename VtolAttitudeControl::abort_front_transition(const char *reason) to VtolAttitudeControl::quadchute(const char *reason) 2021-01-15 09:19:07 +03:00
Thomas Stauber 40fbfdc054 Undo make format change
Co-authored-by: Matthias Grob <maetugr@gmail.com>
2021-01-15 09:19:07 +03:00
Thomas 83ddb77a5f delete excess empty lines 2021-01-15 09:19:07 +03:00
Thomas b90fafd5cd Fix quadchute logic so that it also works during back transition 2021-01-15 09:19:07 +03:00
Daniel Agar a0d8d5ac74 sensors/vehicle_gps_position: untangle and remove unnecessary state 2021-01-13 20:17:49 -05:00
RomanBapst f05599caff tecs: use speed derivative provided by local position
Signed-off-by: RomanBapst <bapstroman@gmail.com>
2021-01-13 21:21:07 +03:00
Silvan Fuhrer dca89763b3 TECS: apply FW_LND_THRTC_SC to altitude error time constant
Signed-off-by: Silvan Fuhrer <silvan@auterion.com>
2021-01-13 21:21:07 +03:00
Silvan Fuhrer 3d3ff75495 TECS: update some params to latest results from flight testing
Signed-off-by: Silvan Fuhrer <silvan@auterion.com>
2021-01-13 21:21:07 +03:00
Silvan Fuhrer 2ca4269464 TECS: separate integral gains for throttle and pitch loops
Signed-off-by: Silvan Fuhrer <silvan@auterion.com>
2021-01-13 21:21:07 +03:00
Silvan Fuhrer 72dfb2078a TECS: adapt params to new control structure
Signed-off-by: Silvan Fuhrer <silvan@auterion.com>
2021-01-13 21:21:07 +03:00
RomanBapst 01f891618b TECS: move to new control loop architecture
Signed-off-by: RomanBapst <bapstroman@gmail.com>
2021-01-13 21:21:07 +03:00
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