Compare commits

...

368 Commits

Author SHA1 Message Date
RomanBapst 4d930bdec2 added full support for standard vtol in SIH
Signed-off-by: RomanBapst <bapstroman@gmail.com>
2024-11-12 11:16:44 +03:00
RomanBapst f417ae73ef added full support for external autostart scripts
Signed-off-by: RomanBapst <bapstroman@gmail.com>
2024-11-12 11:16:22 +03:00
RomanBapst 31433b6402 enable sih for v6x
Signed-off-by: RomanBapst <bapstroman@gmail.com>
2024-11-12 11:16:22 +03:00
Claudio Chies 5d2e7c8748 Misc: Matrix: Added Addition and Subtraction to Slices (#23679)
* Added Addition and Subtraction to Slices

* MatrixSliceTest: refactor Addition/Substraction checks

* Slice: replace operations returning a Matrix with calling the existing Matrix function

---------

Co-authored-by: Matthias Grob <maetugr@gmail.com>
2024-09-18 11:17:37 +02:00
Marco Hauswirth 4a99a51fb1 update upload-artifact v2->v4 2024-09-17 10:55:00 -07:00
chfriedrich98 8aece9bff2 differential: fix CI issue 2024-09-17 09:34:51 -07:00
chfriedrich98 2fd4150b38 differential: Add stabilized and position mode (#23669)
* differential: add position and stabilized mode

* differential: add hardcoded stick input deadzones
2024-09-16 12:09:51 +02:00
chfriedrich98 81747f35bb rover: add descend navigation state to land detection 2024-09-16 09:36:38 +02:00
Silvan Fuhrer 1c9c5e51c2 boards: cuav x7pro: remove build of ROVER and Q_ATTITUDE_ESTIMATOR to save flash
Signed-off-by: Silvan Fuhrer <silvan@auterion.com>
2024-09-16 09:11:23 +02:00
Konrad 82a7d0410c DistanceSensorModeChangeRequest: renaming of variable 2024-09-16 09:11:23 +02:00
Konrad aab2390e51 navigator: publish distance sensor mode change request when in RTL landing phase or during mission landing 2024-09-16 09:11:23 +02:00
Konrad 1755b8304e RTL direct: Make sure the _rtl_state captures the current status and not the next one 2024-09-16 09:11:23 +02:00
Konrad e6f07bde2a lightware_laser: add option to listen to system to enable/disable distance sensor 2024-09-16 09:11:23 +02:00
Silvan Fuhrer 9ca0630376 airframes: SIH_tailsitter: add SENS_DPRES_OFF to bypass airspeed cal
Signed-off-by: Silvan Fuhrer <silvan@auterion.com>
2024-09-13 15:53:52 +03:00
RomanBapst 11440cfb45 added some default parameteter that allow the transition to complete
Signed-off-by: RomanBapst <bapstroman@gmail.com>
2024-09-13 15:53:52 +03:00
RomanBapst 878c8bfcce SIH: fix airspeed for tailsitter
Signed-off-by: RomanBapst <bapstroman@gmail.com>
2024-09-13 15:53:52 +03:00
Konrad 4713a6737e TECS: ramp up fast descend over 2_s to ramp down the throttle command 2024-09-13 14:04:39 +02:00
Konrad 585c92796d mission_base: do not make terrain avoidance check when mission is not run anymore 2024-09-13 13:59:24 +02:00
Claudio Chies 4ba4b340cc Reduce the orbit jerk by using a slew rate 2024-09-13 10:28:42 +02:00
Marco Hauswirth 22c2878cf8 send acknowledgement after receiving vehicle wind cmd 2024-09-12 09:34:08 +02:00
chfriedrich98 741ea6b707 differential: add individual parameters for speed and yaw rate feedforward 2024-09-11 13:57:27 +02:00
chfriedrich98 5d8a107925 differential: fix closed loop control
removed thresholds for closed loop setpoints and added minimum thresholds for yaw rate and speed measurements instead to avoid moving due to measurement noise
2024-09-11 13:57:27 +02:00
Roman Bapst c94c1ce4d2 Navigator: Support straight line mission landings (#23576)
* introduced altitude acceptance radius in position setpoint for fixed
wing guidance
- allows navigator to explicitly set the altitude acceptance radius
- needed for staright line landing support

* added ignore_alt_acceptance to position setpoint message to allow guidance
logic to ignore altitude error on waypoint
- can be useful to prevent loitering at a waypoint within a mission landing sequence

* only set altitude acceptance radius to infinity for a waypoint inside a mission landing
for fixed wing vehicles

* navigator: return altitude acceptance radius from triplet if it's valid

* FixedWingPositionControl: check if alt acceptance radius provided in position setpoint
is larger 0

---------

Signed-off-by: RomanBapst <bapstroman@gmail.com>
Co-authored-by: Alvaro Fernandez <alvaro@auterion.com>
2024-09-10 17:44:24 +02:00
Mathieu Bresciani 03aec2e188 HeadingSmoothing: fix angle wrapping and add unit tests
Co-authored-by: Matthias Grob <maetugr@gmail.com>
2024-09-10 15:06:19 +02:00
jmackay2 a5729da4e9 Simplify gz bridge CMakeLists and add GZ Ionic (#23657)
Co-authored-by: jmackay2 <jmackay2@gmail.com>
2024-09-10 11:53:00 +02:00
bresch 15e9c65a8f dist-sensor: reduce enum names 2024-09-09 15:40:40 +02:00
bresch 8bca467c15 dist-sensor: use enum instead of integer 2024-09-09 15:40:40 +02:00
chfriedrich98 bb0210ecd7 rover: add rtl as a landed condition for rovers (#23646)
The RTL sequence from the navigator requires the vehicle to land. This is now handled for rovers by setting its state to landed if it is within the acceptance radius of the home position when in return mode.
2024-09-06 17:21:49 +02:00
Hubert 67ee4817ae Makefile add micoair h743 bootloader 2024-09-06 11:14:30 -04:00
Hubert 232f699a7f cmake-variants.yaml add micoair h743 2024-09-06 11:14:30 -04:00
Hubert c2bd3900be Jenkins: compile add micoair h743 2024-09-06 11:14:30 -04:00
Marco Hauswirth 44967bdaab ekf2: uncorrelate position covariance after velocity reset (#23644) 2024-09-06 08:51:15 -04:00
RomanBapst 1337fca4d0 vtol backtransition: removed downscaling of fw controls during the backtransition
Signed-off-by: RomanBapst <bapstroman@gmail.com>
2024-09-06 13:55:48 +03:00
Alexander Lerach 3d36c8519d drivers/power_monitor: Implement temperature sensor support for INA228 / INA238 2024-09-05 23:09:01 -04:00
Matthias Grob f98eb067be logger params: clarify AUX1 logging trigger 2024-09-05 18:06:29 +02:00
Matthias Grob e4d25df58a Consistently use "stick gesture" for "rc stick gesture" 2024-09-05 18:06:29 +02:00
Silvan Fuhrer 8eaf93468e Commander: feedback string for arming/disarming: make clear when from gesture
Signed-off-by: Silvan Fuhrer <silvan@auterion.com>
2024-09-05 18:06:29 +02:00
Silvan Fuhrer d967cdbb48 Manual control: rename SOURCE_RC_STICK_GESTURE to SOURCE_MANUAL_CONTROL_GESTURE
Signed-off-by: Silvan Fuhrer <silvan@auterion.com>
2024-09-05 18:06:29 +02:00
Silvan Fuhrer 556a302a09 Logger: replace RC keyword by 'manual control'
Signed-off-by: Silvan Fuhrer <silvan@auterion.com>
2024-09-05 18:06:29 +02:00
Silvan Fuhrer f7c35291ee Rover Differential: remove RC keyword from params
Signed-off-by: Silvan Fuhrer <silvan@auterion.com>
2024-09-05 18:06:29 +02:00
Silvan Fuhrer 81cf6a736d Commander: add VEHICLE_CMD_EXTERNAL_POSITION_ESTIMATE to list of externaly handled commands (#23642)
Signed-off-by: Silvan Fuhrer <silvan@auterion.com>
2024-09-05 11:20:39 +02:00
Silvan Fuhrer 6fa6360aef Commander: always allow to switch to LAND mode (#23580)
Special handling for LAND mode: always allow to switch into it such that if used
as emergency mode it is always available. When triggering it the user generally wants
the vehicle to descend immediately, and if that means to switch to DESCEND it is fine.

Signed-off-by: Silvan Fuhrer <silvan@auterion.com>
2024-09-03 18:10:37 +02:00
Konrad 80d4fad624 DistanceSensorCheck: do not raise a distance sensor failure if the SFXX_MODE is set to 2 and we are in a VTOL FX flight phase 2024-09-03 15:53:09 +02:00
chfriedrich98 a9cdb36d7c differential: reset integrators when disarmed (#23637) 2024-09-03 09:31:39 +02:00
Julian Oes 8f6ce4edbf mavlink/lib: move open_drone_id helpers to mavlink
I could not extract the open_drone_id helpers to a separate lib because
it would require the mavlink headers while the mavlink library would
also depend on it, so it ended up being a circular dependency.

Instead, I'm now just using the headers from within the mavlink module
as well as from the uavcan driver.
2024-09-02 16:20:10 +12:00
Julian Oes b7c5ba1752 boards: make flash space for remote ID over DroneCAN 2024-09-02 16:20:10 +12:00
Julian Oes cd63cfed3a remoteid: implement System as sent from GCS
This will send the System message if it is already being sent by a ground
station. Otherwise, it will assemble the message itself using the
takeoff/home location.
2024-09-02 16:20:10 +12:00
Julian Oes 7d1d398984 remoteid: add SelfID message 2024-09-02 16:20:10 +12:00
Julian Oes 04ea4f9b3a uavcan: add OpenDroneID ArmStatus, operator ID
In order to have operator ID be sent by QGC, we need to forward
ArmStatus from the remote ID module (here on DroneCAN) to MAVLink.
2024-09-02 16:20:10 +12:00
Julian Oes d999258171 uavcan: implement OpenDroneID System 2024-09-02 16:20:10 +12:00
Julian Oes de00c23e19 uavcan: implement OpenDroneID Location 2024-09-02 16:20:10 +12:00
Julian Oes cf19764d75 uavcan: implement OpenDroneID BasicID
Signed-off-by: Julian Oes <julian@oes.ch>
2024-09-02 16:20:10 +12:00
Julian Oes 87a63e75be mavlink: extract OpenDroneID function to lib
This extracts the function mapping from MAV_TYPE to MAV_ODID_UA_TYPE to
the library, so that it can be re-used later by the remote ID
implementation over DroneCAN.

Signed-off-by: Julian Oes <julian@oes.ch>
2024-09-02 16:20:10 +12:00
Julian Oes 4c63e9e4f9 libuavcan: update DroneCAN submodule
Signed-off-by: Julian Oes <julian@oes.ch>
2024-09-02 16:20:10 +12:00
Marco Hauswirth 7dcea6b2e4 EKF2: range measurement rejection in rain/fog (#23579) 2024-08-30 17:25:56 +02:00
Benjamin Perseghetti 787fe9590d Fix typo where 22.04 still says Gz (Garden) (#23632)
Signed-off-by: Benjamin Perseghetti <bperseghetti@rudislabs.com>
2024-08-29 20:42:56 +02:00
Daniel Agar 5b0014cb06 ekf2: remove legacy accel z bias checks (#23341)
Co-authored-by: Mathieu Bresciani <brescianimathieu@gmail.com>
2024-08-29 11:51:27 -04:00
chfriedrich98 f8188f0981 differential: update module (#23629)
Improve the slow down effect and add support for speed change in mission mode.
Seperate code related to turning setpoints into motor commands into its own folder and refactor code.
2024-08-29 15:27:08 +02:00
Silvan Fuhrer c86d44f831 Commander: remove 2 decimals from COM_FAIL_ACT_T
Signed-off-by: Silvan Fuhrer <silvan@auterion.com>
2024-08-29 10:56:04 +02:00
Silvan Fuhrer 6b3e3aa363 Commander: improve param description of COM_POSCTL_NAVL and rename Manual-->Stabilized
Signed-off-by: Silvan Fuhrer <silvan@auterion.com>
2024-08-29 10:56:04 +02:00
Mathieu Bresciani 2cda0efd84 Commander: extend COM_ARM_WO_GPS to disable warning (#23628) 2024-08-28 17:33:58 +02:00
Jacob Dahl 0f1507c24e [gz] X500 mono_cam_down and aruco world (#23450)
* x500 mono cam down and aruco world

* remove duplicate line
2024-08-28 17:23:39 +02:00
bresch bab256bfe6 ekf2: handle external altitude resets 2024-08-28 11:02:26 +02:00
bresch cd2170deea ekf2-origin: backcompute based on lpos validity 2024-08-28 11:02:26 +02:00
bresch 130fefb1e7 ekf2: initialize origin from corrent position when possible 2024-08-28 11:02:26 +02:00
bresch af752536b9 ekf2: extract setting origin from current lat/lon/alt
This is not only needed when GNSS is available but also for other global
sources of position (e.g.: aux global pos and manual pos updates)
2024-08-28 11:02:26 +02:00
bresch 9169a7c5fc ekf2: split horizontal and vertical origin reset
Allow partial resets (only lat/lon or only altitude)
2024-08-28 11:02:26 +02:00
Daniel Agar f3d58cdf10 ekf2: resetFlowFusion() pass flowSample by const ref 2024-08-27 10:38:17 -04:00
Daniel Agar 6c24413888 ekf2: filter flow vel (used for flow velocity reset)
- individual flow samples can be quite erratic
2024-08-27 10:38:17 -04:00
dagar 5ff4eea870 [AUTO COMMIT] update change indication 2024-08-27 16:16:55 +02:00
Daniel Agar ac48b8b51d ekf2: mag declination fusion always if there is no aiding 2024-08-27 16:16:55 +02:00
Daniel Agar 2a9e205442 ekf2: fuseDeclination respect mag update_all_states
- when both mag_hdg/mag_3d are inactive we should be able to continue
   updating mag without any possible impact on other states
2024-08-27 16:16:55 +02:00
Daniel Agar 9d57a3c02f ekf2: split resetMagCov() and skip mag reset if negligible change 2024-08-27 16:16:55 +02:00
Daniel Agar bbcf741e9e ekf2: make mag control responsible for WMM
- this further untangles mag control (which requires the WMM) from GPS
2024-08-27 16:16:55 +02:00
sbtjagu be4d0d351c ackermann: add speed waypoint support and fix delay detection (#23572) 2024-08-27 13:35:48 +02:00
jmackay2 5fff1ad6d1 Fix spelling of airflow sensor msg comments 2024-08-27 09:23:43 +02:00
Jukka Laitinen f67eb6989d mavlink: Fix ESC_STATUS sending for batches > 1
The indexing was wrong for esc_status sending for ESCs 4->

Signed-off-by: Jukka Laitinen <jukkax@ssrc.tii.ae>
2024-08-26 15:06:55 -04:00
LucaS ca47f6f016 lib/mixer_module: added a constant instance start so that when instance start is changed in actuator yaml files they parameters are able to be used (#23616)
Co-authored-by: Luca Scheuer <luca.scheuer@iq-control.com>
2024-08-26 14:51:09 -04:00
Ramon Roche 16c77be7c0 tests: loosen radius of vtol rtl landing pos check 2024-08-26 14:05:17 -04:00
Daniel Agar a75db1286d logger: automatically limit buffer size to largest available free chunk (NuttX only) 2024-08-26 13:24:39 -04:00
Silvan Fuhrer 8bfd3b0f62 platforms/nuttx/init/stm32f7: rc.board_arch_defaults reduce LOGGER_BUF to 40
To get some breathing space on setups with memory-intensive components (e.g. UAVCAN).

Signed-off-by: Silvan Fuhrer <silvan@auterion.com>
2024-08-26 13:13:11 -04:00
bresch 9183c479a5 ekf2: correctly compute vel variance from flow variance
Co-authored-by: Marco Hauswirth <marco.hauswirth@auterion.com>
2024-08-26 11:28:36 -04:00
Claudio Chies 1a4e8a7341 FLOW: PARAM: GCS Parameter readability 2024-08-26 16:09:21 +02:00
SuddenDeath 510d3cfb39 gz: Fix endless wait for gazebo on different worlds (#23613)
Co-authored-by: your-sudden-death <noreply@pm.me>
2024-08-24 17:15:41 +02:00
Daniel Agar ebbb880e92 ekf2: always use corrected accel/gyro for filtered metrics 2024-08-23 17:35:59 -04:00
Daniel Agar 56560726d3 ekf2: sensor simulator fix GPS replay scaling 2024-08-23 14:35:05 -04:00
Daniel Agar d7b165991f cmake: relax git tag requirements
- default to v0.0.0 if tag isn't available
 - src/lib/px_update_git_header.py use same PX4_GIT_TAG as cmake
 - update lingering master branch references to main
2024-08-23 12:05:34 -04:00
Ramon Roche 54f7b58007 Commander: lock down mav sys and comp id
- keeps them as local params at init
- only allow to set at init
2024-08-23 11:19:25 -04:00
bresch 1a0f97ebbd ekf2-fake pos: add valid fake position fusion
This is similar to fake pos but is only used when the ekf has an
external information telling it that the vehicle is not changing
position. This information can then be used to keep a valid local
position even when the vehicle isn't exactly at rest.
2024-08-23 11:17:21 +02:00
bresch 64b0586dad ekf2: return validity based on dead-reckoning time only 2024-08-23 11:17:21 +02:00
David Sidrane cf941b18df Nuttx with stm32h7: STM32H7X5XX selects hardware files backport 2024-08-23 05:12:28 -04:00
jfbblue0922 13c413622b Nuttx with stm32h7: STM32H7X5XX selects hardware files backport 2024-08-23 04:48:20 -04:00
Jaeyoung Lim b1dfe1d731 Update gz version to harmonic 2024-08-22 21:37:00 -04:00
Ramon Roche 00c3017334 ci: add note regarding RunsOn 2024-08-22 12:06:50 -04:00
Ramon Roche 89f29e91de ci: slow down sitl test realtime 2024-08-22 12:06:50 -04:00
Ramon Roche 7f33dcfcfb ci: upgrade sitl mavsdk tests workflow 2024-08-22 12:06:50 -04:00
Jaeyoung Lim d617bf4129 simulation/gz_bridge: Fix build issues with unused variable 2024-08-22 11:48:46 -04:00
Daniel Agar 7250ee1b32 ekf2: organize gyro_bias/accel_bias param yaml 2024-08-22 10:56:16 -04:00
Daniel Agar ebbd2c1825 ekf2: organize aid source parameters 2024-08-22 10:56:16 -04:00
Claudio Chies ee022a70c1 Navigator: Land: Improve it for VTOL by taking breaking distance into account (#23566)
* vtol adjust landing setpoint

* improve comment

Co-authored-by: Silvan Fuhrer <silvan@auterion.com>

---------

Co-authored-by: Silvan Fuhrer <silvan@auterion.com>
2024-08-22 14:10:36 +02:00
Silvan Fuhrer e0bb56b6a7 Commander: Failsafe: set clear condition for action Land like for RTL (#23569)
For many failsafes, it is possible to select RTL and Land as actions.
In this commit I synchronize the clear condition for these two action
options, to always only clear on Disarm or manual mode change.
Reasoning is that for the user RTL and Land is a similar action and
I would thus expect them to be as similar as possible. And I in general
would rather not clear a failsafe state instead of too often clearing it.

Example: GF failsafe with action Land --> even if the drone is marginally
within the GF again, I want it to proceed with the Landing unless
I manually intervene.

Signed-off-by: Silvan Fuhrer <silvan@auterion.com>
2024-08-22 14:03:24 +02:00
Silvan Fuhrer 6ef82ada6e Navigator: make sure VTOL transitions in Descend mode are alays triggered (#23578)
It previously didn't catch switches to Descend from a manual mode,
as both modes have navigation_mode_new=nullptr.

Signed-off-by: Silvan Fuhrer <silvan@auterion.com>
2024-08-22 14:02:32 +02:00
Konrad 20b6f343a3 mission_base: make sure all mission_items during landing phase have yaw set to NaN 2024-08-22 12:58:44 +02:00
ZeroOne-Aero 02ed1162ed Update pab_manifest.c (#23594)
* Update pab_manifest.c

I have rebased on main and squash my commits into 1.

* Update pab_manifest.c

I have updated pab_manifest.c:
// BASE ID 0x150 ZeroOne Pixhawk Baseboard Alaised to ID 0
{HW_BASE_ID(0x150), base_configuration_0, arraySize(base_configuration_0)}, // ZeroOne Pixhawk Baseboard ver 0x150
2024-08-22 04:02:02 -04:00
jmackay2 b33b0398dd Fix param typo in quadtailsitter airframe (#23588) 2024-08-22 10:30:10 +10:00
Jaeyoung Lim ae16556107 simulation/gz_bridge: follow model in gz GUI (#22808) 2024-08-21 11:41:47 -04:00
Ramon Roche b2f663648e ci: github actions runs-on Dronecode AWS Infra
* ci: try runs-on Dronecode Infra
* ci: comment on how to disable RunsOn
* Update .github/workflows/build_all_targets.yml
2024-08-21 10:56:37 -04:00
KonradRudin 3478765c31 Navigator: MissionFeasibilityCheck: Rework 1st waypoint check (#23568)
* FeasibilityChecker: only warn when first waypoint is too far, but still accept mission as valid

* feasiblityChecker: make distance to first waypoint check against home position instead of current position, so it is more constant during a flight

* Apply suggestions from code review

Co-authored-by: Silvan Fuhrer <silvan@auterion.com>

* feasibilityCheckerTest: update tests to not fail for first waypoint check

* feasibilityChecker: make comment for 1stwaypointcheck event

* Feasibility check unit test: fix comment

Signed-off-by: Silvan Fuhrer <silvan@auterion.com>

---------

Signed-off-by: Silvan Fuhrer <silvan@auterion.com>
Co-authored-by: Silvan Fuhrer <silvan@auterion.com>
2024-08-21 09:08:36 +02:00
Jaeyoung Lim f252e20eae Revert "Update GZBridge to be able to use gazebo airspeed. Add quadtailsitter. (#23455)" (#23583)
This reverts commit 7e45f49152.

Co-authored-by: jmackay2 <1.732mackay@gmail.com>
2024-08-20 19:36:08 -04:00
bresch 0931179579 ekf2: extract WMM update logic 2024-08-20 10:32:27 -04:00
Beniamino Pozzan 98eae3cd4c fix: make help on Ubuntu 22.04
Ubuntu 22.04 uses make 4.3 which broke the current `make help` target
Reference:
https://stackoverflow.com/a/26339924

Signed-off-by: Beniamino Pozzan <beniamino.pozzan@gmail.com>
2024-08-19 11:19:31 -04:00
Thomas Stauber f2f4488594 drivers/gps: publish secondary instance satellite_info if main instance is advertised 2024-08-19 11:14:12 -04:00
Niklas Hauser ecfdbd2e60 littlefs: needs more stack when used 2024-08-19 11:05:50 -04:00
David Sidrane c60b1d1a5f board_hw_rev_ver: Support EEPROM-only HW IDs 2024-08-19 11:05:50 -04:00
Niklas Hauser 07734c243f mtd: Initialized the RAMTRON speed with 30MHz 2024-08-19 11:05:50 -04:00
David Sidrane 072892fbef romfs: rcS: support storage on other then SD card 2024-08-19 11:05:50 -04:00
Ramon Roche 746ae25768 ci: replace build workflows (#23550) 2024-08-19 10:41:25 -04:00
Alexis Guijarro 0481c04b2b Nuttx with backport (stm32h7x3x): Add External Power Supply option 2024-08-19 09:22:17 -04:00
Claudio Chies 4d21110cfb Documentation - improved GCS parameter readablity (#23376)
improved GCS parameter description

Co-authored-by: Hamish Willee <hamishwillee@gmail.com>
Co-authored-by: Silvan Fuhrer <silvan@auterion.com>
2024-08-19 13:36:04 +02:00
jmackay2 7e45f49152 Update GZBridge to be able to use gazebo airspeed. Add quadtailsitter. (#23455)
* Update GZBridge to be able to use gazebo airspeed. Add gz quadtailsitter.

* Fix formatting

---------

Co-authored-by: jmackay2 <jmackay2@gmail.com>
2024-08-19 08:54:57 +02:00
Claudio Chies e29a36adb4 Landing horizontal velocity compensation / unsteady landing (#23546)
* initial working

* implemented feedback
2024-08-19 08:01:43 +02:00
Silvan Fuhrer 435e9665b3 RTL: cone: never climb more than to RTL_RETURN_ALT (#23558)
This is to prevent that a large NAV_ACC_RAD leads to very high return altitudes.

Signed-off-by: Silvan Fuhrer <silvan@auterion.com>
2024-08-19 07:51:33 +02:00
Vilius ea0ef154d8 Fixes upload.sh for arkv6x (#23561) 2024-08-17 13:59:18 -06:00
bresch ad1d9e1312 failsafe: do not add additional hold delay if failsafe action is hold 2024-08-16 16:26:20 +02:00
bresch ea673b0b5b navigator: check hagl failsafe centrally 2024-08-16 16:26:20 +02:00
Silvan Fuhrer 4f66410d24 ROMFS gazebo iris opt flow: increase SENS_FLOW_MAXHGT to 15m (#23557)
Signed-off-by: Silvan Fuhrer <silvan@auterion.com>
2024-08-16 15:58:36 +02:00
Silvan Fuhrer 09638552b7 estimatorChecks: disable warning for imminent position failure if that is disabled (#23556)
COM_POS_FS_EPH can be set to -1, in which case the actual failure eph is INFINITY.

Signed-off-by: Silvan Fuhrer <silvan@auterion.com>
2024-08-16 13:57:37 +02:00
Silvan Fuhrer 4a3cbecf01 Commander: only add *autopilot disengaged* to failsafe notifactions in special cases
Signed-off-by: Silvan Fuhrer <silvan@auterion.com>
2024-08-16 11:04:37 +02:00
Daniel Agar f7e6e1354a commander: power check only keep error thresholds 2024-08-15 10:06:56 -04:00
Vilius 2a124fd998 Add Bosch BMM350 magnetometer (#23362)
* Add Bosch BMM350 magnetometer

* BMM350 replace info messages with debug messages

* BMM350 update measurement interval

* BMM350 fix offsets, update based on review

* BMM350 Update default parameters to 50Hz

* Update OTP Word LSB check

* BMM350 fix styles and formatting

* BMM350 update error checks
2024-08-15 01:29:02 -08:00
Ramon Roche af0129dab7 github: update bug report template
Removes unnecessary required fields
2024-08-14 19:56:49 -04:00
Alexis Guijarro c8501cc1d0 boards: Support for 3DR Control Zero H7 OEM Rev G board 2024-08-14 19:52:42 -04:00
bresch 4ed3e9e210 navigator: add failure enum 2024-08-14 11:08:02 +02:00
bresch 25fcb3c913 comander: trigger failsafe when navigator reports failure 2024-08-14 11:08:02 +02:00
bresch 9f69e9ee6c navigator: publish navigator_state
feedback to commander
2024-08-14 11:08:02 +02:00
bresch 1fa878ad88 navigator: add navigation state ID to every mode class 2024-08-14 11:08:02 +02:00
murata,katsutoshi dec550dcb9 navigator: Change IF statement to SWITCH statement (#23534) 2024-08-14 09:40:36 +02:00
Hamish Willee f3a8d05f8c MPC_ACC_DECOUPLE - better description (#23518) 2024-08-14 12:18:14 +10:00
mirusu400 5121358e87 Makefile: Fix error message when cannot find target board
not $(MAKE) help|list_config_targets, we should use $(MAKE) list_config_targets
for the desired results.
2024-08-13 21:34:39 -04:00
murata,katsutoshi a327b14cef navigator: always fully initialize geofence msg 2024-08-13 21:33:36 -04:00
Jukka Laitinen 0459481cb4 icm40609d: Change FIFO count to samples instead of bytes
As the sensor can directly report the amount of samples in the fifo, use it to simplify the logic.

Also combine the fifo empty/fifo overflow checks for interrupt and polling modes.

Signed-off-by: Jukka Laitinen <jukkax@ssrc.tii.ae>
2024-08-13 21:32:28 -04:00
Jukka Laitinen cc4d5bd2a6 icm40609d: Add INTF register definition and disable I2C interface
Disable I2C to make sure that the sensor doesn't switch to that by accident

Signed-off-by: Jukka Laitinen <jukkax@ssrc.tii.ae>
2024-08-13 21:32:28 -04:00
Jukka Laitinen fd062d0085 icm40609d: Clear interrupt status at FIFO reset
If DRDY signal is used, the interrupt status needs to be cleared at FIFO reset
in order to make DRDY go back inactive. Otherwise there won't be a falling edge
interrupt at the next sample.

Signed-off-by: Jukka Laitinen <jukkax@ssrc.tii.ae>
2024-08-13 21:32:28 -04:00
Stefano Colli e2c0e5c88a MissionBase: replay the gimbal and trigger cached items only upon reaching resume waypoint (#23484)
* Fix: replay the mission cached items only upon reaching resume waypoint

* Refactoring
Split camera mode mission items from gimbal ones so to have a finer control over the relative replays

* Chore: fix formatting

---------

Co-authored-by: Silvan Fuhrer <silvan@auterion.com>
2024-08-13 22:20:28 +02:00
bresch aad607e0dd ekf2: send airspeed data to ekf backend regardless of sign
On ground the airspeed can sometimes be slightly negative but the ekf
should still know that airspeed data is flowing regularly
2024-08-13 17:43:45 +02:00
Silvan Fuhrer a0d22a4d21 FW Position Control: make explicit when underspeed detection logic is en-/disabled
Signed-off-by: Silvan Fuhrer <silvan@auterion.com>
2024-08-13 16:55:26 +02:00
Silvan Fuhrer acc0cd7e8a FW Position Control: disable underspeed handling during auto takeoff
Signed-off-by: Silvan Fuhrer <silvan@auterion.com>
2024-08-13 16:55:26 +02:00
Silvan Fuhrer afc360d637 FW Position control: do not invalidate airspeed from negative readings
Signed-off-by: Silvan Fuhrer <silvan@auterion.com>
2024-08-13 16:55:26 +02:00
murata,katsutoshi db8781e531 navigator: Align MAVLINK message level with EVENT message level (#23535) 2024-08-12 19:09:22 +02:00
Jaeyoung Lim e008ca24f1 Remove euler angles from attitude setpoint (#23482)
* Remove euler angles from attitude setpoint message

* Remove usage of euler angles in attitude setpoint messages

This commit removes the usage of euler angles in the vehicle_attitude_setpoint messages

* Fix standard vtol
2024-08-12 16:42:51 +02:00
Daniel Agar c9343ca11d sitl_gazebo-classic update submodule to latest 2024-08-12 16:26:56 +02:00
Matthias Grob af06bee8d0 update mavlink & adapt to pymavlink generator reporting failures by default 2024-08-12 16:26:56 +02:00
bresch 478875c006 ekf tools: compare gyro integral with attitude estimate 2024-08-12 15:26:08 +02:00
Matthias Grob 64056fc7bb SYS_STATUS: fill correct attitude, horizontal position flags 2024-08-09 18:22:09 +02:00
Sergei 1211aad9b0 Reasonable defaults for Lawnmower SITL 2024-08-09 12:18:16 -04:00
Alexis Guijarro f4f93118e6 mRo boards: Fix for USART clock selection 2024-08-09 11:59:38 -04:00
Matthias Grob fdfe43471e mavlink_receiver: limit access through instances with gimbal mode
This adds explicit handling for the few things we want to allow through a MAVLink instance dedicated to a gimbal/(camera) payload as per the MAVLink gimbal mode configuration.
2024-08-09 10:13:44 -04:00
bresch 3f17f15505 commander: allow FW manual pos control without global position 2024-08-09 12:51:09 +02:00
bresch 8b12b7c641 commander: extend local position 'relaxed' validity
Relaxed position is valid as long as a velocity aiding source is active
(e.g.: optical flow or airspeed+sideslip)
2024-08-09 12:51:09 +02:00
bresch f04aa2494b FW pos control: do not requre global pos in manual position control 2024-08-09 12:51:09 +02:00
Matthias Grob 6cf0bf5e19 Support MAVLink extension MANUAL_CONTROL.aux
Note that in uORB we don't currently know if the aux fields are
specifically valid or not so we can also not set the corresponding
bits in the field.
2024-08-09 10:49:38 +02:00
Hamish Willee 58a699e3cb Strip out html escape comments 2024-08-09 09:26:06 +02:00
Hamish Willee 82be5cd44f Strip short description from long one 2024-08-09 09:26:06 +02:00
Hamish Willee 718d308d91 parameter markdown - correct reboot in tables 2024-08-09 09:26:06 +02:00
chfriedrich98 a294e011ab purePursuit: fix commenting error 2024-08-08 19:54:42 +02:00
chfriedrich98 1a7717b5d9 ackermann: refactor guidance files 2024-08-08 19:54:42 +02:00
chfriedrich98 1af295f1a9 ackermann: refactor main files 2024-08-08 19:54:42 +02:00
Niklas Hauser cd231d0eed fmuv6x: Add GPIO expander to check overcurrent pins 2024-08-08 13:14:11 -04:00
chfriedrich98 a91aa40a3d battery: only reset soc filter with valid voltage measurement (#23513) 2024-08-08 17:09:36 +02:00
Matthias Grob 0381e14822 FlightTaskOrbit: Avoid sending NAN altitude in status telemetry while it's changed by stick 2024-08-08 10:53:18 -04:00
Silvan Fuhrer a737036633 RTLDirect: check for terrain collision in every state of RTL beside when landing
Signed-off-by: Silvan Fuhrer <silvan@auterion.com>
2024-08-08 13:37:36 +02:00
Silvan Fuhrer 588c4a04c8 RTL direct: publish NavigatorMissionItem
Signed-off-by: Silvan Fuhrer <silvan@auterion.com>
2024-08-08 13:37:36 +02:00
Silvan Fuhrer b01c179eed NavigatorMissionItem.msg: remove instance_count
This information is duplicate to mission_result/mission_id.

Signed-off-by: Silvan Fuhrer <silvan@auterion.com>
2024-08-08 13:37:36 +02:00
Jeremy Zanzig e2f5debf77 change pairing LED feedback to 20 fast flashes of white 2024-08-08 10:02:36 +02:00
Matthias Grob a8d54c7fae mixer_module: Reset RC passthrough functions to disarmed value when no stick input 2024-08-07 19:20:51 +02:00
Julian Oes 2d99ae18ad stm32h7: Reset USART clock selection (#23498)
This resets the USARTs' clock source selection to the default, in case
it has been changed by the bootloader.

This is required if booting from the ArduPilot bootloader which happens
to reset the clock selection to PLL.

Without this fix, UARTs (including the console) is garbled, so
presumably at an invalid baudrate.
2024-08-07 11:41:50 -04:00
Jacob Dahl 086c044f47 mavlink: log handler rewrite for improved efficiency (#23421) 2024-08-07 11:26:12 -04:00
PX4 BuildBot a39a3e2099 Update submodule gz to latest Wed Aug 7 12:39:06 UTC 2024
- gz in PX4/Firmware (411a328e325e5109a453cf84d0c65393be86bfef): https://github.com/PX4/PX4-gazebo-models/commit/312cd002ff9602644efef58eef93e447c10dcbe8
    - gz current upstream: https://github.com/PX4/PX4-gazebo-models/commit/536305adee09b9ace391b16107e625cf7c6db7e7
    - Changes: https://github.com/PX4/PX4-gazebo-models/compare/312cd002ff9602644efef58eef93e447c10dcbe8...536305adee09b9ace391b16107e625cf7c6db7e7

    536305a 2024-08-07 Claudio Chies - add world for collision prevention (#52)
36f49cb 2024-07-29 Stefano Colli - Add x500 with gimbal model (#47)
4ddfc13 2024-07-24 Jacob Dahl - Downward mono cam + aruco tag (#48)
2024-08-07 11:23:39 -04:00
PX4 BuildBot b488e45e73 Update submodule sitl_gazebo-classic to latest Wed Aug 7 12:39:04 UTC 2024
- sitl_gazebo-classic in PX4/Firmware (28a0de63c5): https://github.com/PX4/PX4-SITL_gazebo-classic/commit/67431d233f0f08de647f0eb11239816f9c8bd6c6
    - sitl_gazebo-classic current upstream: https://github.com/PX4/PX4-SITL_gazebo-classic/commit/67af3c3a6da493bdc0a0b9de28b01a2a98d38659
    - Changes: https://github.com/PX4/PX4-SITL_gazebo-classic/compare/67431d233f0f08de647f0eb11239816f9c8bd6c6...67af3c3a6da493bdc0a0b9de28b01a2a98d38659

    67af3c3 2024-07-18 Silvan Fuhrer - model/lidar: incrase range to 50m (#1049)
2024-08-07 11:23:16 -04:00
chfriedrich98 176f09b48b gz_bridge: add rover world to cmake 2024-08-07 10:24:02 -04:00
Silvan Fuhrer 876730a9be FW Position Controller: enable flaps during hand/catapult launch (#23460)
Signed-off-by: Silvan Fuhrer <silvan@auterion.com>
2024-08-07 15:38:55 +02:00
Peter van der Perk 588eedb8cb px4: sitl fix filepath regression (#23457) 2024-08-07 15:24:07 +02:00
chfriedrich98 c8ff5909b5 rover: restructure airframes (#23506) 2024-08-07 15:16:41 +02:00
Claudio Chies 28a0de63c5 Orbit Yaw Vehicle Parameter (#23358) 2024-08-07 11:12:52 +02:00
chfriedrich98 33d99a13e8 differential: restructure and update module (#23430)
* differential: rename module

* differential: restructure and update module
2024-08-07 09:53:37 +02:00
Beat Küng bfcd4564a6 fix metadata.cmake: add missing paths to json & xml parameter outputs (#23464) 2024-08-07 16:17:03 +10:00
Thomas Frans 3157a4e171 gnss: update supported baud rates (#23415)
* gnss: update supported baud rates

The Septentrio GNSS driver requires certain baud rates to test all the
supported baud rates of the receiver. Without these changes, certain
"non-standard" ones would print an error to the MAVLink console when the
driver was started through the console.

* platforms: add missing baudrate defines

---------

Co-authored-by: Thomas Frans <franske2000@gmail.com>
Co-authored-by: Julian Oes <julian@oes.ch>
2024-08-07 10:46:18 +12:00
bresch d2478d00cf ekf2: only allow ref sensor to reset height 2024-08-06 10:19:13 -04:00
Matthias Grob 8ed3489bd1 hardfault_log: revert to explicit path to not trip the module documentation parser
- the module documentation parser can only resolve defines from the same file
- also it cannot deal with defines embeded in strings
- what board should it add for the general documentation anyways?

As a result of these issues I suggest to stay with the original hardcoded
/fs/microsd for the documentation. It's still the most common path as far as
I can see.
2024-08-06 13:43:13 +02:00
Matthias Grob 84d4ee0e60 zenoh-pico: update to correct dev/1.0.0 branch
which is up to date containing "Use SO_REUSEPORT only if it exists"
and is advertised by GitHub because the commit is on a branch
2024-08-06 13:42:23 +02:00
sbtjagu 326e2a9f5c ackermann: add protection against float precision problem in acceptance radius update (#23478)
* ackermann: add protection against float precision problem in acceptance radius update

* ackermann: protect against divide-by-zero

---------

Co-authored-by: Mathieu Bresciani <brescianimathieu@gmail.com>
2024-08-05 13:02:12 +02:00
Beat Küng 4883f2128a commander: allow external modes more time for initial response
We've come accross a case where a ROS node would consistently take something
over 800 ms until the first arming check request subscription callback was
triggered.
After the first sample, the callback always triggered within the expected
timeframe.
Therefore this patch allows for more time right after registration until
timing out.
2024-08-05 08:43:56 +02:00
Alexis Paques d4d60a5181 Add missing rc.sysinit file in the ROMFS 2024-08-02 16:01:13 -04:00
Alexis Paques abc629c2bb zenoh: update zenoh-pico from 0.7.0 to 1.0.0 (#23462)
* Update Zenoh-pico from 0.7.0 to 1.0.0
* Update the zenoh-pico version to use PX4/dev/1.0.0-px4
* Remove the rostopic and rt/ prefix
 * Unlike zenoh-bridge-dds we were using, zenoh-bridge-ros2dds is now adding the rt/ prefix automagically.
2024-08-02 11:48:55 -04:00
Silvan Fuhrer 75ce550db3 Navigator: add terrain collision avoidance logic for Mission/RTL
Avoid flying into terrain using the distance sensor.
Enable through the parameter NAV_MIN_GND_DIST.
Only active during commanded descents with vz>0 (to prevent climb-aways),
excluding landing and VTOL transitions.
It changes the altitude setpoint in the triplet to maintain the current altitude
and republish the triplet. We also change the mission item altitude used for
acceptance calculations to prevent getting stuck in a loop.

Signed-off-by: Silvan Fuhrer <silvan@auterion.com>
2024-07-30 17:50:54 +02:00
Silvan Fuhrer b74e46b1ac SITL airframes/Navigator: remvoe reference to removed param MIS_LTRMIN_ALT
Signed-off-by: Silvan Fuhrer <silvan@auterion.com>
2024-07-30 17:50:54 +02:00
chfriedrich98 e5657ba011 battery: remove reboot required flag from BAT_N_CELLS 2024-07-30 16:18:47 +02:00
chfriedrich98 9ca9ae5b24 battery: fix initialization for internal resistance estimation
Don't run/initialize if number of battery cells is zero and reinitialize whenever this parameter changes.
2024-07-30 16:18:47 +02:00
Matthias Grob ba579245fb battery_status: remove unused smart battery mode 2024-07-30 14:37:11 +02:00
Matthias Grob a18c18e163 battery_status: remove custom_faults 2024-07-30 14:37:11 +02:00
Matthias Grob 72ed160aa9 batteryCheck: fix comment typo hyster{i,e}sis 2024-07-30 14:37:11 +02:00
Matthias Grob 2e66bbdfb8 battery_status: add failed to arm fault instead of duplicate over temperature 2024-07-30 14:37:11 +02:00
Matthias Grob e06629bfe5 failsafe: unhealthy battery during spoolup leads to disarm
battery failures can occur upon arming when the load gets sgnificant.
In that case the safest thing to do is prevent a takeoff before anything
worse happens.
2024-07-30 14:37:11 +02:00
Matthias Grob 0d00543292 batteryCheck: explicitly report missing battery with ID 2024-07-30 14:37:11 +02:00
Matthias Grob 7d79bdfa05 batteryCheck: apply supply circuit breaker also to battery checks
This was the case in older versions of PX4.
2024-07-30 14:37:11 +02:00
Matthias Grob edcda80cb9 Commander: adhere to parameter naming convention (#23466) 2024-07-30 14:27:27 +02:00
chfriedrich98 b93dd0e8d4 purePursuit: migrate parameters to library (#23438) 2024-07-30 14:16:05 +02:00
bresch 7b3d168af1 baro tuning: make hpf argument optional
This filter is often not needed. Setting the default value to -1 makes it
optional.
2024-07-29 14:20:41 +02:00
Silvan Fuhrer 9257744da3 TECS: reduce default of FW_T_SPD_STD to reduce airspeed measurement delay (#23441)
Signed-off-by: Silvan Fuhrer <silvan@auterion.com>
2024-07-29 11:14:59 +02:00
Silvan Fuhrer d841bf124f fw_position_control: use time literals 2024-07-26 18:01:44 +02:00
Marco Hauswirth 9d9d8aeb4c bugfix: wrong reset_counter used 2024-07-26 18:01:44 +02:00
Marco Hauswirth 5808dac4bc reset position-mode line following after position reset 2024-07-26 18:01:44 +02:00
Silvan Fuhrer 97561d7802 Commander: never allow to switch out of Terminate state with user intend
Signed-off-by: Silvan Fuhrer <silvan@auterion.com>
2024-07-26 09:53:07 +02:00
Silvan Fuhrer ee8030de56 Commander: do not switch out of Terminte after disarm
Signed-off-by: Silvan Fuhrer <silvan@auterion.com>
2024-07-26 09:53:07 +02:00
bresch 0b1eba948a ekf2-flow: add param to force using internal gyro
In some cases the vibration environment of the optical flow sensor is
worse than near the autopilot.
2024-07-25 19:54:19 -04:00
Hamish Willee a07c986dbc Params generated as markdown table (#23443) 2024-07-26 07:46:11 +10:00
sbtjagu 85b6b0a406 ackermann: added delay comand support (#23445) 2024-07-25 17:13:30 +02:00
oravla5 b76c1c97b3 ekf2: Optical flow enabled by default 2024-07-25 10:01:35 +02:00
Daniel Agar fd72578e98 ekf2: avoid constraining parameters every iteration 2024-07-25 09:51:35 +02:00
Silvan Fuhrer ebcfb5348c Navigator: increase stack by 40 bytes
Signed-off-by: Silvan Fuhrer <silvan@auterion.com>
2024-07-25 09:22:23 +02:00
Peter van der Perk 4ca3e1b6e6 mr_canhubk3: add netman in default.px4board 2024-07-24 11:39:44 -04:00
Peter van der Perk af36c0b6ec mr_canhubk3: generate mtd_net when file is missing 2024-07-24 11:39:44 -04:00
David Sidrane b38305dd21 CONFIG_BOARD_ROOT_PATH is not dependant on Logger only 2024-07-24 11:39:44 -04:00
David Sidrane ab82c24e3e systemcmds:Use CONFIG_BOARD_ROOT_PATH instead of string constant 2024-07-24 11:39:44 -04:00
David Sidrane 54b20f1ff3 mavlink:Use CONFIG_BOARD_ROOT_PATH instead of string constant 2024-07-24 11:39:44 -04:00
David Sidrane ea92c7ffcc lib:Use CONFIG_BOARD_ROOT_PATH instead of string constant 2024-07-24 11:39:44 -04:00
David Sidrane d0d9aaa6e9 drivers:Use CONFIG_BOARD_ROOT_PATH instead of string constant 2024-07-24 11:39:44 -04:00
David Sidrane 3fa9cda505 platforms/common:Use CONFIG_BOARD_ROOT_PATH instead of string constant 2024-07-24 11:39:44 -04:00
Peter van der Perk a99cc0a20b Remove unused kconfig symbol 2024-07-24 11:39:44 -04:00
Peter van der Perk 46e43ec725 Decouple filepaths from rcS/MTD 2024-07-24 11:39:44 -04:00
bresch 79e0e00d8c ekf2: block process noise increment without constraining the variance
The wind variance can be reset to a value larger than the wind init
variance (e.g.: when the reset occurs when flying close to the N or E
axis). Constraining the variance after a covariance initialization would
artificially increase the correlation and could destabilize the filter.
2024-07-24 17:11:53 +02:00
Marco Hauswirth 39abd87949 set best sensor to -1 after last sensor fails (#23425) 2024-07-24 11:24:07 +02:00
Stockton Slack 36d89df0a7 Fix load monitoring inconsistency bug 2024-07-22 10:33:39 +02:00
Daniel Agar 9ff6c4bf28 remove newlines 2024-07-19 18:25:43 -04:00
alexklimaj b46b2cdf54 airframes: droneblocks dexi 5 default to CRSF on RC input with telemetry 2024-07-19 18:23:25 -04:00
Daniel Agar 85de0ff227 boards: move ARK fmu-v6x/pi6x to dedicated RC drivers 2024-07-19 15:42:05 -04:00
Daniel Agar 3a3f04c0f4 drivers/rc: new standalone ghst_rc driver
- extracted from monolithic drivers/rc_input which will eventually be
   dropped once all drivers migrated and boards updated
2024-07-19 15:42:05 -04:00
Daniel Agar 7a6c4f0bfa drivers/rc: new standalone sbus_rc driver
- extracted from monolithic drivers/rc_input which will eventually be
   dropped once all drivers migrated and boards updated
2024-07-19 15:42:05 -04:00
Daniel Agar 561dceea7b drivers/rc: new standalone dsm_rc driver
- extracted from monolithic drivers/rc_input which will eventually be
   dropped once all drivers migrated and boards updated
2024-07-19 15:42:05 -04:00
chfriedrich98 aa0dda7443 ackermann: fix naming conventions 2024-07-19 14:43:40 +02:00
chfriedrich98 f8bebd9e41 ackermann: implement pure pursuit lib 2024-07-19 14:43:40 +02:00
Matthias Grob f2bca92221 Fix duplicate newlines at the end of files 2024-07-19 14:33:36 +02:00
Matthias Grob 7f14110bb1 Fix missing newlines at the end of files 2024-07-19 14:33:36 +02:00
Matthias Grob fe3cd4b0cb Add check for missing or duplicate newlines at the end of files 2024-07-19 14:33:36 +02:00
Roman Bapst 1b9f1b78e5 Added support for resetting wind states to external observation (#23277)
* added support for resetting wind states to external observation

Signed-off-by: RomanBapst <bapstroman@gmail.com>

* moved wind related functions into separate file

Signed-off-by: RomanBapst <bapstroman@gmail.com>

* added VEHICLE_CMD_EXTERNAL_WIND_ESTIMATE

Signed-off-by: RomanBapst <bapstroman@gmail.com>

* correctly compute variances

Signed-off-by: RomanBapst <bapstroman@gmail.com>

* ekf2: implement wind reset

Signed-off-by: RomanBapst <bapstroman@gmail.com>

* only allow VEHICLE_CMD_EXTERNAL_WIND_ESTIMATE during wind dead-reckoning
and increase horizontal velocity variance to allow velocity states to move
towards solution that is aligned with the newly set wind

Signed-off-by: RomanBapst <bapstroman@gmail.com>

* only reset wind on ground

* still use wind reset using airspeed when it wasn't initialized

* exclude func for rover, change reset interface

* handle wind reset in drag-fusion

* replace state reset with variance reset in sideslip/drag fusion

* remove resetWind function

---------

Signed-off-by: RomanBapst <bapstroman@gmail.com>
Co-authored-by: Marco Hauswirth <marco.hauswirth@auterion.com>
2024-07-19 14:33:08 +02:00
Daniel Agar ca9948a84d msgs/EstimatorStatus.msg rename mag_test_ratio -> hdg_test_ratio
- this is used for more than just mag
2024-07-18 16:39:18 +02:00
Daniel Agar eac14b7db2 ekf2/commander: simplify navigation filter preflight checks
- remove commander test ratio "tuning knobs" (COM_ARM_EKF_{HGT,POS,VEL,YAW})
   - these are effectively redundant with the actual tuning (noise & gate)
     in the estimator, plus most users have no idea why they'd be
     adjusting these other than to silence an annoying preflight complaint
 - remove ekf2 "PreFlightChecker" with hard coded innovation limits
 - ekf2 preflight innovation flags are now simply if any active source
   exceeds half the limit preflight
2024-07-18 16:39:18 +02:00
chfriedrich98 a42dc2165c add pure pursuit library 2024-07-18 13:25:05 +02:00
chfriedrich98 08c790217d battery: increase max value for battery thresholds 2024-07-18 09:46:58 +02:00
chfriedrich98 5083ec52ec battery: migrate parameters in .c file to .yaml file 2024-07-18 09:46:58 +02:00
Daniel Agar f8f8ddc101 ekf2: optical flow update last hor vel timestamp on success 2024-07-17 14:46:48 -04:00
Daniel Agar 691fdf713c ekf2: airspeed update last hor vel timestamp if successfully updating all states 2024-07-17 14:46:48 -04:00
Daniel Agar 57c1ba545f ekf2: fake_hgt don't use fuseVerticalPosition helper
- fake_hgt shouldn't update _time_last_hgt_fuse
2024-07-17 14:46:48 -04:00
Daniel Agar 6fe0fa6d63 ekf2: fake_pos don't use fuseHorizontalPosition helper
- fake_pos shouldn't update _time_last_hor_pos_fuse
2024-07-17 14:46:48 -04:00
Daniel Agar c5c27a87f1 ekf2: track last terrain fuse time and update logic 2024-07-17 10:16:32 -04:00
chfriedrich98 8c4620b77e battery: simplify battery scale calculation (#23417) 2024-07-17 12:22:52 +02:00
bresch 81575049df ekf2: reword EKF2_GPS_CHECK param 2024-07-16 10:15:19 -04:00
Daniel Agar f832ae688d ekf2: require valid filter vz for GPS vspeed check 2024-07-16 10:15:19 -04:00
bresch 20c0d3a096 ekf2: enable all GNSS checks by default 2024-07-16 10:15:19 -04:00
bazooka joe b48aca10a0 mc_position_control: avoid calculating arw if not needed 2024-07-16 13:30:40 +02:00
Daniel Agar 397ff4a102 ekf2: sideslip symforce increase epsilon to avoid 1/e^2 numerical issues 2024-07-16 11:10:58 +02:00
Daniel Agar 13b62a74d6 ekf2: optical flow adjust jacobian epsilon to avoid numerical issues
- in the generated code there's a 1 / eps^2 term if the height and
   terrain estimates are the same
2024-07-16 11:10:58 +02:00
Claudio Chies 76cf54c948 adapted UORB Description to match MAVLink 2024-07-16 11:07:03 +02:00
Jacob Dahl aa8a9e3a06 laser scan subscription optional 2024-07-16 11:07:03 +02:00
Jacob Dahl fe5a07a96d gz: added x500_lidar model for publishing obstacle_distance 2024-07-16 11:07:03 +02:00
Daniel Agar 48f1687d3a ekf2: cleanup legacy EKF solution_status_flags 2024-07-16 10:11:27 +02:00
Daniel Agar 1cd7d54170 ekf2: consolidate GNSS yaw in gnss_yaw_control.cpp and fix naming (GPS->GNSS)
Co-authored-by: Mathieu Bresciani <brescianimathieu@gmail.com>
2024-07-15 12:50:51 -04:00
bresch 9d6c2baa90 ekf2-flow: only allow flow when in range
Also, as the flow makes the link between range and horizontal velocity,
only allow it to start if at least one of the two is known. Otherwise
the EKF will struggle to estimate both values at the same time.
2024-07-15 11:40:33 -04:00
Daniel Agar 8e5f28f834 ekf2: rng only reset vz as a last resort 2024-07-15 11:39:56 -04:00
Daniel Agar 80ee622f77 ekf2: baro only reset vz as a last resort 2024-07-15 11:39:56 -04:00
Daniel Agar 40349fa3dc ekf2: EV velocity control should own vertical velocity reset if height failing 2024-07-15 11:39:56 -04:00
Daniel Agar 177613eb68 ekf2: GNSS velocity control should own vertical velocity reset if height faiing
- GNSS height control using the velocity sample directly is ignoring
   potential position offsets
2024-07-15 11:39:56 -04:00
PX4 BuildBot 9bbfc8715e Update submodule mavlink to latest Mon Jul 15 12:39:00 UTC 2024
- mavlink in PX4/Firmware (abcf9ca6f0aadc91b203342db689f07630ec0e3a): https://github.com/mavlink/mavlink/commit/da3223ff9380bfe8e496fab8df2cbb06d5f8d5c3
    - mavlink current upstream: https://github.com/mavlink/mavlink/commit/d65952bacc02c4a5a1ed8249be73e6a66fa800ab
    - Changes: https://github.com/mavlink/mavlink/compare/da3223ff9380bfe8e496fab8df2cbb06d5f8d5c3...d65952bacc02c4a5a1ed8249be73e6a66fa800ab

    d65952ba 2024-07-05 Peter Barker - common.xml: correct description of GLOBAL_POSIITON_INT.relative_alt frame (#2131)
5fc2ff8e 2024-06-26 Hamish Willee - Add multiplier field to docs, if present (#2125)
a13d2317 2024-06-26 Roman Bapst - Added MAV_CMD_EXTERNAL_WIND_ESTIMATE to development (#2122)
d8af87fd 2024-06-19 jokalode - Update common.xml (#2116)
2024-07-15 11:18:19 -04:00
Daniel Agar e03aef616c ekf2: add terrain/dist_bottom reset deltas (vehicle_local_position/vehicle_global_position) 2024-07-15 10:25:42 -04:00
Daniel Agar a5a67315fd ekf2: optical flow magnitude check compensated
- additionally don't use flow for reset if magnitude isn't acceptable
2024-07-15 09:46:59 -04:00
Boris be551097e0 mc_wind_estimator_tuning: Changed Quaternion package installed by requirements.txt 2024-07-15 11:40:12 +02:00
Daniel Agar dc5f8118b0 ekf2: range finder cleanup duplicate logic 2024-07-15 11:37:36 +02:00
KonradRudin 59b96f4968 tecs: fast descend: do not shut down throttle while still climbing (#23397) 2024-07-15 10:42:43 +02:00
Liu1 b1b0032b8d BMP581: Add Bosch BMP581 barometer (#23064)
* BMP581: Add Bosch BMP581 barometer

* Copyright:fix copyright header year

* style: not use pointers and Bool returns, Check the failed condition return

* delay: Replace usleep() with ScheduleDelayed()

* definitions: Delete unused definitions

* comment: Delet redundant comments

* constants: Change to uppercase

* BMP581: run make format
2024-07-14 14:08:20 -08:00
Matthias Grob e2b31454a3 SubscriptionInterval: move updated, update, copy function to a cpp file
Saves 17.3 kilobytes of flash 😮
2024-07-12 23:26:24 +02:00
Claudio Chies 33be5d8356 Survey - fix of survey tracking problem on steep slopes (#23371)
* initial working

* incoperated review
2024-07-11 14:54:22 +02:00
Daniel Agar 9124a7b471 ekf2: add IMU delta_ang_dt/delta_vel_dt safety constrain before pushing into buffer 2024-07-10 21:20:47 -04:00
Daniel Agar ac77049c47 ekf2: directly use IMU sample to find corresponding aid source sample
- I think this helps make it clear we're using a sensor sample
   corresponding with a particular IMU sample
2024-07-10 21:20:47 -04:00
Daniel Agar f93dc61770 ekf2: use bias corrected angular velocity
- avoid unnecessarily storing _ang_rate_delayed_raw
2024-07-10 21:20:47 -04:00
Julian Oes 20137bea40 boards: add console build for Cube Orange(+)
This adds a build variant which enables the serial console, and
therefore disables the ADSB receiver.
2024-07-10 21:14:08 -04:00
Claudio Chies 57e303b11b bugfix for failing actions 2024-07-10 21:12:55 -04:00
PX4 BuildBot e0ea91fc27 Update submodule gz to latest Thu Jul 11 00:39:09 UTC 2024
- gz in PX4/Firmware (2c3401dc83): https://github.com/PX4/PX4-gazebo-models/commit/881558c8c274d0d9f21970de24333122e050b561
    - gz current upstream: https://github.com/PX4/PX4-gazebo-models/commit/312cd002ff9602644efef58eef93e447c10dcbe8
    - Changes: https://github.com/PX4/PX4-gazebo-models/compare/881558c8c274d0d9f21970de24333122e050b561...312cd002ff9602644efef58eef93e447c10dcbe8

    312cd00 2024-07-08 chfriedrich98 - Add rover ackermann model (#46)
2024-07-10 21:05:57 -04:00
chfriedrich98 c391509c23 ackermann: add SITL airframe 2024-07-10 21:04:59 -04:00
Matthias Grob 2c3401dc83 uORB: SubscriptionInterval fix timestamp wrapping when initializing less than the interval time after boot (#23384)
* SubscriptionInterval: ensure _last_update is never before timer start
2024-07-10 12:43:31 -04:00
Daniel Agar 75bb339d94 ekf2: remove warning events logging
- some of these warning flags aren't even being used, and most of the rest we can figure out from other sources
2024-07-10 10:43:55 -04:00
Daniel Agar c29b4ff87e ekf2: apply astyle formatting and enforce 2024-07-10 10:43:55 -04:00
chfriedrich98 3fe609f769 exclude 4017 from v5x to save flash 2024-07-10 12:06:48 +02:00
chfriedrich98 03ff837c50 ackermann: new features and improvements
added return mode support, slew rates for actuators, new ackermann specific message, improved cornering slow down effect and fixed logging issue.
2024-07-10 12:06:48 +02:00
Daniel Agar 223397c20e ekf2: always add accel/gyro bias process noise
- continue adding accel/gyro bias process noise even if inhibited
2024-07-10 11:49:01 +02:00
Marco Hauswirth 419652b9fe EKF2: Spoofing GPS check (#23366)
* estimator gps check fail flag for spoofing

* warn whenever spoofing state changes to true, use default hysteresis to completely stop fusion

* dont introduce more GPS namings, GNSS instead

* flash: exclude mantis for cuav_x7pro
2024-07-09 16:31:11 +02:00
Daniel Agar 62ff39a669 ekf2: EV vel (body) update last fuse timestamps
- these are set by the NED fuseVelocity() helper so also need to be set in the body frame velocity case
2024-07-09 10:16:12 -04:00
Daniel Agar 5d08b97fd7 ekf2: add vehicle_local_position dist_bottom_var 2024-07-09 10:10:01 -04:00
Daniel Agar 3e3b886b5d ekf2: add terrain estimator_status_flags 2024-07-09 10:10:01 -04:00
Daniel Agar 64a6971bdb ekf2: only limit opt flow HAGL if range only terrain
- increase HALG limit from 75%->90% of sensor max
2024-07-09 10:10:01 -04:00
Daniel Agar c56f84fe8a ekf2: range, check if terrain valid for reset on fusion timeout 2024-07-09 10:10:01 -04:00
Daniel Agar e52025cc20 ekf2: optical flow fusion timeout only reset if quality is good 2024-07-09 10:10:01 -04:00
Daniel Agar 6be06ecbb3 ekf2: optical flow failing also reset terrain if needed 2024-07-09 10:10:01 -04:00
Daniel Agar ea8f14b883 ekf2: optical flow logic, timeout if bad_tilt, etc
- previously we could get stuck with optical flow still technically
   active (_control_status.flags.opt_flow=true), but nothing being
updated due to excessive tilt, etc
2024-07-09 10:10:01 -04:00
Daniel Agar 8bf15b01c4 ekf2: optical flow don't compute innovation variance twice
- collapse updateOptFlow() and startFlowFusion() to avoid recomputing H
 - this is a relatively expensive call we can easily avoid with the
   right structure
2024-07-09 10:10:01 -04:00
Daniel Agar f709ed409d ekf2: optical flow stop reset all flags 2024-07-09 10:10:01 -04:00
Daniel Agar 9dfd82ab06 ekf2: optical flow remove _flow_data_ready flag 2024-07-09 10:10:01 -04:00
Daniel Agar 7047f9441c ekf2: fix calcOptFlowBodyRateComp() gyro bias
- adjust flow sample gyro_rate immediately after popping from ring
   buffer
 - always update flow gyro bias (calcOptFlowBodyRateComp()) regardless
   of flow quality or magnitude
2024-07-09 10:10:01 -04:00
Daniel Agar 4d324da9f8 ekf2: update flow aid src status every sample 2024-07-09 10:10:01 -04:00
Daniel Agar bcd666b3f8 ekf2: fix optical flow start logic
- remove fallthrough that enables flow regardless of success
 - add appropriate start messages for each case
2024-07-09 10:10:01 -04:00
Daniel Agar bf4e564b23 ekf2: resetTerrainToFlow() reset aid src status appropriately 2024-07-09 10:10:01 -04:00
Daniel Agar ced609daa8 ekf2: flow fusion start require valid fusion 2024-07-09 10:10:01 -04:00
Daniel Agar 1df8f3f9d2 ekf2: resetFlowFusion() reset aid src status appropriately 2024-07-09 10:10:01 -04:00
Roman Bapst 8221940b60 Added pitot tube icing detection (#23206)
* lib: add FilteredDerivative class

* AirspeedValidator: add first principle check

- filters throttle, pitch and airspeed rate, and triggers
if the airspeed rate is negative even though the vehicle
is pitching down and giving high throttle.
Check has to fail for duration defined by ASPD_FP_T_WINDOW
to trigger an airspeed failure.

* AirspeedValidator: define constants for first principle check

* FilteredDerivative: set initialised to false if sample interval is invalid

* airspeed_selector: improved comment

* increase IAS derivative filter time constant from 4 to 5

* use legacy parameter handling for FW_PSP_OFF

* handle FW_THR_MAX as well

* ROMFS/airframes: exclude some airframes for v6x and v4pro to save flash on them

---------

Signed-off-by: Silvan Fuhrer <silvan@auterion.com>
Signed-off-by: RomanBapst <bapstroman@gmail.com>
Co-authored-by: Silvan Fuhrer <silvan@auterion.com>
2024-07-09 11:16:40 +02:00
Julian Oes a35cecece4 gnss: add missing include
Breaks CLion otherwise.
2024-07-08 20:38:40 -04:00
Peter van der Perk 6bd81f38a6 imxrt dshot timing fix (#23365)
* imxrt: Change PLL settings for more accurate dshot timing
* Update NuttX submodule
2024-07-08 12:57:15 -04:00
Silvan Fuhrer 77709c2948 FW Position control: clean up param descriptions
Mostly to save flash, but also to improve generally.

Signed-off-by: Silvan Fuhrer <silvan@auterion.com>
2024-07-08 16:44:09 +02:00
Claudio Chies aed0fd41cf SIH - change how LAT and LON is used for Takeoff location (#23363)
change how lat long is used for SIH
2024-07-08 14:51:08 +02:00
Marco Hauswirth 4bc0286eb8 fix error from refactring commit, fix reset on ground (#23370) 2024-07-08 13:55:05 +02:00
Marco Hauswirth e04c53241a EKF2: reset position by fusion (#23279)
* reset position by fusion

* handle local_pos_valid for fixed wing in gnss denied

* [WIP] ekf2: setEkfGlobalOrigin respect current height reference and vertical position aiding

* global origin, also reset vertical pos without gps as ref

* fix wo gnss, that bitcraze ci passes

* revert some changes as requested

* remove duplicate reset messages

* undo unrelated whitespace changes, I'll fix it everywhere in a followup

* [SQUASH] ekf2: add vehicle_command_ack

* resetGlobalPosToExternalObservation consolidate logic

* remove gnss check from local_pos validation check

* reset when  0<accuracy<1, otherwise fuse

* replace gps param with flag

* ekf2: dead reckon time exceeded, respect ZUPT preflight if air data or optical flow expected

* subtract timeout from last inertial dead-reck, change fake pos conditions, save flash

---------

Co-authored-by: Daniel Agar <daniel@agar.ca>
2024-07-07 22:43:55 +02:00
Peter van der Perk ac1effa32a fmu-v6xrt: MTD use full FRAM (32KB) 2024-07-05 10:25:08 -04:00
Ryan Johnston fd8df2e84d Update int_res_est_replay.py (#23351)
Pulls cell count, min voltage and max voltage from log file but still allows for over-rides. Also added debug info to tell user what what it found in the log and what it is using

Co-authored-by: chfriedrich98 <125505139+chfriedrich98@users.noreply.github.com>
2024-07-05 11:04:45 +02:00
Marco Hauswirth a1f43636f3 ekf2: EV fusion in body frame (#23191) 2024-07-04 21:17:19 -04:00
Silvan Fuhrer 1f33abb4e9 battery_status.msg: remove unused fields (#22938)
Signed-off-by: Silvan Fuhrer <silvan@auterion.com>
2024-07-04 11:57:26 +02:00
PonomarevDA 4c5ce7af6b Cyphal: add feedback for 8 ESC 2024-07-03 13:02:18 -04:00
PonomarevDA 8569eeb90c Cyphal: add *type registers for ESC 2024-07-03 13:02:18 -04:00
PonomarevDA f81e36a3a0 Cyphal: optimize ESC setpoint 2024-07-03 13:02:18 -04:00
PonomarevDA 41bd6c92e2 Cyphal: add zubax.telega.CompactFeedback 2024-07-03 13:02:18 -04:00
PonomarevDA 515543b1c5 Cyphal: divide EscClient into 2 publishers, so setpoint and readiness are 2 different ports now 2024-07-03 13:02:18 -04:00
Dmitry Ponomarev 52476633a8 Cyphal: use actual time instead of transfer id in uptime field of heartbeat 2024-07-03 13:02:18 -04:00
Dmitry Ponomarev b063202b45 Cyphal: remove setpoint scaling to 8192 2024-07-03 13:02:18 -04:00
Dmitry Ponomarev d3480d1302 Cyphal: add port.List 2024-07-03 13:02:18 -04:00
Matthias Grob c8c46788ed Autostart: load airframes with priority ROMFS -> SD card 2024-07-03 18:32:16 +02:00
Thomas Frans c0663ee85c gnss(septentrio): fix line lenghth of module documentation 2024-07-03 11:21:34 -04:00
Thomas Frans e27b252433 gnss(septentrio): fix incorrect heading offset configuration
Heading offset was configured as radians but should be configured as
degrees on Septentrio receivers. The parameter was already in degrees
but the configuration logic was changing it into radians. Also allow the
entire allowed range of heading offset values for Septentrio receivers.
2024-07-03 11:21:34 -04:00
Thomas Frans 49dc896d20 gnss(septentrio): fix broken heading
Heading wasn't working because of an incorrect check during parsing.
2024-07-03 11:21:34 -04:00
Thomas Frans bfbbf2ff6f gnss(septentrio): improve SEP_DUMP_COMM parameter documentation
The documentation for `SEP_DUMP_COMM` was quite unclear and users had to
use the user guide to find out what exactly it did. The new
documentation tries to make the purpose clearer.
2024-07-03 11:21:34 -04:00
Thomas Frans 7bb239637e gnss(septentrio): fix error on driver start with same device paths
This fixes an incorrect check of the device paths during instantiation
of the Septentrio driver that caused the driver to start and not print
an error message.
2024-07-03 11:21:34 -04:00
Thomas Frans 522a25a410 gnss(septentrio): first batch of bugfixes after internal testing
Internal testing revealed usability issues. Those and some other
problems are fixed.
2024-07-03 11:21:34 -04:00
Silvan Fuhrer 33701aa3d5 BatteryStatus: remove voltage_filtered_a
Signed-off-by: Silvan Fuhrer <silvan@auterion.com>
2024-07-03 16:41:49 +02:00
Silvan Fuhrer c2ae6a7e24 BatteryStatus: remove current_filtered_a
Signed-off-by: Silvan Fuhrer <silvan@auterion.com>
2024-07-03 16:41:49 +02:00
zhangteng0526 e03e0261a1 Fix buffer overflow in mavlink_receive.cpp 2024-07-03 08:11:32 +02:00
chfriedrich98 f65653a391 battery: add internal resistance estimation 2024-07-02 19:05:13 +02:00
chfriedrich98 71029689e7 battery: add replay file for internal resistance estimation 2024-07-02 19:05:13 +02:00
Silvan Fuhrer 6d549811bc fmu v3: disable GYRO_FFT to save flash
Signed-off-by: Silvan Fuhrer <silvan@auterion.com>
2024-07-02 11:44:54 -04:00
Marco Hauswirth 3880073716 ekf2: fix timeout after gps failure (#23346) 2024-07-02 10:38:49 -04:00
Daniel Agar 0742d356f5 ekf2: more conservative clipping checks for bad_acc_clipping fault status (#23337)
- track accel clipping count per axis
 - only set bad_acc_clipping fault_status if at least one axis is
   clipping continuously or if all have been clipping at warning level
 - Note: this doesn't impact the clipping projections that boost the
   accel process noise, pause bias estimation, and skip gravity fusion
   on a per sample basis
2024-06-28 16:45:08 -04:00
bluedisk 408d8abe95 Tools/setup: fix the wrong - deprecated - expression in the requirements.txt
- Fixes matplotlib version expression from ">=3.0.*" ro ">=3.0" which is the right syntax

Fixes issue #23329

Co-authored-by: lee wonwoo <leewonwoo@leeui-MacBookPro.local>
2024-06-28 10:20:26 -04:00
Alex Klimaj 053b4a4423 drivers/uavcan: GNSS set system time based on fix_type instead of valid_pos_cov 2024-06-27 21:35:45 -04:00
Peter van der Perk 58f7c3e9c9 NuttX with imxrt1170 soc vdd backport (#23333) 2024-06-27 16:21:45 -04:00
PX4 BuildBot 8b26e5e252 Update submodule libevents to latest Thu Jun 27 12:39:19 UTC 2024
- libevents in PX4/Firmware (4e3561cad8d24fefe66d266e969652d7ab20162b): https://github.com/mavlink/libevents/commit/8d5c44661bf79106361eb0b5170025b86e85a525
    - libevents current upstream: https://github.com/mavlink/libevents/commit/9474657606d13301d426e044450c4f84de2221be
    - Changes: https://github.com/mavlink/libevents/compare/8d5c44661bf79106361eb0b5170025b86e85a525...9474657606d13301d426e044450c4f84de2221be

    9474657 2024-06-13 Beat Küng - cmake: add namespaced target & installation include dir
9f2e68d 2024-06-12 Beat Küng - CMakeLists: set CMAKE_CXX_STANDARD if not set
3204e8f 2024-06-12 Beat Küng - parser.h: use std::vector<EventArgumentDefinition>::size_type
eab8144 2024-04-29 Beat Küng - fix parser: avoid signed to unsigned conversion
159f83e 2024-04-29 Beat Küng - cpp: only enable Wall and others for GCC
2024-06-27 16:21:20 -04:00
Matthias Grob e4446adba1 Add check for high RAM usage
We had a case where someone took off with an experimental
system with 100% RAM usage on the embedded system
without noticing. This lead to problems during flight.

Since we already have a CPU load check it seems natural
to also check the reported RAM usage.
2024-06-27 11:20:22 +02:00
Daniel Agar 30b854da35 ekf2: verbose logging control (new EKF2_LOG_VERBOSE)
- new parameter EKF2_LOG_VERBOSE to enable (currently enabled by default)
 - force advertise topics immediately (based on EKF2_LOG_VERBOSE and per aid source configuration)
 - logger optionally log all estimator topics at minimal rate
2024-06-27 01:10:57 -04:00
Patrik Dominik Pordi 8070c70f2c uxrce_dds_client: dds_topics.yaml add vehicle_land_detected
- px4_msgs::msg::VehicleLandDetected has been added to dds_topics.yaml
2024-06-27 01:10:04 -04:00
Daniel Agar 78fd9a15f8 flight_mode_manager: delete unused avoidance waypoint 2024-06-27 01:08:16 -04:00
Daniel Agar 338bcc6ca3 ekf2: disable EKF2_EV_CTRL and EKF2_AGP_CTRL by default 2024-06-26 17:10:28 -04:00
alexklimaj 9cc4e2ac01 boards ark pi6x add vl53l0x 2024-06-26 17:09:37 -04:00
Silvan Fuhrer 1ae96d6509 EKF2: fix builds without CONFIG_EKF2_RANGE_FINDER
Signed-off-by: Silvan Fuhrer <silvan@auterion.com>
2024-06-26 11:05:38 +02:00
bresch a50ef2eb5e ekf2-terrain: make terrain validity based on uncertainty
When using optical flow for terrain aiding, we cannot assume that the
terrain estimate is valid if flow is fused as is can only be observed
during motion. When no direct observation is available, the terrain is
assumed to be valid if its 1sigma uncertainty is < 10% of the hagl.
2024-06-26 11:05:38 +02:00
bresch a665764b0e ekf2: remove unused EKF2_TERR_MASK 2024-06-26 11:05:38 +02:00
bresch 7903ddf5df ekf2-terrain: terrain is not a separate estimator 2024-06-26 11:05:38 +02:00
bresch 9001c23926 ekf2: clean up hagl vs terrain naming
Terrain is the state: terrain vertical position
Hagl (height above ground level) is the vertical distance between the
vertical position and the terrain vertical position
2024-06-26 11:05:38 +02:00
bresch 68980b59e2 ekf2: add terrain state 2024-06-26 11:05:38 +02:00
KonradRudin 09f066a73a mission: skip a vtol takoff mission item if already in air (#23319)
* mission: skip a vtol takoff mission item if already in air and a fixed wing

* MissionBase: also skip FW takeoff when already in-air

Signed-off-by: Silvan Fuhrer <silvan@auterion.com>

* mission: use setNextMissionItem to skip vtol takeoff when already in air

* mission: Only skip the VTOL takeoff in air for mission and rtl mission

If flying RTL mission reverse it must still include the takeoff point.

---------

Signed-off-by: Silvan Fuhrer <silvan@auterion.com>
Co-authored-by: Silvan Fuhrer <silvan@auterion.com>
2024-06-25 16:33:45 +02:00
Nate 6fd0e98a69 Correct units of CRSF GPS altitude
Bug fix to correct returning mm units of altitude to m.
2024-06-24 12:27:21 +02:00
David Sidrane e8e8a60ca8 NuttX with backport of stm32h7 No phy 2024-06-24 06:12:12 -04:00
Matthias Grob 8cc7c99b59 mavlink: report generator error (#23313)
Without this flag the command silently succeeds even though the logs contains
an error. It's much more developer friendly to fail early in case of an error.
The log path is then also shown in the console output.
2024-06-24 10:00:03 +02:00
Daniel Agar 30ce560e3a ekf2: mag control reset filtered test ratio on start (if aligning yaw) 2024-06-20 13:41:54 -04:00
Daniel Agar dcb1103299 ekf2: move estimator_status test ratios to filtered values 2024-06-20 13:41:54 -04:00
898 changed files with 23530 additions and 11167 deletions
+2
View File
@@ -35,6 +35,7 @@ pipeline {
def nuttx_builds_archive = [
target: [
"3dr_ctrl-zero-h7-oem-revg_default",
"airmind_mindpx-v2_default",
"ark_can-flow_canbootloader",
"ark_can-flow_default",
@@ -76,6 +77,7 @@ pipeline {
"matek_h743-mini_default",
"matek_h743-slim_default",
"matek_h743_default",
"micoair_h743_default",
"modalai_fc-v1_default",
"modalai_fc-v2_default",
"mro_ctrl-zero-classic_default",
+1 -1
View File
@@ -9,6 +9,6 @@ tab_width = 8
# Not in the official standard, but supported by many editors
max_line_length = 120
[*.yaml]
[*.yaml, *.yml]
indent_style = space
indent_size = 2
+5 -5
View File
@@ -20,14 +20,14 @@ body:
3. Took off '....'
4. See error
validations:
required: true
required: false
- type: textarea
attributes:
label: Expected behavior
description: A clear and concise description of what you expected to happen.
validations:
required: true
required: false
- type: textarea
attributes:
@@ -45,7 +45,7 @@ body:
placeholder: |
# PASTE HERE THE LINK TO THE LOG
validations:
required: true
required: false
- type: markdown
attributes:
@@ -60,14 +60,14 @@ body:
placeholder: |
# If you don't know the version, paste the output of `ver all` in the MAVLink Shell of QGC
validations:
required: true
required: false
- type: input
attributes:
label: Flight controller
description: Specify your flight controller model (what type is it, where was it bought from, ...).
validations:
required: true
required: false
- type: dropdown
attributes:
+90
View File
@@ -0,0 +1,90 @@
# NOTE: this workflow is now running on Dronecode / PX4 AWS account.
# - If you want to keep the tests running in GitHub Actions you need to uncomment the "runs-on: ubuntu-latest" lines
# and comment the "runs-on: [runs-on,runner=..." lines.
# - If you would like to duplicate this setup try setting up "RunsOn" on your own AWS account try https://runs-on.com
name: Build all targets
on:
push:
branches:
- 'main'
- 'stable'
- 'beta'
- 'release/*'
pull_request:
branches:
- '*'
jobs:
group_targets:
name: Scan for Board Targets
# runs-on: ubuntu-latest
runs-on: [runs-on,runner=1cpu-linux-x64,image=ubuntu22-full-x64,"run-id=${{ github.run_id }}"]
outputs:
matrix: ${{ steps.set-matrix.outputs.matrix }}
timestamp: ${{ steps.set-timestamp.outputs.timestamp }}
steps:
- uses: actions/checkout@v4
- name: Install Python Dependencies
uses: py-actions/py-dependency-install@v4
with:
path: "./Tools/setup/requirements.txt"
- id: set-matrix
run: echo "::set-output name=matrix::$(./Tools/generate_board_targets_json.py --group)"
- id: set-timestamp
run: echo "::set-output name=timestamp::$(date +"%Y%m%d%H%M%S")"
setup:
name: ${{ matrix.group }}
# runs-on: ubuntu-latest
runs-on: [runs-on,runner=8cpu-linux-x64,image=ubuntu22-full-x64,"run-id=${{ github.run_id }}"]
needs: group_targets
strategy:
matrix: ${{ fromJson(needs.group_targets.outputs.matrix) }}
container:
image: ${{ matrix.container }}
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: ownership workaround
run: git config --system --add safe.directory '*'
- name: ccache setup keys
uses: actions/cache@v4
with:
path: ~/.ccache
key: ${{ matrix.group }}-ccache-${{ needs.group_targets.outputs.timestamp }}
restore-keys: ${{ matrix.group }}-ccache-${{ needs.group_targets.outputs.timestamp }}
- name: setup ccache
run: |
mkdir -p ~/.ccache
echo "base_dir = ${GITHUB_WORKSPACE}" > ~/.ccache/ccache.conf
echo "compression = true" >> ~/.ccache/ccache.conf
echo "compression_level = 6" >> ~/.ccache/ccache.conf
echo "max_size = 120M" >> ~/.ccache/ccache.conf
echo "hash_dir = false" >> ~/.ccache/ccache.conf
ccache -s
ccache -z
- name: build target group
run: |
./Tools/ci_build_all_runner.sh ${{matrix.targets}}
- name: Upload px4 package
uses: actions/upload-artifact@v4
with:
name: px4_${{matrix.group}}_build_artifacts
path: |
build/**/*.px4
build/**/*.bin
compression-level: 0
- name: ccache post-run
run: ccache -s
+1
View File
@@ -16,6 +16,7 @@ jobs:
matrix:
check: [
"check_format",
"check_newlines",
"tests",
"tests_coverage",
"px4_fmu-v2_default stack_check",
-58
View File
@@ -1,58 +0,0 @@
name: Compile Linux Targets
on:
push:
branches:
- 'main'
- 'stable'
- 'beta'
- 'release/*'
pull_request:
branches:
- '*'
jobs:
build:
runs-on: ubuntu-latest
container: px4io/px4-dev-armhf:2023-06-26
strategy:
matrix:
config: [
beaglebone_blue_default,
emlid_navio2_default,
px4_raspberrypi_default,
scumaker_pilotpi_default,
]
steps:
- uses: actions/checkout@v1
with:
token: ${{secrets.ACCESS_TOKEN}}
- name: ownership workaround
run: git config --system --add safe.directory '*'
- name: Prepare ccache timestamp
id: ccache_cache_timestamp
shell: cmake -P {0}
run: |
string(TIMESTAMP current_date "%Y-%m-%d-%H;%M;%S" UTC)
message("::set-output name=timestamp::${current_date}")
- name: ccache cache files
uses: actions/cache@v2
with:
path: ~/.ccache
key: ${{matrix.config}}-ccache-${{steps.ccache_cache_timestamp.outputs.timestamp}}
restore-keys: ${{matrix.config}}-ccache-
- name: setup ccache
run: |
mkdir -p ~/.ccache
echo "base_dir = ${GITHUB_WORKSPACE}" > ~/.ccache/ccache.conf
echo "compression = true" >> ~/.ccache/ccache.conf
echo "compression_level = 6" >> ~/.ccache/ccache.conf
echo "max_size = 100M" >> ~/.ccache/ccache.conf
echo "hash_dir = false" >> ~/.ccache/ccache.conf
ccache -s
ccache -z
- name: make ${{matrix.config}}
run: make ${{matrix.config}}
- name: ccache post-run
run: ccache -s
-54
View File
@@ -1,54 +0,0 @@
name: Compile Linux ARM64 Targets
on:
push:
branches:
- 'main'
- 'stable'
- 'beta'
- 'release/*'
pull_request:
branches:
- '*'
jobs:
build:
runs-on: ubuntu-latest
container: px4io/px4-dev-aarch64:2022-08-12
strategy:
matrix:
config: [
scumaker_pilotpi_arm64,
]
steps:
- uses: actions/checkout@v1
with:
token: ${{secrets.ACCESS_TOKEN}}
- name: Prepare ccache timestamp
id: ccache_cache_timestamp
shell: cmake -P {0}
run: |
string(TIMESTAMP current_date "%Y-%m-%d-%H;%M;%S" UTC)
message("::set-output name=timestamp::${current_date}")
- name: ccache cache files
uses: actions/cache@v2
with:
path: ~/.ccache
key: ${{matrix.config}}-ccache-${{steps.ccache_cache_timestamp.outputs.timestamp}}
restore-keys: ${{matrix.config}}-ccache-
- name: setup ccache
run: |
mkdir -p ~/.ccache
echo "base_dir = ${GITHUB_WORKSPACE}" > ~/.ccache/ccache.conf
echo "compression = true" >> ~/.ccache/ccache.conf
echo "compression_level = 6" >> ~/.ccache/ccache.conf
echo "max_size = 100M" >> ~/.ccache/ccache.conf
echo "hash_dir = false" >> ~/.ccache/ccache.conf
ccache -s
ccache -z
- name: make ${{matrix.config}}
run: make ${{matrix.config}}
- name: ccache post-run
run: ccache -s
-136
View File
@@ -1,136 +0,0 @@
name: Compile Nuttx Targets
on:
push:
branches:
- 'main'
- 'stable'
- 'beta'
- 'release/*'
pull_request:
branches:
- '*'
jobs:
build:
runs-on: ubuntu-latest
container: px4io/px4-dev-nuttx-focal:2022-08-12
strategy:
fail-fast: false
matrix:
config: [
airmind_mindpx-v2,
ark_can-flow,
ark_can-gps,
ark_can-rtk-gps,
ark_cannode,
ark_fmu-v6x,
ark_pi6x,
ark_septentrio-gps,
atl_mantis-edu,
av_x-v1,
bitcraze_crazyflie,
bitcraze_crazyflie21,
cuav_can-gps-v1,
cuav_nora,
cuav_x7pro,
cubepilot_cubeorange,
cubepilot_cubeorangeplus,
cubepilot_cubeyellow,
diatone_mamba-f405-mk2,
freefly_can-rtk-gps,
holybro_can-gps-v1,
holybro_durandal-v1,
holybro_kakutef7,
holybro_kakuteh7,
holybro_pix32v5,
matek_gnss-m9n-f4,
matek_h743,
matek_h743-mini,
matek_h743-slim,
modalai_fc-v1,
modalai_fc-v2,
mro_ctrl-zero-classic,
mro_ctrl-zero-f7,
mro_ctrl-zero-f7-oem,
mro_ctrl-zero-h7,
mro_ctrl-zero-h7-oem,
mro_pixracerpro,
mro_x21,
mro_x21-777,
nxp_fmuk66-e,
nxp_fmuk66-v3,
nxp_mr-canhubk3,
nxp_ucans32k146,
omnibus_f4sd,
px4_fmu-v2,
px4_fmu-v3,
px4_fmu-v4,
px4_fmu-v4pro,
px4_fmu-v5,
px4_fmu-v5x,
px4_fmu-v6c,
px4_fmu-v6u,
px4_fmu-v6x,
px4_fmu-v6xrt,
raspberrypi_pico,
sky-drones_smartap-airlink,
spracing_h7extreme,
uvify_core,
siyi_n7
]
steps:
- uses: actions/checkout@v1
with:
token: ${{secrets.ACCESS_TOKEN}}
- name: Prepare ccache timestamp
id: ccache_cache_timestamp
shell: cmake -P {0}
run: |
string(TIMESTAMP current_date "%Y-%m-%d-%H;%M;%S" UTC)
message("::set-output name=timestamp::${current_date}")
- name: ccache cache files
uses: actions/cache@v2
with:
path: ~/.ccache
key: ${{matrix.config}}-ccache-${{steps.ccache_cache_timestamp.outputs.timestamp}}
restore-keys: ${{matrix.config}}-ccache-
- name: setup ccache
run: |
mkdir -p ~/.ccache
echo "base_dir = ${GITHUB_WORKSPACE}" > ~/.ccache/ccache.conf
echo "compression = true" >> ~/.ccache/ccache.conf
echo "compression_level = 6" >> ~/.ccache/ccache.conf
echo "max_size = 120M" >> ~/.ccache/ccache.conf
echo "hash_dir = false" >> ~/.ccache/ccache.conf
ccache -s
ccache -z
- name: make all_variants_${{matrix.config}}
run: make all_variants_${{matrix.config}}
timeout-minutes: 45
- name: make ${{matrix.config}} bloaty_compileunits
run: make ${{matrix.config}} bloaty_compileunits || true
- name: make ${{matrix.config}} bloaty_inlines
run: make ${{matrix.config}} bloaty_inlines || true
- name: make ${{matrix.config}} bloaty_segments
run: make ${{matrix.config}} bloaty_segments || true
- name: make ${{matrix.config}} bloaty_symbols
run: make ${{matrix.config}} bloaty_symbols || true
- name: make ${{matrix.config}} bloaty_templates
run: make ${{matrix.config}} bloaty_templates || true
- name: make ${{matrix.config}} bloaty_ram
run: make ${{matrix.config}} bloaty_ram || true
- name: make ${{matrix.config}} bloaty_compare_master
run: make ${{matrix.config}} bloaty_compare_master || true
- name: ccache post-run
run: ccache -s
- name: Upload px4 package
uses: actions/upload-artifact@v2
with:
name: px4_package_${{matrix.config}}
path: |
build/**/*.px4
build/**/*.bin
-1
View File
@@ -54,4 +54,3 @@ jobs:
AWS_REGION: 'us-west-1'
SOURCE_DIR: 'build/${{ matrix.target }}/_metadata/'
DEST_DIR: 'Firmware/${{ env.version }}/${{ matrix.target }}/'
+6 -4
View File
@@ -11,6 +11,8 @@ on:
jobs:
build:
runs-on: ubuntu-latest
env:
ACTIONS_ALLOW_USE_UNSECURE_NODE_VERSION: true
strategy:
fail-fast: false
matrix:
@@ -86,7 +88,7 @@ jobs:
run: gdb build/px4_sitl_default/bin/px4 px4.core -ex "thread apply all bt" -ex "quit"
- name: Upload px4 coredump
if: failure()
uses: actions/upload-artifact@v2-preview
uses: actions/upload-artifact@v4
with:
name: coredump
path: px4.core
@@ -101,21 +103,21 @@ jobs:
- name: Upload px4 binary
if: failure()
uses: actions/upload-artifact@v2
uses: actions/upload-artifact@v4
with:
name: binary
path: build/px4_sitl_default/bin/px4
- name: Store PX4 log
if: failure()
uses: actions/upload-artifact@v2
uses: actions/upload-artifact@v4
with:
name: px4_log
path: ~/.ros/log/*/*.ulg
- name: Store ROS log
if: failure()
uses: actions/upload-artifact@v2
uses: actions/upload-artifact@v4
with:
name: ros_log
path: ~/.ros/**/rostest-*.log
+6 -4
View File
@@ -11,6 +11,8 @@ on:
jobs:
build:
runs-on: ubuntu-latest
env:
ACTIONS_ALLOW_USE_UNSECURE_NODE_VERSION: true
strategy:
fail-fast: false
matrix:
@@ -81,7 +83,7 @@ jobs:
run: gdb build/px4_sitl_default/bin/px4 px4.core -ex "thread apply all bt" -ex "quit"
- name: Upload px4 coredump
if: failure()
uses: actions/upload-artifact@v2-preview
uses: actions/upload-artifact@v4
with:
name: coredump
path: px4.core
@@ -96,21 +98,21 @@ jobs:
- name: Upload px4 binary
if: failure()
uses: actions/upload-artifact@v2
uses: actions/upload-artifact@v4
with:
name: binary
path: build/px4_sitl_default/bin/px4
- name: Store PX4 log
if: failure()
uses: actions/upload-artifact@v2
uses: actions/upload-artifact@v4
with:
name: px4_log
path: ~/.ros/log/*/*.ulg
- name: Store ROS log
if: failure()
uses: actions/upload-artifact@v2
uses: actions/upload-artifact@v4
with:
name: ros_log
path: ~/.ros/**/rostest-*.log
+124 -106
View File
@@ -1,3 +1,8 @@
# NOTE: this workflow is now running on Dronecode / PX4 AWS account.
# - If you want to keep the tests running in GitHub Actions you need to uncomment the "runs-on: ubuntu-latest" lines
# and comment the "runs-on: [runs-on,runner=..." lines.
# - If you would like to duplicate this setup try setting up "RunsOn" on your own AWS account try https://runs-on.com
name: SITL Tests
on:
@@ -10,126 +15,139 @@ on:
jobs:
build:
runs-on: ubuntu-latest
name: Testing PX4 ${{ matrix.config.model }}
runs-on: [runs-on,runner=16cpu-linux-x64,image=ubuntu22-full-x64,"run-id=${{ github.run_id }}"]
container:
image: px4io/px4-dev-simulation-focal:2021-09-08
options: --privileged --ulimit core=-1 --security-opt seccomp=unconfined
strategy:
fail-fast: false
matrix:
config:
- {model: "iris", latitude: "59.617693", longitude: "-151.145316", altitude: "48", build_type: "RelWithDebInfo" } # Alaska
# - {model: "standard_vtol", latitude: "-38.071235", longitude: "145.281220", altitude: "31", build_type: "AddressSanitizer" } # Australia
- {model: "tailsitter" , latitude: "29.660316", longitude: "-82.316658", altitude: "30", build_type: "RelWithDebInfo" } # Florida
- {model: "standard_vtol", latitude: "47.397742", longitude: "8.545594", altitude: "488", build_type: "Coverage" } # Zurich
container:
image: px4io/px4-dev-simulation-focal:2021-09-08
options: --privileged --ulimit core=-1 --security-opt seccomp=unconfined
steps:
- uses: actions/checkout@v1
with:
token: ${{ secrets.ACCESS_TOKEN }}
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Download MAVSDK
run: wget "https://github.com/mavlink/MAVSDK/releases/download/v$(cat test/mavsdk_tests/MAVSDK_VERSION)/libmavsdk-dev_$(cat test/mavsdk_tests/MAVSDK_VERSION)_ubuntu20.04_amd64.deb"
- name: Install MAVSDK
run: dpkg -i "libmavsdk-dev_$(cat test/mavsdk_tests/MAVSDK_VERSION)_ubuntu20.04_amd64.deb"
- name: Git Ownership Workaround
run: git config --system --add safe.directory '*'
- name: Prepare ccache timestamp
id: ccache_cache_timestamp
shell: cmake -P {0}
run: |
string(TIMESTAMP current_date "%Y-%m-%d-%H;%M;%S" UTC)
message("::set-output name=timestamp::${current_date}")
- name: ccache cache files
uses: actions/cache@v2
with:
path: ~/.ccache
key: sitl_tests-${{matrix.config.build_type}}-ccache-${{steps.ccache_cache_timestamp.outputs.timestamp}}
restore-keys: sitl_tests-${{matrix.config.build_type}}-ccache-
- name: setup ccache
run: |
mkdir -p ~/.ccache
echo "base_dir = ${GITHUB_WORKSPACE}" > ~/.ccache/ccache.conf
echo "compression = true" >> ~/.ccache/ccache.conf
echo "compression_level = 6" >> ~/.ccache/ccache.conf
echo "max_size = 100M" >> ~/.ccache/ccache.conf
echo "hash_dir = false" >> ~/.ccache/ccache.conf
ccache -s
ccache -z
- id: set-timestamp
name: Set timestamp for cache
run: echo "::set-output name=timestamp::$(date +"%Y%m%d%H%M%S")"
- name: check environment
env:
PX4_HOME_LAT: ${{matrix.config.latitude}}
PX4_HOME_LON: ${{matrix.config.longitude}}
PX4_HOME_ALT: ${{matrix.config.altitude}}
PX4_CMAKE_BUILD_TYPE: ${{matrix.config.build_type}}
run: |
export
ulimit -a
- name: Build PX4
env:
PX4_CMAKE_BUILD_TYPE: ${{matrix.config.build_type}}
run: make px4_sitl_default
- name: ccache post-run px4/firmware
run: ccache -s
- name: Build SITL Gazebo
env:
PX4_CMAKE_BUILD_TYPE: ${{matrix.config.build_type}}
run: make px4_sitl_default sitl_gazebo-classic
- name: ccache post-run sitl_gazebo-classic
run: ccache -s
- name: Build MAVSDK tests
env:
PX4_CMAKE_BUILD_TYPE: ${{matrix.config.build_type}}
DONT_RUN: 1
run: make px4_sitl_default sitl_gazebo-classic mavsdk_tests
- name: ccache post-run mavsdk_tests
run: ccache -s
- name: Cache Key Config
uses: actions/cache@v4
with:
path: ~/.ccache
key: sitl-ccache-${{ steps.set-timestamp.outputs.timestamp }}
restore-keys: sitl-ccache-${{ steps.set-timestamp.outputs.timestamp }}
- name: Core dump settings
run: |
ulimit -c unlimited
echo "`pwd`/%e.core" > /proc/sys/kernel/core_pattern
- name: Cache Conf Config
run: |
mkdir -p ~/.ccache
echo "base_dir = ${GITHUB_WORKSPACE}" > ~/.ccache/ccache.conf
echo "compression = true" >> ~/.ccache/ccache.conf
echo "compression_level = 6" >> ~/.ccache/ccache.conf
echo "max_size = 120M" >> ~/.ccache/ccache.conf
echo "hash_dir = false" >> ~/.ccache/ccache.conf
ccache -s
ccache -z
- name: Run SITL tests
env:
PX4_HOME_LAT: ${{matrix.config.latitude}}
PX4_HOME_LON: ${{matrix.config.longitude}}
PX4_HOME_ALT: ${{matrix.config.altitude}}
PX4_CMAKE_BUILD_TYPE: ${{matrix.config.build_type}}
run: test/mavsdk_tests/mavsdk_test_runner.py --speed-factor 20 --abort-early --model ${{matrix.config.model}} --upload test/mavsdk_tests/configs/sitl.json --verbose
timeout-minutes: 45
- name: Build PX4
env:
PX4_CMAKE_BUILD_TYPE: ${{matrix.config.build_type}}
run: make px4_sitl_default
- name: Look at core files
if: failure()
run: gdb build/px4_sitl_default/bin/px4 px4.core -ex "thread apply all bt" -ex "quit"
- name: Upload px4 coredump
if: failure()
uses: actions/upload-artifact@v2-preview
with:
name: coredump
path: px4.core
- name: Cache Post-Run [px4_sitl_default]
run: ccache -s
- name: Upload px4 binary
if: failure()
uses: actions/upload-artifact@v2-preview
with:
name: binary
path: build/px4_sitl_default/bin/px4
- name: Build SITL Gazebo
env:
PX4_CMAKE_BUILD_TYPE: ${{matrix.config.build_type}}
run: make px4_sitl_default sitl_gazebo-classic
# Report test coverage
- name: Upload coverage
if: contains(matrix.config.build_type, 'Coverage')
run: |
git config --global credential.helper "" # disable the keychain credential helper
git config --global --add credential.helper store # enable the local store credential helper
echo "https://x-access-token:${{ secrets.ACCESS_TOKEN }}@github.com" >> ~/.git-credentials # add credential
git config --global url."https://github.com/".insteadof git@github.com: # credentials add credential
mkdir -p coverage
lcov --directory build/px4_sitl_default --base-directory build/px4_sitl_default --gcov-tool gcov --capture -o coverage/lcov.info
- name: Upload coverage information to Codecov
if: contains(matrix.config.build_type, 'Coverage')
uses: codecov/codecov-action@v1
with:
token: ${{ secrets.CODECOV_TOKEN }}
flags: mavsdk
file: coverage/lcov.info
- name: Cache Post-Run [sitl_gazebo-classic]
run: ccache -s
- name: Download MAVSDK
run: wget "https://github.com/mavlink/MAVSDK/releases/download/v$(cat test/mavsdk_tests/MAVSDK_VERSION)/libmavsdk-dev_$(cat test/mavsdk_tests/MAVSDK_VERSION)_ubuntu20.04_amd64.deb"
- name: Install MAVSDK
run: dpkg -i "libmavsdk-dev_$(cat test/mavsdk_tests/MAVSDK_VERSION)_ubuntu20.04_amd64.deb"
- name: Check PX4 Environment Variables
env:
PX4_HOME_LAT: ${{matrix.config.latitude}}
PX4_HOME_LON: ${{matrix.config.longitude}}
PX4_HOME_ALT: ${{matrix.config.altitude}}
PX4_CMAKE_BUILD_TYPE: ${{matrix.config.build_type}}
run: |
export
ulimit -a
- name: Build PX4 / MAVSDK tests
env:
PX4_CMAKE_BUILD_TYPE: ${{matrix.config.build_type}}
DONT_RUN: 1
run: make px4_sitl_default sitl_gazebo-classic mavsdk_tests
- name: Cache Post-Run [px4_sitl_default sitl_gazebo-classic mavsdk_tests]
run: ccache -s
- name: Core Dump Settings
run: |
ulimit -c unlimited
echo "`pwd`/%e.core" > /proc/sys/kernel/core_pattern
- name: Run SITL / MAVSDK Tests
env:
PX4_HOME_LAT: ${{matrix.config.latitude}}
PX4_HOME_LON: ${{matrix.config.longitude}}
PX4_HOME_ALT: ${{matrix.config.altitude}}
PX4_CMAKE_BUILD_TYPE: ${{matrix.config.build_type}}
run: test/mavsdk_tests/mavsdk_test_runner.py --speed-factor 10 --abort-early --model ${{matrix.config.model}} --upload test/mavsdk_tests/configs/sitl.json --verbose
timeout-minutes: 45
- name: Upload failed logs
if: failure()
uses: actions/upload-artifact@v4
with:
name: failed-${{matrix.config.model}}-logs.zip
path: |
logs/**/**/**/*.log
logs/**/**/**/*.ulg
build/px4_sitl_default/tmp_mavsdk_tests/rootfs/*.ulg
- name: Look at Core files
if: failure() && ${{ hashFiles('px4.core') != '' }}
run: gdb build/px4_sitl_default/bin/px4 px4.core -ex "thread apply all bt" -ex "quit"
- name: Upload PX4 coredump
if: failure() && ${{ hashFiles('px4.core') != '' }}
uses: actions/upload-artifact@v4
with:
name: coredump
path: px4.core
- name: Setup & Generate Coverage Report
if: contains(matrix.config.build_type, 'Coverage')
run: |
git config --global credential.helper "" # disable the keychain credential helper
git config --global --add credential.helper store # enable the local store credential helper
echo "https://x-access-token:${{ secrets.ACCESS_TOKEN }}@github.com" >> ~/.git-credentials # add credential
git config --global url."https://github.com/".insteadof git@github.com: # credentials add credential
mkdir -p coverage
lcov --directory build/px4_sitl_default --base-directory build/px4_sitl_default --gcov-tool gcov --capture -o coverage/lcov.info
- name: Upload Coverage Information to Codecov
if: contains(matrix.config.build_type, 'Coverage')
uses: codecov/codecov-action@v4
with:
token: ${{ secrets.CODECOV_TOKEN }}
flags: mavsdk
file: coverage/lcov.info
+1 -1
View File
@@ -71,7 +71,7 @@
[submodule "src/modules/zenoh/zenoh-pico"]
path = src/modules/zenoh/zenoh-pico
url = https://github.com/px4/zenoh-pico
branch = pr-zubf-werror-fix
branch = dev/1.0.0-px4
[submodule "src/lib/heatshrink/heatshrink"]
path = src/lib/heatshrink/heatshrink
url = https://github.com/PX4/heatshrink.git
+1 -1
View File
@@ -2,4 +2,4 @@
{
"name": "PX4 detect"
}
]
]
+10
View File
@@ -111,6 +111,11 @@ CONFIG:
buildType: MinSizeRel
settings:
CONFIG: px4_fmu-v6xrt_bootloader
3dr_ctrl-zero-h7-oem-revg_default:
short: 3dr_ctrl-zero-h7-oem-revg
buildType: MinSizeRel
settings:
CONFIG: 3dr_ctrl-zero-h7-oem-revg_default
airmind_mindpx-v2_default:
short: airmind_mindpx-v2
buildType: MinSizeRel
@@ -281,6 +286,11 @@ CONFIG:
buildType: MiniSizeRel
settings:
CONFIG: matek_gnss-m9n-f4_default
micoair_h743_default:
short: micoair_h743
buildType: MinSizeRel
settings:
CONFIG: micoair_h743_default
modalai_fc-v1_default:
short: modalai_fc-v1
buildType: MinSizeRel
+9 -1
View File
@@ -113,12 +113,20 @@ include(px4_parse_function_args)
include(px4_git)
execute_process(
COMMAND git describe --exclude ext/* --always --tags
COMMAND git describe --exclude ext/* --tags --match "v[0-9]*"
OUTPUT_VARIABLE PX4_GIT_TAG
OUTPUT_STRIP_TRAILING_WHITESPACE
RESULTS_VARIABLE GIT_DESCRIBE_RESULT
WORKING_DIRECTORY ${PX4_SOURCE_DIR}
)
# if proper git tag unavilable default to v0.0.0
if(NOT ${GIT_DESCRIBE_RESULT} MATCHES "0")
set(PX4_GIT_TAG "v0.0.0")
endif()
message(STATUS "PX4_GIT_TAG: ${PX4_GIT_TAG}")
# git describe to X.Y.Z version
string(REPLACE "." ";" VERSION_LIST ${PX4_GIT_TAG})
+11
View File
@@ -185,6 +185,17 @@ menu "Serial ports"
string "EXT2 tty port"
endmenu
menu "File paths"
config BOARD_ROOT_PATH
string "PX4 Root file path"
default "/fs/microsd"
config BOARD_PARAM_FILE
string "Parameter file"
default "/fs/mtd_params"
endmenu
menu "drivers"
source "src/drivers/Kconfig"
endmenu
+10 -4
View File
@@ -324,6 +324,7 @@ px4io_update:
git status
bootloaders_update: \
3dr_ctrl-zero-h7-oem-revg_bootloader \
ark_fmu-v6x_bootloader \
ark_pi6x_bootloader \
cuav_nora_bootloader \
@@ -339,6 +340,7 @@ bootloaders_update: \
matek_h743_bootloader \
matek_h743-mini_bootloader \
matek_h743-slim_bootloader \
micoair_h743_bootloader \
modalai_fc-v2_bootloader \
mro_ctrl-zero-classic_bootloader \
mro_ctrl-zero-h7_bootloader \
@@ -379,9 +381,9 @@ doxygen:
@$(PX4_MAKE) -C "$(SRC_DIR)"/build/doxygen
@touch "$(SRC_DIR)"/build/doxygen/Documentation/.nojekyll
# Astyle
# Style
# --------------------------------------------------------------------
.PHONY: check_format format
.PHONY: check_format format check_newlines
check_format:
$(call colorecho,'Checking formatting with astyle')
@@ -392,6 +394,10 @@ format:
$(call colorecho,'Formatting with astyle')
@"$(SRC_DIR)"/Tools/astyle/check_code_style_all.sh --fix
check_newlines:
$(call colorecho,'Checking for missing or duplicate newlines at the end of files')
@"$(SRC_DIR)"/Tools/astyle/check_newlines.sh
# Testing
# --------------------------------------------------------------------
.PHONY: tests tests_coverage tests_mission tests_mission_coverage tests_offboard tests_avoidance
@@ -545,14 +551,14 @@ distclean:
# All other targets are handled by PX4_MAKE. Add a rule here to avoid printing an error.
%:
$(if $(filter $(FIRST_ARG),$@), \
$(error "Make target $@ not found. It either does not exist or $@ cannot be the first argument. Use '$(MAKE) help|list_config_targets' to get a list of all possible [configuration] targets."),@#)
$(error "Make target $@ not found. It either does not exist or $@ cannot be the first argument. Use '$(MAKE) list_config_targets' to get a list of all possible [configuration] targets."),@#)
# Print a list of non-config targets (based on http://stackoverflow.com/a/26339924/1487069)
help:
@echo "Usage: $(MAKE) <target>"
@echo "Where <target> is one of:"
@$(MAKE) -pRrq -f $(lastword $(MAKEFILE_LIST)) : 2>/dev/null | \
awk -v RS= -F: '/^# File/,/^# Finished Make data base/ {if ($$1 !~ "^[#.]") {print $$1}}' | sort | \
awk -v RS= -F: '/(^|\n)# Files(\n|$$)/,/(^|\n)# Finished Make data base/ {if ($$1 !~ "^[#.]") {print $$1}}' | sort | \
egrep -v -e '^[^[:alnum:]]' -e '^($(subst $(space),|,$(ALL_CONFIG_TARGETS)))$$' -e '_default$$' -e '^(Makefile)'
@echo
@echo "Or, $(MAKE) <config_target> [<make_target(s)>]"
+5
View File
@@ -120,6 +120,7 @@ add_custom_command(
${romfs_gen_root_dir}/init.d/rc.serial
${romfs_gen_root_dir}/init.d/rc.autostart
${romfs_gen_root_dir}/init.d/rc.autostart.post
${romfs_gen_root_dir}/init.d/rc.filepaths
${romfs_copy_stamp}
COMMAND ${CMAKE_COMMAND} -E remove_directory ${romfs_gen_root_dir}/*
COMMAND ${CMAKE_COMMAND} -E tar xf ${romfs_tar_file}
@@ -131,6 +132,9 @@ add_custom_command(
--rc-dir ${romfs_gen_root_dir}/init.d
--serial-ports ${board_serial_ports} ${added_arguments}
--config-files ${module_config_files} #--verbose
COMMAND ${PYTHON_EXECUTABLE} ${PX4_SOURCE_DIR}/Tools/filepaths/generate_config.py
--rc-dir ${romfs_gen_root_dir}/init.d
--params-file ${CONFIG_BOARD_PARAM_FILE}
COMMAND ${CMAKE_COMMAND} -E touch ${romfs_copy_stamp}
WORKING_DIRECTORY ${romfs_gen_root_dir}
DEPENDS ${romfs_tar_file}
@@ -320,6 +324,7 @@ add_custom_target(romfs_gen_files_target
DEPENDS
${romfs_copy_stamp}
${romfs_gen_root_dir}/init.d/rc.serial
${romfs_gen_root_dir}/init.d/rc.filepaths
romfs_extras.stamp
)
+3 -14
View File
@@ -21,25 +21,14 @@ set R /
#
ver all
if mft query -q -k MTD -s MTD_PARAMETERS -v /fs/mtd_params
then
set PARAM_FILE /fs/mtd_params
fi
if mft query -q -k MTD -s MTD_PARAMETERS -v /dev/eeeprom0
then
set PARAM_FILE /dev/eeeprom0
fi
if mft query -q -k MTD -s MTD_PARAMETERS -v /mnt/qspi/params
then
set PARAM_FILE /mnt/qspi/params
fi
# Load param file location from kconfig
. ${R}etc/init.d/rc.filepaths
#
# Load parameters.
#
param select $PARAM_FILE
if ! param load
then
param reset_all
@@ -29,4 +29,3 @@ param set-default PWM_MAIN_FUNC1 101
param set-default PWM_MAIN_FUNC2 102
param set-default PWM_MAIN_FUNC3 103
param set-default PWM_MAIN_FUNC4 104
@@ -30,4 +30,3 @@ param set-default PWM_MAIN_FUNC3 103
param set-default PWM_MAIN_FUNC4 104
param set-default EKF2_RNG_A_HMAX 10
@@ -94,4 +94,3 @@ param set-default CA_METHOD 0
# disable attitude failure detection
param set-default FD_FAIL_P 0
param set-default FD_FAIL_R 0
@@ -12,4 +12,3 @@ param set-default PWM_MAIN_FUNC1 101
param set-default PWM_MAIN_FUNC2 102
param set-default PWM_MAIN_FUNC3 103
param set-default PWM_MAIN_FUNC4 104
@@ -47,5 +47,5 @@ param set-default MPC_ALT_MODE 2
param set-default SENS_FLOW_ROT 6
param set-default SENS_FLOW_MINHGT 0.7
param set-default SENS_FLOW_MAXHGT 3
param set-default SENS_FLOW_MAXHGT 15
param set-default SENS_FLOW_MAXR 2.5
@@ -30,4 +30,3 @@ param set-default PWM_MAIN_FUNC3 103
param set-default PWM_MAIN_FUNC4 104
param set-default LPE_FUSION 242
@@ -18,4 +18,3 @@ param set-default LPE_FUSION 132
# AEQ: External heading set to use vision input
param set-default ATT_EXT_HDG_M 1
@@ -41,4 +41,3 @@ param set-default PWM_MAIN_FUNC1 101
param set-default PWM_MAIN_FUNC2 102
param set-default PWM_MAIN_FUNC3 103
param set-default PWM_MAIN_FUNC4 104
@@ -61,4 +61,3 @@ param set-default PWM_MAIN_FUNC5 105
param set-default PWM_MAIN_FUNC6 106
param set-default PWM_MAIN_FUNC7 107
param set-default PWM_MAIN_FUNC8 108
@@ -68,5 +68,3 @@ param set-default PWM_MAIN_FUNC7 202
param set-default PWM_MAIN_FUNC8 203
param set-default PWM_MAIN_FUNC9 206
param set-default PWM_MAIN_REV 256
@@ -39,7 +39,6 @@ param set-default FW_T_SINK_MIN 2.2
param set-default FW_W_EN 1
param set-default MIS_LTRMIN_ALT 30
param set-default MIS_TAKEOFF_ALT 30
param set-default NAV_ACC_RAD 15
@@ -41,7 +41,6 @@ param set-default FW_T_SINK_MIN 2.2
param set-default FW_W_EN 1
param set-default MIS_LTRMIN_ALT 30
param set-default MIS_TAKEOFF_ALT 30
param set-default NAV_ACC_RAD 15
@@ -71,4 +70,3 @@ param set-default PWM_MAIN_FUNC7 202
param set-default PWM_MAIN_FUNC8 203
param set-default PWM_MAIN_FUNC9 206
param set-default PWM_MAIN_REV 256
@@ -55,4 +55,3 @@ param set-default PWM_MAIN_FUNC7 202
param set-default PWM_MAIN_FUNC8 203
param set-default PWM_MAIN_FUNC9 206
param set-default PWM_MAIN_REV 256
@@ -54,4 +54,3 @@ param set-default PWM_MAIN_FUNC7 202
param set-default PWM_MAIN_FUNC8 203
param set-default PWM_MAIN_FUNC9 206
param set-default PWM_MAIN_REV 256
@@ -55,4 +55,3 @@ param set-default PWM_MAIN_FUNC7 202
param set-default PWM_MAIN_FUNC8 203
param set-default PWM_MAIN_FUNC9 206
param set-default PWM_MAIN_REV 256
@@ -62,4 +62,3 @@ param set-default PWM_MAIN_FUNC7 202
param set-default PWM_MAIN_FUNC8 203
param set-default PWM_MAIN_FUNC9 206
param set-default PWM_MAIN_REV 256
@@ -39,7 +39,6 @@ param set-default FW_T_SINK_MIN 2.2
param set-default FW_W_EN 1
param set-default MIS_LTRMIN_ALT 30
param set-default MIS_TAKEOFF_ALT 30
param set-default NAV_ACC_RAD 15
@@ -23,7 +23,6 @@ param set-default FW_RR_P 0.085
param set-default FW_W_EN 1
param set-default MIS_LTRMIN_ALT 30
param set-default MIS_TAKEOFF_ALT 20
param set-default NAV_ACC_RAD 15
@@ -78,4 +78,3 @@ param set-default VT_FWD_THRUST_EN 4
param set-default VT_FWD_THRUST_SC 1
param set-default VT_F_TRANS_THR 0.75
param set-default VT_TYPE 2
@@ -75,4 +75,3 @@ param set-default VT_F_TRANS_DUR 1.5
param set-default VT_TYPE 0
param set-default WV_EN 0
@@ -88,4 +88,3 @@ param set-default PWM_MAIN_FUNC11 422
param set-default RC_MAP_AUX1 8
param set-default RC_MAP_AUX2 9
param set-default RC_MAP_AUX3 10
@@ -39,7 +39,6 @@ param set-default FW_T_SINK_MIN 2.2
param set-default FW_W_EN 1
param set-default MIS_LTRMIN_ALT 30
param set-default MIS_TAKEOFF_ALT 30
param set-default NAV_ACC_RAD 15
@@ -33,7 +33,7 @@ param set-default PWM_MAIN_FUNC3 103
param set-default PWM_MAIN_FUNC4 104
param set-default PWM_MAIN_FUNC5 0
parm set-default FD_FAIL_R 70
param set-default FD_FAIL_R 70
param set-default FW_P_TC 0.6
@@ -31,4 +31,3 @@ param set-default PWM_MAIN_FUNC1 201
param set-default PWM_MAIN_FUNC2 201
param set-default PWM_MAIN_FUNC6 101
param set-default PWM_MAIN_FUNC7 101
@@ -38,4 +38,3 @@ param set-default PWM_MAIN_FUNC1 201
param set-default PWM_MAIN_FUNC2 201
param set-default PWM_MAIN_FUNC6 101
param set-default PWM_MAIN_FUNC7 101
@@ -41,4 +41,3 @@ param set-default CA_R_REV 3
param set-default PWM_MAIN_FUNC1 101
param set-default PWM_MAIN_FUNC2 102
@@ -64,4 +64,3 @@ param set-default PWM_MAIN_FUNC4 203
param set-default PWM_MAIN_FUNC5 407
param set-default PWM_MAIN_FUNC6 408
param set-default PWM_MAIN_FUNC7 409
@@ -69,4 +69,3 @@ param set-default PWM_MAIN_FUNC4 203
param set-default PWM_MAIN_FUNC5 407
param set-default PWM_MAIN_FUNC6 408
param set-default PWM_MAIN_FUNC7 409
@@ -36,4 +36,3 @@ param set-default PWM_MAIN_FUNC1 101
param set-default PWM_MAIN_FUNC2 102
param set-default PWM_MAIN_FUNC3 201
param set-default PWM_MAIN_FUNC4 103
@@ -6,16 +6,40 @@
. ${R}etc/init.d/rc.rover_differential_defaults
PX4_SIMULATOR=${PX4_SIMULATOR:=gz}
PX4_GZ_WORLD=${PX4_GZ_WORLD:=default}
PX4_GZ_WORLD=${PX4_GZ_WORLD:=rover}
PX4_SIM_MODEL=${PX4_SIM_MODEL:=r1_rover}
param set-default SIM_GZ_EN 1 # Gazebo bridge
# Rover parameters
param set-default RD_WHEEL_TRACK 0.3
param set-default RD_MAN_YAW_SCALE 0.1
param set-default RD_MAX_ACCEL 6
param set-default RD_MAX_JERK 30
param set-default RD_MAX_THR_YAW_R 5
param set-default RD_YAW_RATE_P 0.1
param set-default RD_YAW_RATE_I 0
param set-default RD_YAW_P 5
param set-default RD_YAW_I 0
param set-default RD_MAX_SPEED 5
param set-default RD_MAX_THR_SPD 7
param set-default RD_SPEED_P 1
param set-default RD_SPEED_I 0
param set-default RD_MAX_YAW_RATE 180
param set-default RD_MISS_SPD_DEF 5
param set-default RD_TRANS_DRV_TRN 0.349066
param set-default RD_TRANS_TRN_DRV 0.174533
# Pure pursuit parameters
param set-default PP_LOOKAHD_MAX 30
param set-default PP_LOOKAHD_MIN 2
param set-default PP_LOOKAHD_GAIN 1
# Simulated sensors
param set-default SENS_EN_GPSSIM 1
param set-default SENS_EN_BAROSIM 0
param set-default SENS_EN_MAGSIM 1
param set-default SENS_EN_ARSPDSIM 1
param set-default SENS_EN_ARSPDSIM 0
# Actuator mapping
param set-default SIM_GZ_WH_FUNC1 101 # right wheel
@@ -15,14 +15,29 @@ param set-default SIM_GZ_EN 1 # Gazebo bridge
param set-default SENS_EN_GPSSIM 1
param set-default SENS_EN_BAROSIM 0
param set-default SENS_EN_MAGSIM 1
param set-default SENS_EN_ARSPDSIM 1
param set-default SENS_EN_ARSPDSIM 0
# We can arm and drive in manual mode when it slides and GPS check fails:
param set-default COM_ARM_WO_GPS 1
# Set Differential Drive Kinematics Library parameters:
param set RDD_WHEEL_BASE 0.9
param set RDD_WHEEL_RADIUS 0.22
param set RDD_WHEEL_SPEED 10.0 # Maximum wheel speed rad/s, approx 8 km/h
# Rover parameters
param set-default RD_WHEEL_TRACK 0.9
param set-default RD_MAN_YAW_SCALE 0.1
param set-default RD_YAW_RATE_I 0.1
param set-default RD_YAW_RATE_P 5
param set-default RD_MAX_ACCEL 1
param set-default RD_MAX_JERK 3
param set-default RD_MAX_SPEED 8
param set-default RD_YAW_P 5
param set-default RD_YAW_I 0.1
param set-default RD_MAX_YAW_RATE 30
param set-default RD_MISS_SPD_DEF 8
param set-default RD_TRANS_DRV_TRN 0.349066
param set-default RD_TRANS_TRN_DRV 0.174533
# Pure pursuit parameters
param set-default PP_LOOKAHD_MAX 30
param set-default PP_LOOKAHD_MIN 2
param set-default PP_LOOKAHD_GAIN 1
# Actuator mapping - set SITL motors/servos output parameters:
@@ -36,14 +51,14 @@ param set-default SIM_GZ_WH_FUNC1 101 # right wheel
param set-default SIM_GZ_WH_FUNC2 102 # left wheel
#param set-default SIM_GZ_WH_MIN2 0
#param set-default SIM_GZ_WH_MAX2 200
#aram set-default SIM_GZ_WH_DIS2 100
#param set-default SIM_GZ_WH_DIS2 100
#param set-default SIM_GZ_WH_FAIL2 100
param set-default SIM_GZ_WH_REV 0 # no need to reverse any wheels
# Note: The servo configurations ( SIM_GZ_SV_FUNC*) outlined below are intended for educational purposes in this simulation.
# They do not have physical effects in the simulated environment, except for actuating the joints. Their definitions are meant to demonstrate
# how actuators could be mapped and configured in a real-world application, providing a foundation for understanding and implementing actuator
# Note: The servo configurations ( SIM_GZ_SV_FUNC*) outlined below are intended for educational purposes in this simulation.
# They do not have physical effects in the simulated environment, except for actuating the joints. Their definitions are meant to demonstrate
# how actuators could be mapped and configured in a real-world application, providing a foundation for understanding and implementing actuator
# controls in practical scenarios.
# Cutter deck blades clutch, PCA9685 servo channel 3, "RC FLAPS" (406) - leftmost switch, or "Servo 3" (203):
@@ -0,0 +1,49 @@
#!/bin/sh
# @name Rover Ackermann
# @type Rover
# @class Rover
. ${R}etc/init.d/rc.rover_ackermann_defaults
PX4_SIMULATOR=${PX4_SIMULATOR:=gz}
PX4_GZ_WORLD=${PX4_GZ_WORLD:=rover}
PX4_SIM_MODEL=${PX4_SIM_MODEL:=rover_ackermann}
param set-default SIM_GZ_EN 1 # Gazebo bridge
# Rover parameters
param set-default NAV_ACC_RAD 0.5
param set-default RA_ACC_RAD_GAIN 2
param set-default RA_ACC_RAD_MAX 3
param set-default RA_MAX_ACCEL 1.5
param set-default RA_MAX_JERK 15
param set-default RA_MAX_SPEED 3
param set-default RA_MAX_STR_ANG 0.5236
param set-default RA_MAX_STR_RATE 360
param set-default RA_MISS_VEL_DEF 3
param set-default RA_MISS_VEL_GAIN 5
param set-default RA_MISS_VEL_MIN 1
param set-default RA_SPEED_I 0.01
param set-default RA_SPEED_P 2
param set-default RA_WHEEL_BASE 0.321
# Pure Pursuit parameters
param set-default PP_LOOKAHD_GAIN 1
param set-default PP_LOOKAHD_MAX 10
param set-default PP_LOOKAHD_MIN 1
# Simulated sensors
param set-default SENS_EN_GPSSIM 1
param set-default SENS_EN_BAROSIM 0
param set-default SENS_EN_MAGSIM 1
param set-default SENS_EN_ARSPDSIM 0
# Wheels
param set-default SIM_GZ_WH_FUNC1 101
param set-default SIM_GZ_WH_MIN1 0
param set-default SIM_GZ_WH_MAX1 200
param set-default SIM_GZ_WH_DIS1 100
# Steering
param set-default SIM_GZ_SV_FUNC1 201
param set-default SIM_GZ_SV_REV 1
@@ -0,0 +1,10 @@
#!/bin/sh
#
# @name Gazebo x500 lidar
#
# @type Quadrotor
#
PX4_SIM_MODEL=${PX4_SIM_MODEL:=x500_lidar}
. ${R}etc/init.d-posix/airframes/4001_gz_x500
@@ -0,0 +1,10 @@
#!/bin/sh
#
# @name Gazebo x500 mono cam
#
# @type Quadrotor
#
PX4_SIM_MODEL=${PX4_SIM_MODEL:=x500_mono_cam_down}
. ${R}etc/init.d-posix/airframes/4001_gz_x500
@@ -63,4 +63,3 @@ param set-default PWM_MAIN_FUNC9 422
# Landing gear
param set-default PWM_MAIN_FUNC10 400
param set-default PWM_MAIN_FUNC11 400
@@ -119,4 +119,3 @@ param set-default CA_METHOD 0
# disable attitude failure detection
param set-default FD_FAIL_P 0
param set-default FD_FAIL_R 0
@@ -83,6 +83,9 @@ px4_add_romfs_files(
4009_gz_r1_rover
4010_gz_x500_mono_cam
4011_gz_lawnmower
4012_gz_rover_ackermann
4013_gz_x500_lidar
4014_gz_x500_mono_cam_down
6011_gazebo-classic_typhoon_h480
6011_gazebo-classic_typhoon_h480.post
@@ -15,6 +15,9 @@ if [ "$PX4_SIMULATOR" = "sihsim" ] || [ "$(param show -q SYS_AUTOSTART)" -eq "0"
if [ -n "${PX4_HOME_LON}" ]; then
param set SIH_LOC_LON0 ${PX4_HOME_LON}
fi
if [ -n "${PX4_HOME_ALT}" ]; then
param set SIH_LOC_H0 ${PX4_HOME_ALT}
fi
if simulator_sih start; then
+1
View File
@@ -157,6 +157,7 @@ param set-default CBRK_SUPPLY_CHK 894281
# disable check, no CPU load reported on posix yet
param set-default COM_CPU_MAX -1
param set-default COM_RAM_MAX -1
# Don't require RC calibration and configuration
param set-default COM_RC_IN_MODE 1
+2 -1
View File
@@ -44,6 +44,7 @@ px4_add_romfs_files(
# TODO
rc.balloon_apps
rc.balloon_defaults
rc.sysinit
)
if(CONFIG_MODULES_AIRSHIP_ATT_CONTROL)
@@ -77,7 +78,7 @@ if(CONFIG_MODULES_ROVER_POS_CONTROL)
)
endif()
if(CONFIG_MODULES_DIFFERENTIAL_DRIVE)
if(CONFIG_MODULES_ROVER_DIFFERENTIAL)
px4_add_romfs_files(
rc.rover_differential_apps
rc.rover_differential_defaults
@@ -44,4 +44,3 @@ param set-default CA_ROTOR4_KM -0.05
param set-default CA_ROTOR5_PX 0.25
param set-default CA_ROTOR5_PY -0.433
param set-default CA_ROTOR5_PZ 0.05
@@ -43,6 +43,10 @@ param set-default CA_SV_CS1_TRQ_P 0.3
param set-default CA_SV_CS1_TRQ_Y -0.3
param set-default CA_SV_CS1_TYPE 6
param set-default FW_AIRSPD_MAX 12
param set-default FW_AIRSPD_MIN 7
param set-default FW_AIRSPD_TRIM 10
param set-default HIL_ACT_FUNC1 101
param set-default HIL_ACT_FUNC2 102
param set-default HIL_ACT_FUNC5 202
@@ -62,6 +66,8 @@ param set-default CBRK_SUPPLY_CHK 894281
# - without safety switch
param set-default CBRK_IO_SAFETY 22027
param set-default SENS_DPRES_OFF 0.001
param set SIH_T_MAX 2.0
param set SIH_Q_MAX 0.0165
param set SIH_MASS 0.2
@@ -75,3 +81,5 @@ param set SIH_L_ROLL 0.145
# sih as tailsitter
param set SIH_VEHICLE_TYPE 2
param set-default VT_ARSP_TRANS 6
@@ -0,0 +1,99 @@
#!/bin/sh
#
# @name SIH Tailsitter Duo
#
# @type Simulation
# @class VTOL
#
# @output Motor1 motor right
# @output Motor2 motor left
# @output Servo1 elevon right
# @output Servo2 elevon left
#
# @maintainer Romain Chiappinelli <romain.chiap@gmail.com>
#
# @board px4_fmu-v2 exclude
#
. ${R}etc/init.d/rc.vtol_defaults
param set UAVCAN_ENABLE 0
param set-default VT_B_TRANS_DUR 5
param set-default VT_ELEV_MC_LOCK 0
param set-default VT_TYPE 2
param set-default MPC_MAN_Y_MAX 60
param set-default MC_PITCH_P 5
param set-default CA_AIRFRAME 2
param set-default CA_ROTOR_COUNT 5
param set-default CA_ROTOR0_KM 0.05
param set-default CA_ROTOR0_PX 0.2
param set-default CA_ROTOR0_PY 0.2
param set-default CA_ROTOR1_KM 0.05
param set-default CA_ROTOR1_PX -0.2
param set-default CA_ROTOR1_PY -0.2
param set-default CA_ROTOR2_PX 0.2
param set-default CA_ROTOR2_PY -0.2
param set-default CA_ROTOR2_KM -0.05
param set-default CA_ROTOR3_PX -0.2
param set-default CA_ROTOR3_PY 0.2
param set-default CA_ROTOR3_KM -0.05
param set-default CA_ROTOR4_PX -0.3
param set-default CA_ROTOR4_KM 0.05
param set-default CA_ROTOR4_AX 1
param set-default CA_ROTOR4_AZ 0
param set-default CA_SV_CS_COUNT 3
param set-default CA_SV_CS0_TRQ_R 0.5
param set-default CA_SV_CS0_TYPE 2
param set-default CA_SV_CS1_TRQ_P 1
param set-default CA_SV_CS1_TYPE 3
param set-default CA_SV_CS2_TRQ_Y 1
param set HIL_ACT_REV 32
param set-default FW_AIRSPD_MAX 12
param set-default FW_AIRSPD_MIN 7
param set-default FW_AIRSPD_TRIM 10
param set-default HIL_ACT_FUNC1 101
param set-default HIL_ACT_FUNC2 102
param set-default HIL_ACT_FUNC3 103
param set-default HIL_ACT_FUNC4 104
param set-default HIL_ACT_FUNC5 201
param set-default HIL_ACT_FUNC6 202
param set-default HIL_ACT_FUNC7 203
param set-default HIL_ACT_FUNC8 105
param set-default MAV_TYPE 22
# set SYS_HITL to 2 to start the SIH and avoid sensors startup
param set-default SYS_HITL 2
# disable some checks to allow to fly:
# - without real battery
param set-default CBRK_SUPPLY_CHK 894281
# - without safety switch
param set-default CBRK_IO_SAFETY 22027
param set-default SENS_DPRES_OFF 0.001
param set SIH_T_MAX 2.0
param set SIH_Q_MAX 0.0165
param set SIH_MASS 0.2
# IXX and IZZ are inverted from the thesis as the body frame is pitched by 90 deg
param set SIH_IXX 0.00354
param set SIH_IYY 0.000625
param set SIH_IZZ 0.00300
param set SIH_IXZ 0
param set SIH_KDV 0.2
param set SIH_L_ROLL 0.145
# sih as tailsitter
param set SIH_VEHICLE_TYPE 3
param set-default VT_ARSP_TRANS 6
@@ -119,5 +119,3 @@ param set-default PWM_MAIN_TIM0 50
param set-default PWM_MAIN_DIS1 1500
param set-default PWM_MAIN_DIS2 1500
param set-default PWM_MAIN_DIS4 1500
@@ -32,4 +32,3 @@ param set-default CA_SV_TL0_MAXA 45
param set-default CA_SV_TL0_MINA -45
param set-default CA_SV_TL0_TD 90
param set-default CA_SV_TL_COUNT 1
@@ -24,5 +24,3 @@ param set-default MC_PITCHRATE_D 0
param set-default MC_PITCHRATE_FF 0.1
param set-default CA_AIRFRAME 10
@@ -23,4 +23,3 @@ param set-default MAV_0_MODE 1
param set-default MAV_0_CONFIG 102
param set-default GPS_UBX_DYNMODEL 8
param set-default SER_TEL2_BAUD 9600
@@ -72,5 +72,3 @@ param set-default PWM_MAIN_DIS5 1000
param set-default PWM_MAIN_DIS6 1500
param set-default PWM_MAIN_DIS7 1500
param set-default PWM_MAIN_DIS8 1500
@@ -66,4 +66,3 @@ param set-default CA_ROTOR11_PX -0.344
param set-default CA_ROTOR11_PY -0.25
param set-default CA_ROTOR11_PZ -0.05
param set-default CA_ROTOR11_KM -0.05
@@ -38,4 +38,3 @@ param set-default CA_SV_CS_COUNT 1
param set-default CA_SV_CS0_TRQ_P 1
param set-default CA_R_REV 7
@@ -6,6 +6,7 @@
# @class Copter
#
# @board px4_fmu-v2 exclude
# @board px4_fmu-v5x exclude
# @board bitcraze_crazyflie exclude
#
# @maintainer Iain Galloway <iain.galloway@nxp.com>
@@ -7,6 +7,10 @@
#
# @maintainer
# @board px4_fmu-v2 exclude
# @board cuav_x7pro exclude
# @board px4_fmu-v4pro exclude
# @board px4_fmu-v5x exclude
# @board px4_fmu-v6x exclude
#
. ${R}etc/init.d/rc.mc_defaults
@@ -36,7 +40,6 @@ param set-default COM_RC_LOSS_T 3
# ekf2
param set-default EKF2_TERR_MASK 1
param set-default EKF2_BARO_NOISE 2
param set-default EKF2_BCOEF_X 31.5
@@ -12,6 +12,7 @@
# @board px4_fmu-v4pro exclude
# @board px4_fmu-v5 exclude
# @board px4_fmu-v5x exclude
# @board px4_fmu-v6x exclude
# @board bitcraze_crazyflie exclude
# @board cuav_x7pro exclude
#
@@ -10,6 +10,7 @@
# @board px4_fmu-v4pro exclude
# @board px4_fmu-v5 exclude
# @board px4_fmu-v5x exclude
# @board px4_fmu-v6x exclude
# @board bitcraze_crazyflie exclude
# @board cuav_x7pro exclude
#
@@ -8,6 +8,7 @@
# @maintainer Oleg Kalachev <okalachev@gmail.com>
#
# @board px4_fmu-v2 exclude
# @board px4_fmu-v4pro exclude
# @board bitcraze_crazyflie exclude
#
@@ -25,7 +25,6 @@
param set-default BAT1_CAPACITY 4000
param set-default BAT1_N_CELLS 6
param set-default BAT1_V_EMPTY 3.3
param set-default BAT1_V_LOAD_DROP 0.5
param set-default BAT_AVRG_CURRENT 13
# Square quadrotor X PX4 numbering
@@ -69,6 +68,9 @@ param set-default MPC_THR_MIN 0.025
param set-default MPC_VEL_MANUAL 5.0
param set-default MPC_XY_VEL_MAX 8.0
param set-default RC_CRSF_PRT_CFG 300
param set-default RC_CRSF_TEL_EN 1
param set-default RTL_RETURN_ALT 15
param set-default SENS_FLOW_MINHGT 0.0
@@ -13,6 +13,7 @@
# @board px4_fmu-v4pro exclude
# @board px4_fmu-v5 exclude
# @board px4_fmu-v5x exclude
# @board px4_fmu-v6x exclude
# @board diatone_mamba-f405-mk2 exclude
#
. ${R}etc/init.d/rc.mc_defaults
@@ -0,0 +1,12 @@
#!/bin/sh
#
# @name Generic Rover Differential
#
# @type Rover
# @class Rover
#
# @board px4_fmu-v2 exclude
# @board bitcraze_crazyflie exclude
#
. ${R}etc/init.d/rc.rover_differential_defaults
@@ -0,0 +1,46 @@
#!/bin/sh
#
# @name Aion Robotics R1 UGV
#
# @url https://www.aionrobotics.com/r1
#
# @type Rover
# @class Rover
#
# @board px4_fmu-v2 exclude
# @board bitcraze_crazyflie exclude
#
. ${R}etc/init.d/rc.rover_differential_defaults
param set-default BAT1_N_CELLS 4
# Set geometry & output configration
param set-default RBCLW_ADDRESS 128
param set-default RBCLW_FUNC1 101
param set-default RBCLW_FUNC2 102
param set-default RBCLW_REV 1 # reverse right wheels
# Rover parameters
param set-default RD_WHEEL_TRACK 0.3
param set-default RD_MAN_YAW_SCALE 1
param set-default RD_MAX_ACCEL 5
param set-default RD_MAX_JERK 10
param set-default RD_MAX_THR_YAW_R 4
param set-default RD_YAW_RATE_P 0.1
param set-default RD_YAW_RATE_I 0
param set-default RD_YAW_P 5
param set-default RD_YAW_I 0
param set-default RD_MAX_SPEED 1.8
param set-default RD_MAX_THR_SPD 2
param set-default RD_SPEED_P 0.5
param set-default RD_SPEED_I 0.1
param set-default RD_MAX_YAW_RATE 300
param set-default RD_MISS_SPD_DEF 1.8
param set-default RD_TRANS_DRV_TRN 0.349066
param set-default RD_TRANS_TRN_DRV 0.174533
# Pure pursuit parameters
param set-default PP_LOOKAHD_MAX 10
param set-default PP_LOOKAHD_MIN 1
param set-default PP_LOOKAHD_GAIN 1
@@ -1,25 +0,0 @@
#!/bin/sh
#
# @name Aion Robotics R1 UGV
#
# @url https://www.aionrobotics.com/r1
#
# @type Rover
# @class Rover
#
# @board px4_fmu-v2 exclude
# @board bitcraze_crazyflie exclude
#
. ${R}etc/init.d/rc.rover_differential_defaults
param set-default BAT1_N_CELLS 4
param set-default EKF2_GBIAS_INIT 0.01
param set-default EKF2_ANGERR_INIT 0.01
# Set geometry & output configration
param set-default RBCLW_ADDRESS 128
param set-default RBCLW_FUNC1 101
param set-default RBCLW_FUNC2 102
param set-default RBCLW_REV 1 # reverse right wheels
@@ -1,6 +1,6 @@
#!/bin/sh
#
# @name Generic ackermann rover
# @name Generic Rover Ackermann
#
# @type Rover
# @class Rover
@@ -0,0 +1,37 @@
#!/bin/sh
#
# @name Axial SCX10 2 Trail Honcho
#
# @url https://www.axialadventure.com/product/1-10-scx10-ii-trail-honcho-4wd-rock-crawler-brushed-rtr/AXID9059.html
#
# @type Rover
# @class Rover
#
# @board px4_fmu-v2 exclude
# @board bitcraze_crazyflie exclude
#
. ${R}etc/init.d/rc.rover_ackermann_defaults
param set-default BAT1_N_CELLS 3
# Rover parameters
param set-default NAV_ACC_RAD 0.5
param set-default RA_ACC_RAD_GAIN 2
param set-default RA_ACC_RAD_MAX 3
param set-default RA_MAX_ACCEL 0.5
param set-default RA_MAX_JERK 10
param set-default RA_MAX_SPEED 2.7
param set-default RA_MAX_STR_ANG 0.5236
param set-default RA_MAX_STR_RATE 270
param set-default RA_MISS_VEL_DEF 2.7
param set-default RA_MISS_VEL_GAIN 3.5
param set-default RA_MISS_VEL_MIN 1
param set-default RA_SPEED_I 0.1
param set-default RA_SPEED_P 0.5
param set-default RA_WHEEL_BASE 0.321
# Pure pursuit parameters
param set-default PP_LOOKAHD_GAIN 1
param set-default PP_LOOKAHD_MAX 10
param set-default PP_LOOKAHD_MIN 1.5
@@ -1,6 +1,6 @@
#!/bin/sh
#
# @name Generic Ground Vehicle (Ackermann)
# @name Generic Ground Vehicle (Deprecated)
#
# @type Rover
# @class Rover
@@ -48,5 +48,3 @@ param set-default PWM_MAIN_FUNC1 201
param set-default PWM_MAIN_FUNC2 201
param set-default PWM_MAIN_FUNC6 101
param set-default PWM_MAIN_FUNC7 101
@@ -1,6 +1,6 @@
#!/bin/sh
#
# @name NXP Cup car: DF Robot GPX
# @name NXP Cup car: DF Robot GPX (Deprecated)
#
# @type Rover
@@ -42,4 +42,3 @@ param set-default CA_ROTOR3_KM 0
param set-default CA_ROTOR3_PX 0
param set-default CA_ROTOR3_PY -0.3
param set-default CA_ROTOR3_PZ 0.3
@@ -31,5 +31,3 @@ param set-default CA_ROTOR4_PY 0.25
param set-default CA_ROTOR5_PX -0.43
param set-default CA_ROTOR5_PY -0.25
param set-default CA_ROTOR5_KM -0.05
@@ -123,4 +123,3 @@ param set-default PWM_MAIN_FUNC6 106
param set-default PWM_MAIN_TIM0 -1
param set-default PWM_MAIN_TIM1 -1
param set-default PWM_MAIN_TIM2 -1
@@ -31,5 +31,3 @@ param set-default CA_ROTOR4_PY -0.43
param set-default CA_ROTOR5_PX -0.25
param set-default CA_ROTOR5_PY 0.43
param set-default CA_ROTOR5_KM -0.05
@@ -36,5 +36,3 @@ param set-default CA_ROTOR6_PY -0.46
param set-default CA_ROTOR7_KM -0.05
param set-default CA_ROTOR7_PX -0.19
param set-default CA_ROTOR7_PY 0.46
@@ -36,4 +36,3 @@ param set-default CA_ROTOR6_PY -0.5
param set-default CA_ROTOR7_KM -0.05
param set-default CA_ROTOR7_PX 0
param set-default CA_ROTOR7_PY 0.5
@@ -48,6 +48,7 @@ if(CONFIG_MODULES_SIMULATION_PWM_OUT_SIM)
1100_rc_quad_x_sih.hil
1101_rc_plane_sih.hil
1102_tailsitter_duo_sih.hil
1103_standard_vtol_sih.hil
)
endif()
@@ -136,22 +137,27 @@ if(CONFIG_MODULES_VTOL_ATT_CONTROL)
)
endif()
if(CONFIG_MODULES_ROVER_POS_CONTROL)
if(CONFIG_MODULES_ROVER_DIFFERENTIAL)
px4_add_romfs_files(
50000_generic_ground_vehicle
50004_nxpcup_car_dfrobot_gpx
)
endif()
if(CONFIG_MODULES_DIFFERENTIAL_DRIVE)
px4_add_romfs_files(
50003_aion_robotics_r1_rover
# [50000, 50999] Differential rovers
50000_generic_rover_differential
50001_aion_robotics_r1_rover
)
endif()
if(CONFIG_MODULES_ROVER_ACKERMANN)
px4_add_romfs_files(
50010_ackermann_rover_generic
# [51000, 51999] Ackermann rovers
51000_generic_rover_ackermann
51001_axial_scx10_2_trail_honcho
)
endif()
if(CONFIG_MODULES_ROVER_POS_CONTROL)
px4_add_romfs_files(
# [59000, 59999] Rover position control (deprecated)
59000_generic_ground_vehicle
59001_nxpcup_car_dfrobot_gpx
)
endif()
@@ -1,10 +1,7 @@
#!/bin/sh
# Standard apps for a ackermann drive rover.
# Standard apps for an ackermann rover.
# Start the attitude and position estimator.
ekf2 start &
# Start rover ackermann drive controller.
# Start rover ackermann module.
rover_ackermann start
# Start Land Detector.
@@ -2,12 +2,10 @@
# Ackermann rover parameters.
set VEHICLE_TYPE rover_ackermann
param set-default MAV_TYPE 10 # MAV_TYPE_GROUND_ROVER
param set-default CA_AIRFRAME 5 # Rover (Ackermann)
param set-default CA_R_REV 1 # Motor is assumed to be reversible
param set-default EKF2_MAG_TYPE 1 # make sure magnetometer is fused even when not flying
param set-default MAV_TYPE 10 # MAV_TYPE_GROUND_ROVER
param set-default CA_AIRFRAME 5 # Rover (Ackermann)
param set-default CA_R_REV 1 # Motor is assumed to be reversible
param set-default EKF2_MAG_TYPE 1 # Make sure magnetometer is fused even when not flying
param set-default NAV_ACC_RAD 0.5 # Waypoint acceptance radius
param set-default EKF2_GBIAS_INIT 0.01
param set-default EKF2_ANGERR_INIT 0.01
param set-default NAV_ACC_RAD 0.5 # Waypoint acceptance radius
param set-default NAV_RCL_ACT 6 # Disarm on manual control loss
param set-default COM_FAIL_ACT_T 1 # Delay before failsafe after rc loss
@@ -1,8 +1,8 @@
#!/bin/sh
# Standard apps for a differential drive rover.
# Standard apps for a differential rover.
# Start rover differential drive controller.
differential_drive start
# Start rover differential module.
rover_differential start
# Start Land Detector.
land_detector start rover
@@ -2,10 +2,10 @@
# Differential rover parameters.
set VEHICLE_TYPE rover_differential
param set-default MAV_TYPE 10 # MAV_TYPE_GROUND_ROVER
param set-default CA_AIRFRAME 6 # Rover (Differential)
param set-default CA_R_REV 3 # Right and left motors reversible
param set-default EKF2_MAG_TYPE 1 # make sure magnetometer is fused even when not flying
param set-default MAV_TYPE 10 # MAV_TYPE_GROUND_ROVER
param set-default CA_AIRFRAME 6 # Rover (Differential)
param set-default CA_R_REV 3 # Right and left motors reversible
param set-default EKF2_MAG_TYPE 1 # Make sure magnetometer is fused even when not flying
param set-default NAV_ACC_RAD 0.5 # Waypoint acceptance radius
param set-default EKF2_GBIAS_INIT 0.01
param set-default EKF2_ANGERR_INIT 0.01
+4
View File
@@ -0,0 +1,4 @@
#!/bin/sh
#
# Standard system init script
#
+45 -32
View File
@@ -30,7 +30,7 @@ set LOGGER_BUF 8
set PARAM_FILE ""
set PARAM_BACKUP_FILE ""
set RC_INPUT_ARGS ""
set SDCARD_AVAILABLE no
set STORAGE_AVAILABLE no
set SDCARD_EXT_PATH /fs/microsd/ext_autostart
set SDCARD_FORMAT no
set STARTUP_TUNE 1
@@ -62,11 +62,11 @@ then
umount /fs/microsd
else
set SDCARD_AVAILABLE yes
set STORAGE_AVAILABLE yes
fi
fi
if [ $SDCARD_AVAILABLE = no -o $SDCARD_FORMAT = yes ]
if [ $STORAGE_AVAILABLE = no -o $SDCARD_FORMAT = yes ]
then
echo "INFO [init] formatting /dev/mmcsd0"
set STARTUP_TUNE 15 # tune 15 = SD_ERROR (overridden to SD_INIT if format + mount succeeds)
@@ -77,7 +77,7 @@ then
if mount -t vfat /dev/mmcsd0 /fs/microsd
then
set SDCARD_AVAILABLE yes
set STORAGE_AVAILABLE yes
set STARTUP_TUNE 14 # tune 14 = SD_INIT
else
echo "ERROR [init] card mount failed"
@@ -86,19 +86,32 @@ then
echo "ERROR [init] format failed"
fi
fi
if [ $SDCARD_AVAILABLE = yes ]
else
# Is there a device mounted for storage
if mft query -q -k MTD -s MTD_PARAMETERS -v /mnt/microsd
then
if hardfault_log check
set STORAGE_AVAILABLE yes
fi
fi
if [ $STORAGE_AVAILABLE = yes ]
then
if hardfault_log check
then
set STARTUP_TUNE 2 # tune 2 = ERROR_TUNE
if hardfault_log commit
then
set STARTUP_TUNE 2 # tune 2 = ERROR_TUNE
if hardfault_log commit
then
hardfault_log reset
fi
hardfault_log reset
fi
fi
if [ -e /fs/microsd/new ]
then
echo "Updating external autostart files"
rm -r $SDCARD_EXT_PATH
mv /fs/microsd/new $SDCARD_EXT_PATH
fi
# Check for an update of the ext_autostart folder, and replace the old one with it
if [ -e /fs/microsd/ext_autostart_new ]
then
@@ -120,14 +133,8 @@ then
. $FRC
else
#
# Set the parameter file the board supports params on
# MTD device.
#
if mft query -q -k MTD -s MTD_PARAMETERS -v /fs/mtd_params
then
set PARAM_FILE /fs/mtd_params
fi
# Load param file location from kconfig
. ${R}etc/init.d/rc.filepaths
# Check if /fs/mtd_params is a valid BSON file
if ! bsondump docsize /fs/mtd_caldata
@@ -178,7 +185,7 @@ else
fi
fi
if [ $SDCARD_AVAILABLE = yes ]
if [ $STORAGE_AVAILABLE = yes ]
then
param select-backup $PARAM_BACKUP_FILE
fi
@@ -217,25 +224,31 @@ else
fi
unset BOARD_RC_DEFAULTS
#
# Set parameters and env variables for selected SYS_AUTOSTART.
#
set AUTOSTART_PATH etc/init.d/rc.autostart
# Load airframe configuration based on SYS_AUTOSTART parameter
if ! param compare SYS_AUTOSTART 0
then
if param greater SYS_AUTOSTART 1000000
# rc.autostart directly run the right airframe script which sets the VEHICLE_TYPE
# Look for airframe in ROMFS
. ${R}etc/init.d/rc.autostart
if [ ${VEHICLE_TYPE} == none ]
then
# Use external startup file
if [ $SDCARD_AVAILABLE = yes ]
if [ $STORAGE_AVAILABLE = yes ]
then
set AUTOSTART_PATH etc/init.d/rc.autostart_ext
. ${R}etc/init.d/rc.autostart_ext
else
echo "ERROR [init] SD card not mounted - trying to load airframe from ROMFS"
echo "ERROR [init] SD card not mounted - can't load external airframe"
fi
fi
. ${R}$AUTOSTART_PATH
if [ ${VEHICLE_TYPE} == none ]
then
echo "ERROR [init] No airframe file found for SYS_AUTOSTART value"
param set SYS_AUTOSTART 0
tune_control play error
fi
fi
unset AUTOSTART_PATH
# Check parameter version and reset upon airframe configuration version mismatch.
# Reboot required because "param reset_all" would reset all "param set" lines from airframe.
@@ -615,7 +628,7 @@ unset PARAM_FILE
unset PARAM_BACKUP_FILE
unset PARAM_DEFAULTS_VER
unset RC_INPUT_ARGS
unset SDCARD_AVAILABLE
unset STORAGE_AVAILABLE
unset SDCARD_EXT_PATH
unset SDCARD_FORMAT
unset STARTUP_TUNE
+6 -8
View File
@@ -45,7 +45,7 @@ function [ center, radii, evecs, v ] = ellipsoid_fit( X, flag, equals )
% * center - ellispoid center coordinates [xc; yc; zc]
% * ax - ellipsoid radii [a; b; c]
% * evecs - ellipsoid radii directions as columns of the 3x3 matrix
% * v - the 9 parameters describing the ellipsoid algebraically:
% * v - the 9 parameters describing the ellipsoid algebraically:
% Ax^2 + By^2 + Cz^2 + 2Dxy + 2Exz + 2Fyz + 2Gx + 2Hy + 2Iz = 1
%
% Author:
@@ -59,7 +59,7 @@ end
if flag == 2 && nargin == 2
equals = 'xy';
end
if size( X, 2 ) ~= 3
error( 'Input data must have three columns!' );
else
@@ -69,7 +69,7 @@ else
end
% need nine or more data points
if length( x ) < 9 && flag == 0
if length( x ) < 9 && flag == 0
error( 'Must have at least 9 points to fit a unique ellipsoid' );
end
if length( x ) < 6 && flag == 1
@@ -91,7 +91,7 @@ if flag == 0
2 * x .* z, ...
2 * y .* z, ...
2 * x, ...
2 * y, ...
2 * y, ...
2 * z ]; % ndatapoints x 9 ellipsoid parameters
elseif flag == 1
% fit ellipsoid in the form Ax^2 + By^2 + Cz^2 + 2Gx + 2Hy + 2Iz = 1
@@ -99,7 +99,7 @@ elseif flag == 1
y .* y, ...
z .* z, ...
2 * x, ...
2 * y, ...
2 * y, ...
2 * z ]; % ndatapoints x 6 ellipsoid parameters
elseif flag == 2
% fit ellipsoid in the form Ax^2 + By^2 + Cz^2 + 2Gx + 2Hy + 2Iz = 1,
@@ -127,7 +127,7 @@ else
% fit sphere in the form A(x^2 + y^2 + z^2) + 2Gx + 2Hy + 2Iz = 1
D = [ x .* x + y .* y + z .* z, ...
2 * x, ...
2 * y, ...
2 * y, ...
2 * z ]; % ndatapoints x 4 sphere parameters
end
@@ -170,5 +170,3 @@ else
radii = ( sqrt( gam ./ v( 1:3 ) ) )';
evecs = eye( 3 );
end
+19
View File
@@ -0,0 +1,19 @@
#!/usr/bin/env bash
return_value=0
# Check if there are files checked in that don't end in a newline (POSIX requirement)
git grep --cached -Il '' | xargs -L1 bash -c 'if test "$(tail -c 1 "$0")"; then echo "No new line at end of $0"; exit 1; fi'
if [ $? -ne 0 ]; then
return_value=1
fi
# Check if there are files checked in that have duplicate newlines at the end (fail trailing whitespace checks)
git grep --cached -Il '' | xargs -L1 bash -c 'if tail -c 2 "$0" | ( read x && read y && [ x"$x" = x ] && [ x"$y" = x ]); then echo "Multiple newlines at the end of $0"; exit 1; fi'
if [ $? -ne 0 ]; then
return_value=1
fi
exit $return_value
+2 -1
View File
@@ -18,7 +18,8 @@ exec find boards msg src platforms test \
-path src/lib/events/libevents -prune -o \
-path src/lib/parameters/uthash -prune -o \
-path src/lib/wind_estimator/python/generated -prune -o \
-path src/modules/ekf2/EKF -prune -o \
-path src/modules/ekf2/EKF/python/ekf_derivation/generated -prune -o \
-path src/modules/ekf2/EKF/yaw_estimator/derivation/generated -prune -o \
-path src/modules/gyro_fft/CMSIS_5 -prune -o \
-path src/modules/mavlink/mavlink -prune -o \
-path test/mavsdk_tests/catch2 -prune -o \

Some files were not shown because too many files have changed in this diff Show More