14130 Commits

Author SHA1 Message Date
Beat Küng
6a44fc7cac fix vtol_att_control: set _current_max_pwm_values to current values on init 2021-07-02 00:53:42 -04:00
Thies Lennart Alff
cacab75b42 define decimals for uuv_att_control gains
decimal for the uuv_att_control gain parameters was not defined. So
QGroundControl displays them as integers what is rather unhandy.
2021-07-01 11:08:16 -04:00
Matthias Grob
f41c294028 BatterySimulator: No need to explicitly mention throttle being set to zero 2021-07-01 14:24:38 +02:00
Matthias Grob
b824f33ae9 battery: publish measured values also when battery not connected 2021-07-01 14:24:38 +02:00
Daniel Agar
d87cd171f4 sensors/vehicle_imu: continue integrating gyro if there's a gap in data
- minor improvement that helps to determine the sensor publication rate
as soon as possible
2021-06-30 09:13:49 -04:00
Daniel Agar
982692f5ed ekf2: selector handle NAN test ratios as uninitilaized
- requires https://github.com/PX4/PX4-ECL/pull/1020
2021-06-29 21:36:24 -04:00
Daniel Agar
f0d8d53da6
sensors/vehicle_imu: minor IMU integration improvements
- IMU integrator set max dt based on final return size (uint16)
 - improve integration consuming gyro as needed then integrate all available accel until caught up
 - increase required number of samples for sensor rate measurement (online Welford mean)
2021-06-29 10:43:09 -04:00
Matthias Grob
5ac5399d83 Remove horizontal slow down close to ground
Because based on the numerous complaints it was disabled by default
(only velocities above 10m/s were limited)
and since then no one intentionally used it anymore. But
there were some minor investigations of drones not reaching
their maximum speed which always showed 10m/s.
2021-06-25 11:15:41 +02:00
Matthias Grob
055c9db178 state_machine_helper: allow takeoff and hold without any link 2021-06-25 10:46:43 +02:00
Matthias Grob
15096ead5f state_machine_helper: explicitly notify about rca and data link loss 2021-06-25 10:46:43 +02:00
Matthias Grob
bec9eef5b0 state_machine_helper: react on link losses during takeoff
The same way like in loiter. This should be further unified in the code
but at least we can increase safety in the case the takeoff altitude is
very high and the vehicle never reaches it but looses links.
2021-06-25 10:46:43 +02: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
933d31b476 commander_params: correct parameter group from Mission to Commander 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
Mathieu Bresciani
9cedb169fc
HTE: relax validity condition when already valid (#17783)
The condition to get valid requires a low variance and test ratio. but
to stay valid, only the variance is required.

Co-authored-by: Daniel Agar <daniel@agar.ca>
2021-06-23 07:33:11 +02:00
Matthias Grob
0dee7af81f ekf2_params: enable baro ground effect compensation by default 2021-06-22 10:32:54 +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
TSC21
9fb53d4276 microRTPS: add option to build the microRTPS agent after its generation 2021-06-21 16:36:44 +02:00
Igor Mišić
39909128ec micrortps_client: increased stack size by 250B
Co-authored-by: Nuno Marques <n.marques21@hotmail.com>
2021-06-21 16:36:44 +02:00
TSC21
6d5f12d2a2 microRTPS: client: add TX rate limiter 2021-06-21 16:36:44 +02:00
TSC21
ac2b38603c microRTPS: client: add missing "-p" option for the UART poll timeout and use microsecs for the send/rcv thread sleeps 2021-06-21 16:36:44 +02:00
TSC21
0cc79f3e48 microRTPS: client: show diagnostic of current bandwidth usage on the 'status' option 2021-06-21 16:36:44 +02:00
TSC21
d6ee15596d microRTPS: client: show diagnostic of average bandwidth usage on the 'status' option 2021-06-21 16:36:44 +02:00
Pieter-Jan Dewitte
155d3c7d36 FW pos control: fix airspeed input constaining 2021-06-21 10:55:21 +02:00
Claudio Micheli
b1829e5766
Predict and use braking distance when Pausing auto modes (for multicopters) (#17269) 2021-06-18 10:45:03 +02:00
Daniel Agar
76a8617529
sensors: fix IMU init race condition
- IMU init requires valid published data (device ids, etc)
 - orb_group_count will include advertised instances before data is published, so this can't be used to throttle IMU init attempts
2021-06-17 10:38:33 -04:00
Beat Küng
14ec7a0d93 mavlink: tcflush() uart before closing it
On NuttX with flow control, if no one was reading from the uart, the
close() call would block indefinitely waiting for data to be sent.
2021-06-17 09:40:57 -04:00
David Sidrane
028ae9561d logger:watchdog Track NuttX file reorg 2021-06-16 17:07:47 +02:00
David Sidrane
026d36dee8 microRTPS:Use inttypes 2021-06-16 17:07:47 +02:00
David Sidrane
8d078eb02e vtol_att_control:Fix type 2021-06-16 17:07:47 +02:00
David Sidrane
bec5d6de9b vmount:Use inttypes 2021-06-16 17:07:47 +02:00
David Sidrane
350e43f02c dataman:fix types 2021-06-16 17:07:47 +02:00
David Sidrane
77082188d8 temperature_calibration:Use inttypes 2021-06-16 17:07:47 +02:00
David Sidrane
d73f842151 sensors:Use inttypes 2021-06-16 17:07:47 +02:00
David Sidrane
274c55a4ae navigator:mission Use inttypes 2021-06-16 17:07:47 +02:00
David Sidrane
65d026d45c mavlink:Use inttypes 2021-06-16 17:07:47 +02:00
David Sidrane
5faa116681 logger:Use inttypes 2021-06-16 17:07:47 +02:00
David Sidrane
3b725e5525 gyro_fft:Use inttypes 2021-06-16 17:07:47 +02:00
David Sidrane
07fbf8681d gyro_calibration:Use inttypes 2021-06-16 17:07:47 +02:00
David Sidrane
85f4f13e8a flight_mode_manager:Use inttypes 2021-06-16 17:07:47 +02:00
David Sidrane
9a423e222b ekf2:Use inttypes and fix types 2021-06-16 17:07:47 +02:00
David Sidrane
ed474794cc commander:Use inttypes 2021-06-16 17:07:47 +02:00
David Sidrane
a3593d7d07 analog_battery:Use inttytpes 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
Jukka Laitinen
b550ad22b9 EKF2: Always publish global position
For historical reasons, there is a check in EKF2 to only publish global
position if it has moved for 1mm.

This is no longer necessary, and also this if doesn't save any cpu cycles
in real conditions where GPS errors are always much bigger that this.

When using simulated or fake GPS, based on some other positioning
system, the GPS coordinate input can be very accurate due to quantization
or true accuracy. In this case this check bites and perfectly valid position
doesn't get published.

Just removed this if.

Signed-off-by: Jukka Laitinen <jukkax@ssrc.tii.ae>
2021-06-15 10:55:39 +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
Beat Küng
615e1f3e29 mavlink: fix module doc for broadcast 2021-06-11 09:01:41 +02:00
Julian Oes
ca86416ce6 mavlink: don't read garbage target sysid/compid
This fixes a tricky bug that we discovered in MAVSDK:
https://github.com/mavlink/MAVSDK/pull/1464

It turns out the target_system and target_component fields can
potentially be:
1. at the end of a message payload,
2. and zero,

and therefore they get trimmed. When you then try to read it you
potentially read some garbage from the CRC fields.
2021-06-09 15:40:46 -04:00
bresch
514845592b en-/disable mc position controller using explicit control mode flag 2021-06-09 18:10:22 +02:00
Daniel Agar
328c5cb1cf mavlink: properly cleanup instance on exit 2021-06-09 10:58:34 -04:00