16147 Commits

Author SHA1 Message Date
Silvan Fuhrer
1acb07c600 Navigator: set _land_start_index to first item with a position after the marker
_land_start_index is used to to start the mission from this item index, and to
avoid to publish a triplet.current.type=IDLE, we need to fill it with the actual
position setpoint that the vehicle should go to at the start of a mission landing.

Signed-off-by: Silvan Fuhrer <silvan@auterion.com>
2023-02-20 06:50:53 +01:00
bresch
fafcdbf4ed tests: empty parentheses were disambiguated as a function declaration 2023-02-17 21:10:44 -05:00
bresch
8ebf47edb1 ekf2: stop mag fusion when there is no data anymore 2023-02-17 08:51:55 -05:00
Silvan Fuhrer
deabe9a38d Navigator: accept yaw immedietaly if the flag heading_good_for_control is not set
Signed-off-by: Silvan Fuhrer <silvan@auterion.com>
2023-02-17 13:34:30 +01:00
RomanBapst
b00efcd966 cleanup
Signed-off-by: RomanBapst <bapstroman@gmail.com>
2023-02-16 11:28:41 +01:00
RomanBapst
7ef2bff0a2 FeasibilityChecker: Fixed bug and added unit test for it
Signed-off-by: RomanBapst <bapstroman@gmail.com>
2023-02-16 11:28:41 +01:00
RomanBapst
2e50277695 improved function naming
Signed-off-by: RomanBapst <bapstroman@gmail.com>
2023-02-16 11:28:41 +01:00
RomanBapst
8ecb550331 cleanup
Signed-off-by: RomanBapst <bapstroman@gmail.com>
2023-02-16 11:28:41 +01:00
RomanBapst
00b1968a5c more clang tidy stuff
Signed-off-by: RomanBapst <bapstroman@gmail.com>
2023-02-16 11:28:41 +01:00
RomanBapst
b8d0a8821a fixed clang tidy
Signed-off-by: RomanBapst <bapstroman@gmail.com>
2023-02-16 11:28:41 +01:00
RomanBapst
c09263d53c use correct type
Signed-off-by: RomanBapst <bapstroman@gmail.com>
2023-02-16 11:28:41 +01:00
RomanBapst
11fd3ef71a use legacy parameter system and cleaned up vehicle type
Signed-off-by: RomanBapst <bapstroman@gmail.com>
2023-02-16 11:28:41 +01:00
RomanBapst
741fbb931d fixed land requirement for VTOL
Signed-off-by: RomanBapst <bapstroman@gmail.com>
2023-02-16 11:28:41 +01:00
RomanBapst
925ad97ff3 added unit tests
Signed-off-by: RomanBapst <bapstroman@gmail.com>
2023-02-16 11:28:41 +01:00
RomanBapst
11143def82 tried to add functional unit test
Signed-off-by: RomanBapst <bapstroman@gmail.com>
2023-02-16 11:28:41 +01:00
RomanBapst
ceb8f6e1d5 started with feasibility checks
Signed-off-by: RomanBapst <bapstroman@gmail.com>
2023-02-16 11:28:41 +01:00
Jaeyoung Lim
0e1e1afcf9 Correct dates in the license headers 2023-02-15 01:37:32 +09:00
Jaeyoung Lim
0b3f4dd385 Inject failure for airspeed sim 2023-02-15 01:37:32 +09:00
Jaeyoung Lim
3f50bd051f Optionally enable airspeed sensor sim
Enable and disable sensor sim module with parameter
2023-02-15 01:37:32 +09:00
PX4 BuildBot
192764387d Update submodule mavlink to latest Tue Feb 14 12:38:55 UTC 2023
- mavlink in PX4/Firmware (e7a5dedf48f967465d1f9e6c96a9bf304e1a74b1): e3b8756e37
    - mavlink current upstream: 2bdcab78b5
    - Changes: e3b8756e37...2bdcab78b5

    2bdcab78 2023-02-09 Hamish Willee - undo last commit
9c60f17a 2023-02-09 Hamish Willee - param_id char[] description
841b7683 2023-02-08 Alessandro Ros - remove invalid enum reference from storm32.xml (#1947)
8d4e50ee 2023-02-08 Julian Oes - scripts: install npm dependencies first
72a9b2c3 2023-02-08 Julian Oes - pymavlink: update submodule
2023-02-14 09:53:11 -05:00
Knut Hjorth
db539d15bd mavlink: fix bug when opening /dev/null as default stdin/stdout/stderr
Prior commit added opening of /dev/null as 0, 1 and/or 2 file
descriptors, if they where not present. However, if the temporary
file descriptor used to open /dev/null matched the target file
descriptor, it would be immediately closed again. This commit fixes that,
and does not duplicate and close the temporary file descriptor if it is
already at the correct number.
2023-02-14 08:18:01 +01:00
Daniel Agar
2ea25804a1
ekf2: allow filter init with only IMU (#21041)
- if mag enabled heading init is now pushed to controlMagFusion()
2023-02-13 22:07:15 -05:00
Jaeyoung Lim
d5ddb44241 Add sensor airspeed sim
This commit adds the airspeed sensor sim to simulate airspeed sensors
2023-02-13 13:00:39 -05:00
Hamish Willee
edb6c635d5
EKF2_MAG_TYPE - fix typos (#20808) 2023-02-10 14:39:57 +01:00
Konrad
92277ebb96 FixedwingPositionControl: Explicitly set wind to zero when it is not valid. 2023-02-09 17:51:55 +01:00
Konrad
de4b139540 FwPosControl: Update behavior of navigating to a waypoint when the previous waypoint is not valid. Go along the line of the current aircraft position to the desired waypoint. 2023-02-09 17:51:55 +01:00
Konrad
d5025810b4 FixedWingPositionControl: remove get_nav_speed_2d function as npfg can handle this internally. 2023-02-09 17:51:55 +01:00
Konrad
6bdeb43e0d fw_path_navigation: Remove explicit L1 mentioning. 2023-02-09 17:51:55 +01:00
Konrad
3e200bca0d fw_pos_control_l1: renaming to fw_path_navigation, l1 control is not used anymore, use a more generic naming. 2023-02-09 17:51:55 +01:00
Konrad
aa3af7f707 fw_pos_control: purge L1 controller 2023-02-09 17:51:55 +01:00
Knut Hjorth
fbc80c9bf5
RTL fixes and improvements for VTOL vehicles (#21011)
* rtl: remove unconditional transition to land after descent

This was a bug, as it renders the above code lines useless.
This would cause a undesired FW landing for VTOL vehicles if
RTL_LAND_DELAY is above 0.

* rtl: head to center after loiter in VTOL FW

To get the same behavior for RTL with and without loiter before land for
VTOL drones.

* rtl: always go to descend state after return

Previously, the state would change directly to land if in MR and
RTL_LAND_DELAY was 0.0, but we will still wish to descent to
RTL_DESCEND_ALT at descent speed, instead of using landing speeds.

* rtl: mark head to center state as part of vtol transition

The next step in the sequence is transition to MC. By setting
vtol_back_transition we ensure that the acceptance radius is adapted to
the expected transition distance.
2023-02-08 11:07:39 +01:00
Knut Hjorth
99cf1cfdfe mavlink: use /dev/null as default stdin, stdout and stderr
If 0, 1 and/or 2 file descriptors are not open when mavlink module
starts (as might be the case for USB auto-start), use default /dev/null
so that these numbers are not used by other other files.
2023-02-08 10:38:20 +01:00
Knut Hjorth
6c7ae3d845 mavlink: generate new log list for request start index 0
Instead of interpret a request for "more logs than currently exists" as
a new request, use a request for index 0, which is more likely to be
the first request.
2023-02-08 10:38:20 +01:00
KonradRudin
c5d041a2f7
Rearrange npfg use path input (#21071)
* [npfg]: Remove the guideToPoint function and replace with guideToPath

* [npfg]: remove unused navigateXXX functions

* [npfg]: Move navigateXXX Function into FWPoscontrol

* [FixedwingPositionControl]: Set default flaps and spoilers in attitude setpoint topic, and only change if necessary.
2023-02-08 08:54:00 +01:00
jonasbouchraiet
9ac27c9413 Update rtl_params.c 2023-02-07 22:37:19 -05:00
Beat Küng
83c8c79af5
commander failsafe: add API to defer failsafes 2023-02-07 19:27:51 -05:00
Beat Küng
a727bddc19
microdds_client: set queue depth for incoming topics according to msg definition
Otherwise the FMU might miss publications from 2 different publishers at
the same time.
2023-02-07 19:12:10 -05:00
Beat Küng
3f2336af32
navigator: add ModeCompleted signalling topic 2023-02-07 19:11:52 -05:00
Beat Küng
ebc1d7544e
battery_simulator: add support for failure injection
For failsafe triggering in automated tests
2023-02-07 19:11:08 -05:00
Daniel Agar
7b3befded5 ekf2: disable new gravity fusion by default 2023-02-07 13:57:10 -05:00
Daniel Sahu
fa6fda6cce
ekf2: new gravity observation (#21038)
Signed-off-by: Daniel M. Sahu <danielmohansahu@gmail.com>
2023-02-07 13:28:58 -05:00
alessandro
3e149ee6c5
FlightTaskAuto: landing position updates for precision landing (#20951)
- precision landing works incorrectly, target position is not updated during the descent above target
 - _prepareLandSetpoints needs to update _land_position continuously

Co-authored-by: kapacheuski <kapacheuski@gmail.com>
2023-02-07 12:07:26 -05:00
Jukka Laitinen
deb6053d56 Update status leds every time when prearm check status changes
Signed-off-by: Jukka Laitinen <jukkax@ssrc.tii.ae>
2023-02-07 08:02:32 +01:00
Daniel Agar
04d3e549f5 ekf2: resetQuatStateYaw() set _time_last_heading_fuse 2023-02-03 10:03:09 -05:00
Daniel Agar
66ad7fd06c
ekf2: include 0 timestamp checks in helpers (isTimedOut(), isRecent(), etc)
- EKF isTimedOut(), isRecent(), and isNewestSampleRecent() need to handle the case where the timestamp has never been set
 - reset() more thoroughly reset fields (mainly impacts unit tests)
2023-02-03 10:00:51 -05:00
Daniel Agar
264a99fb77
ekf2: new EKF2_IMU_CTRL parameter and gyro bias inhibit mechanism
- EKF2_AID_MASK accel bias inhibit moves to EKF2_IMU_CTRL
2023-02-03 09:52:24 -05:00
Daniel Agar
f668ea5aa6 ekf2: RingBuffer add reset method 2023-02-03 08:49:44 -05:00
Daniel Agar
e3d73cd837 ekf2: mag control reset mag_lpf on first sample 2023-02-02 16:12:09 -05:00
Hamish Willee
2938db1c60 Apply suggestions from code review 2023-02-02 15:20:34 +01:00
Hamish Willee
7cea384404 Update src/modules/fw_autotune_attitude_control/fw_autotune_attitude_control_params.c 2023-02-02 15:20:34 +01:00