23491 Commits

Author SHA1 Message Date
Silvan Fuhrer
cba80a6338 Tiltrotor: front transition: fade out yaw equally to roll
Signed-off-by: Silvan Fuhrer <silvan@auterion.com>
2021-10-15 09:58:48 +02:00
Silvan Fuhrer
641383cbfb VTOL backtransition improvements
* vtol_type: only allow positive pitch setpoints during backtransition

* vtol params: set default of VT_B_DEC_FF to 0, as for most frames a FF is not necessary

* Tiltrotor: fix throttle during first part of back transition

* Tiltrotor: only enable all motors in second phase of backtransition (tilting phase)

Signed-off-by: Silvan Fuhrer <silvan@auterion.com>
2021-10-15 09:58:48 +02:00
RomanBapst
af291e2040 FlightTaskTransition: Transition improvements
- use fw pitch setpoint offset during transition
- take over previous vertical velocity and smooth out over transition

Signed-off-by: RomanBapst <bapstroman@gmail.com>
2021-10-15 09:58:48 +02:00
Silvan Fuhrer
d39c32619e Tiltrotor: add minimum throttle of 0.25 during front transition
Signed-off-by: Silvan Fuhrer <silvan@auterion.com>
2021-10-15 09:58:48 +02:00
RomanBapst
f61853d428 vtol: implement throttle blending out and into transition
- blend into TECS throttle after front transition
- blend out of TECS throttle during backtransition

Signed-off-by: RomanBapst <bapstroman@gmail.com>
2021-10-15 09:58:48 +02:00
RomanBapst
8dd76050e0 vtol: take fixed wing attitude setpoint during transition if altitude is
not controlled

- required as there is no flightask running if altitude is not controlled

Signed-off-by: RomanBapst <bapstroman@gmail.com>
2021-10-15 09:58:48 +02:00
Daniel Agar
12c7056ae5 drivers/imu: icm20602/icm20649/icm20948 remove timestamp_sample adjustments 2021-10-14 16:37:11 -04:00
Daniel Agar
56823b5ac9 ekf2: EKF control don't allow invalid flow gyro to propagate 2021-10-14 16:31:22 -04:00
Daniel Agar
d35cf78e4a commander: PX4_ERR if attitude or angular velocity become invalid 2021-10-14 09:17:50 -04:00
Daniel Agar
4559230de6 drivers/imu/invensense: adjust icm20602/icm20649/icm20948 rescheduling logic
- this handles the case where the driver might be more than one full
transfer cycle behind
2021-10-14 09:17:11 -04:00
Daniel Agar
ef4d4c3093 sensors/vehicle_imu: fix timestamp_sample increasing check 2021-10-14 09:12:45 -04:00
Jaeyoung-Lim
4535b18a80 Set setpoint type as const 2021-10-14 11:18:02 +02:00
Jaeyoung-Lim
07d72f8604 Fix comments 2021-10-14 11:18:02 +02:00
Jaeyoung-Lim
443666199e Move setmode outside of control_position
This commit moves the position controller mode handling outside of the control_position method.

The control_method is renamed to control_auto
2021-10-14 11:18:02 +02:00
Jaeyoung-Lim
ae9e91f90c FW Pos controller: fix format in new switch
Signed-off-by: Silvan Fuhrer <silvan@auterion.com>
2021-10-14 11:18:02 +02:00
Silvan Fuhrer
c3e961a1ed FW Pos C: move setting of control_mode_current to separate function and minor clean ups
Signed-off-by: Silvan Fuhrer <silvan@auterion.com>
2021-10-14 11:18:02 +02:00
Silvan Fuhrer
0cf3ef87e3 FW Position Controller: move nav_speed_2d calculation to function
Signed-off-by: Silvan Fuhrer <silvan@auterion.com>
2021-10-14 11:18:02 +02:00
Jaeyoung-Lim
581ec224be Encapsulate loiter and position setpoint handling
This commit encapsulates the position setpoint and loiter setpoint handling into a single method, in order to make the code easier to understand
4be452
2021-10-14 11:18:02 +02:00
Thomas Debrunner
f08f2a340d motion_planning: In VelovitySmoothing, mark const functions const 2021-10-13 21:25:43 -04:00
Thomas Debrunner
fed234de81 flight_mode_manager: Extracted position trajectory motion planning into a library
Extract the functionality to plan smooth position motion trajectories into a
motion planning library, such that it can be used in other parts of the code as well.
2021-10-13 21:25:43 -04:00
Peter van der Perk
07303af8f8 UAVCANv1 Fix typo in #define 2021-10-13 21:22:15 -04:00
Peter van der Perk
ed394027b1 UAVCANv1 Include Kconfig & Fix #18396 2021-10-13 21:22:15 -04:00
Matthias Grob
8b37db7825 Functions: fix corner case x_low == x_high == value resulting in NAN
and added unit test to cover it
2021-10-13 17:24:16 -04:00
alexklimaj
f5e1da5b0f Fix broadcom afbrs50 build 2021-10-13 17:22:26 -04:00
Jukka Laitinen
351f679c2f parameters: Use px4::atomic_bool instead of px4::atomic<bool>
This enables us to define the actual atomic bool type in px4_platform

Signed-off-by: Jukka Laitinen <jukkax@ssrc.tii.ae>
2021-10-13 15:01:26 -04:00
Jukka Laitinen
e6658547cf sensors/vehicle_imu: Fix compiler warning for implicit INFINITY double->float cast
This pops up on some newer compilers

Signed-off-by: Jukka Laitinen <jukkax@ssrc.tii.ae>
2021-10-13 15:01:26 -04:00
Jukka Laitinen
5509235517 commander: Fix implicit NaN conversion from double to float compiler warning
Signed-off-by: Jukka Laitinen <jukkax@ssrc.tii.ae>
2021-10-13 15:01:26 -04:00
Mathieu Bresciani
56b0c46444
ekf2: improve optical flow angular rate compensation 2021-10-12 13:17:29 -04:00
Daniel Agar
fab053d33b mavlink: receiver battery_status prevent out of bounds access
- fixes https://github.com/PX4/PX4-Autopilot/issues/18385
2021-10-12 09:20:40 -04:00
Silvan Fuhrer
801ef2d520 VTOL main: add local variable for int(vehicle_command.param1 + 0.5)
Signed-off-by: Silvan Fuhrer <silvan@auterion.com>
2021-10-11 18:15:18 +02:00
Silvan Fuhrer
342e9900f8 vtol main: only guard against transition to FW in certain flight modes, never to MC
Signed-off-by: Silvan Fuhrer <silvan@auterion.com>
2021-10-11 18:15:18 +02:00
RomanBapst
8f8304f31e FixedWingPositionController: Set l1 variables to NAN if no l1 guidance
took place

Signed-off-by: RomanBapst <bapstroman@gmail.com>
2021-10-11 16:41:42 +02:00
RomanBapst
ae5d3103f4 fw l1 controller: added a flag to indicate if navigation has updated
- can be used to check if l1 controller ran during a cycle

Signed-off-by: RomanBapst <bapstroman@gmail.com>
2021-10-11 16:41:42 +02:00
Shubham Shah
99b098f608 Update FixedwingAttitudeControl.cpp 2021-10-09 19:39:43 -04:00
Shubham Shah
c92cd65831 Update EKF2.cpp 2021-10-09 19:39:43 -04:00
Shubham Shah
6576e1fda9 Update battery_status.cpp 2021-10-09 19:39:43 -04:00
Shubham Shah
b56bd7cb21 Update AirspeedValidator.cpp 2021-10-09 19:39:43 -04:00
Shubham Shah
47a72a6b7b Update vtol_att_control_main.cpp 2021-10-09 19:39:43 -04:00
Shubham Shah
9fd19a2c83 Update standard.cpp 2021-10-09 19:39:43 -04:00
Shubham Shah
af34b21ba8 Update tiltrotor.cpp 2021-10-09 19:39:43 -04:00
Jacob Dahl
98f655815a
mavlink: add LAND_TARGET stream 2021-10-09 10:29:02 -04:00
Daniel Agar
4be45229bf fw_pos_control_l1: fix launch detector dt update
- fixes https://github.com/PX4/PX4-Autopilot/issues/18354
2021-10-08 17:34:14 -04:00
Daniel Agar
089f96f800 lib/drivers/{accelerometer,gyroscope} skip obselete Vector3f construction
- FIFO clip count only check if value is INT16_MIN/MAX rather than abs() call
2021-10-08 17:33:27 -04:00
Jacob Dahl
fd39d5b9a1
drivers/distance_sensor/lightware_laser_serial: add LW20/C support 2021-10-08 17:30:41 -04:00
Igor Mišić
47dc2ae5a5 Revert "protocol_splitter: delete non rtps or mavlink data from buffer"
This reverts commit 0cae3c129dd751e92ef5785ad7ba2b86ce14e4f3.
2021-10-08 14:35:12 -04:00
alexklimaj
2ba369dd54 Add uavcannode fix2 mode and submode 2021-10-08 11:00:37 -04:00
Peter van der Perk
d8e88aedc6 motor_ramp ram cleanup 2021-10-08 10:51:06 -04:00
Nicolas Martin
ba66f8a1e2 reset hover thrust value in controllers when disarmed
During landing, hover thrust value can be very incorrect so it should be
reset before taking off
2021-10-08 10:39:49 +02:00
bresch
ba1b7f3a07 CA pseudo inverse: set all small elements in CA matrix to zero
This avoids problems in the sequencial desaturation method where vectors
of the CA matrix are used to desaturate the motors.
2021-10-08 09:35:40 +02:00
bresch
984a698760 matrix: update to include min/max of slices 2021-10-08 09:35:40 +02:00