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
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
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
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
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
b18b7e84d2
CA pseudo-inverse: normalize control allocation matrix
2021-10-08 09:35:40 +02:00
bresch
927c0c4296
McRateControl: publish torque and thrust setpoint for control allocator
2021-10-08 09:35:40 +02:00
Peter van der Perk
ed5fee1a72
Backport #18311 mc atune
2021-10-07 10:09:01 -04:00
Peter van der Perk
454c907b7d
Kconfig backport #18327 mag_bias
2021-10-07 10:09:01 -04:00
Peter van der Perk
4e4aabc03f
Update Kconfig after rebasing 03-05-21
2021-10-07 10:09:01 -04:00
Peter van der Perk
d5e3e9a7bc
[Kconfig] Decompose Kconfig, now each module has its own Kconfig
...
Which is better for versioning and decomposability
2021-10-07 10:09:01 -04:00
Peter van der Perk
094d3557d7
Add Kconfig for Gyro calibration #17040
2021-10-07 10:09:01 -04:00
Peter van der Perk
7a747b43f6
Initial boardconfig working with FMUK66
2021-10-07 10:09:01 -04:00
Peter van der Perk
4b89ff29ce
PX4 full firmware Kconfig PoC
2021-10-07 10:09:01 -04:00
Silvan Fuhrer
a202bcbc73
VTOL: fix param description concerning VT_PITCH_MIN
...
Signed-off-by: Silvan Fuhrer <silvan@auterion.com>
2021-10-07 09:22:59 -04:00
Matthias Grob
b40dbd3d6f
FlightTaskAuto: hotfix filter for yawspeed feed-forward
...
to get rid of derivative spikes when navigator is
continuously updating the yaw setpoint in the
triplet for a POI but is running at a lower rate.
The proper solution is to generate that yaw setpoint
with high rate in the flight task and have the triplet
just guid to the next waypoint at low rate.
2021-10-06 14:06:58 -04:00
Daniel Agar
0bdcd54184
mavlink: reciever trajectory_representation_waypoints resepect valid_points
...
- fixes https://github.com/PX4/PX4-Autopilot/issues/18369
2021-10-06 13:45:15 -04:00
Silvan Fuhrer
31a599f303
Commander: add comment in COM_RC_OVERRIDE that it's always enabled in Descend mdoe
...
Signed-off-by: Silvan Fuhrer <silvan@auterion.com>
2021-10-06 11:32:23 -04:00
Silvan Fuhrer
eeb6244c6b
Commander: add wind speed warning
...
Publishes periodically (max every 1 min) a warning if the current wind estimate
is above COM_WIND_WARN.
Signed-off-by: Silvan Fuhrer <silvan@auterion.com>
2021-10-06 11:31:13 -04:00
Silvan Fuhrer
1a4ce136f3
Tiltrotor: add hover tilt offset to pusher assist tilt
...
Signed-off-by: Silvan Fuhrer <silvan@auterion.com>
2021-10-06 11:27:19 -04:00
Silvan Fuhrer
4e3fa7cf35
VTOL: rework forward actuation assist
...
-allow positive pitch offsets in hover
-add param for min pitch during LAND
Signed-off-by: Silvan Fuhrer <silvan@auterion.com>
2021-10-06 11:27:19 -04:00
Silvan Fuhrer
f0de88fada
vtol_type: fix motor_state::VALUE
...
Signed-off-by: Silvan Fuhrer <silvan@auterion.com>
2021-10-06 11:26:39 -04:00
Matthias Grob
a461bb971a
FlightTask: preserve vertical velocity during reactivation
...
to allow descending by stick for reliable land detection.
Issue:
Stick smoothing gets completely reset to state when not taken off
-> downwards velocity setpoint is gone when not taken off
-> in_descend flag of land detection is never true when not taken off
-> when landing but falling out of landing it landing detection fails
bafore taking off and landing again
2021-10-06 11:25:51 -04:00
Matthias Grob
c20e5e3a00
FlightTaskManualAltitudeSmoothVel: remove separate reactivate handling
...
It was added before the activation was able to work with the previous
setpoint.
2021-10-06 11:25:51 -04:00
Matthias Grob
9b92862980
MulticopterLandDetector: correct in_descend comment
2021-10-06 11:25:51 -04:00
bresch
d95e387d79
angular acceleration: change 2nd order to 1st order LPF
...
Having a 2nd order low-pass filter in the derivative loop reduces
stability at low cutoff values as too much phase is lost through
the filter. Using a 1st order filter avoids this issue because its
maximum phase loss is 90 degrees instead of 180 degrees for a 2nd order
lpf.
2021-10-06 16:26:03 +02:00
Daniel Agar
ddd1dea4f0
ekf2: avoid uint64 timestamp conversion to float
2021-10-06 09:27:06 -04:00
Julian Oes
6b8840a01b
commander: fix switch to ALTCTL when RC regained
...
This fixes the case where we sometimes switch to altitude control
instead of position control when RC is regained.
What happens is that we detect that the pilot wants to take over control
right when RC comes back. This means that we try to go in position
control in main_state_transition, however, we are already in position
control because we come back from the failsafe state. The result of
main_state_transition is then TRANSITION_NOT_CHANGED, and therefore we
"fall back" to altitude control even though being already in position
control would have been fine.
This fix checks the return result of main_state_transition correctly and
only reacts to TRANSITION_CHANGED and TRANSITION_DENIED but ignores
TRANSITION_NOT_CHANGED.
2021-10-06 10:30:08 +02:00
Silvan Fuhrer
2dca51216c
vtol: change message for transition timeout warning
...
Signed-off-by: Silvan Fuhrer <silvan@auterion.com>
2021-10-05 18:19:33 -04:00
Silvan Fuhrer
bdc57178d4
Tailsitter: add add transition timeout (abort transition after VT_TRANS_TMEOUT, Quadchute)
...
Signed-off-by: Silvan Fuhrer <silvan@auterion.com>
2021-10-05 18:19:33 -04:00
Silvan Fuhrer
1a1bb2629d
tiltrotor: add transition timeout (abort transition after VT_TRANS_TIMEOUT, Quadchute)
...
Signed-off-by: Silvan Fuhrer <silvan@auterion.com>
2021-10-05 18:19:33 -04:00