Commit Graph

48204 Commits

Author SHA1 Message Date
Samuel Toledano 6e401548a8 sbgecom: Implement sbgECom INS driver (#24137)
* Add new INS driver sbgECom

Implement sbgECom messages handling to provide IMU sensors, GNSS and EKF data to the autopilot
Be able to parametrize the serial port, baudrate and the communicating mode
Clone sbgECom library only if sbgecom support is enabled and apply a patch
Be able to send SBG Systems INS settings in several ways when starting sbgecom driver

* Fix sensor airspeed simulator units

* Fix HIGHRES_IMU pressure unit

* Allow HIGHRES_IMU to support 4 IMUs

* sbgECom: Add documentation

* Use submodule instead of fetching sbgECom using CMake

* Remove patch strategy

* Fix dates

* Remove patch file

* Update SBG dev type ID

Co-authored-by: Jacob Dahl <37091262+dakejahl@users.noreply.github.com>

---------

Co-authored-by: Samuel Toledano <samuel.toledano@sbg-systems.com>
Co-authored-by: Jacob Dahl <37091262+dakejahl@users.noreply.github.com>
2025-11-24 09:27:36 -08:00
Jacob Dahl dc885169f3 sim: refactor startup scripts and fix gz sim standalone (#24600)
* sim: refactor px4-rc.simulator into sim specific startup scripts. Fix gz sim for standalone mode.

* shellcheck disable=SC2154
2025-11-24 09:21:46 -08:00
PX4 Build Bot bd838a5ddf New Crowdin translations - ko (#24560)
Co-authored-by: Crowdin Bot <support+bot@crowdin.com>
2025-11-24 09:19:43 -08:00
PX4 Build Bot 694bd49445 New Crowdin translations - ko (#24557)
Co-authored-by: Crowdin Bot <support+bot@crowdin.com>
2025-11-24 09:19:43 -08:00
Jacob Dahl 5ae6f3fdfb gz: use server config file for loading world plugins (#24441)
* gz: use server config file for loading world plugins

* submodule

* use server.config in tree

* newlines

* format

* gzbridge: rename function

* format

* gzbridge: add magnetometer callback

* change gz_find_package to find_package

* fix up directory structure and cmake to allow multiple plugins

* newlines

* add comment block explaining gz_env.sh

* remove dupe readme

* remove SENS_EN_MAGSIM from all gz airframe files except spacecraft

* update gz submodule
2025-11-24 09:19:41 -08:00
Balduin 6974c4a5cb AutopilotTester: Speed up polling w speed factor
If sim is running faster, we should also poll faster to keep the
same timing resolution. This fixed quite a large number of test
failures.
2025-11-24 09:13:16 -08:00
Balduin 45582fcf55 attempt at fixing xvert
SensorAirspeedSim has hardcoded pitot tube direction in body front
velocity. for tailsitter, this points DOWN in forward flight, thus the
simulated sensor would read 0 in forward flight for tailsitters.

fixed by using norm(velocity) instead like in sih.
2025-11-24 09:13:16 -08:00
Balduin e4f4d240b6 last few hacks to make standard_vtol pass
- higher airspeed targets
 - higher pusher thrust
 - higher takeoff attitude (arsp failure test)

   in the airspeed failure case, the lowered airspeed reading causes the
   controller to want to speed up until the (wrong) airspeed is at the
   setpoint, i.e. the real airspeed quite a bit faster.  without these
   fixes, tecs does a nosedive to regain airspeed, but never becomes fast
   enough (with already maxed out pusher thrust). we pervent this with
   the first two adaptations, while the last one gives space for the
   remaining nosedive.

   fix this permanently by:
    - ensuring the model makes sense definitely (pusher thrust, mass, aero
      properties)
    - noticing the failure faster
    - adapting tecs so it doesn't nosedive?

 - stop sending airspeed in sih

   src/modules/simulation/sensor_airspeed_sim/SensorAirspeedSim.cpp
   is already doing that. in the sensor failure case (wrong), that implements
   the failure, but the SIH one not, giving conflicting data. so switch
   it off

 - larger acceptance radius

   quadx position mode is just not that accurate. is it a control/model
   mismatch problem, or a simulation problem?

 - wait longer for disarm in test_vtol_rtl

   this would fail at large speed factors previously. timing bug or
   acceptable small variation?
2025-11-24 09:13:14 -08:00
Balduin 6d5832b67a figure 8 test: longer transition timeout, no sleep
maybe this is a band-aid fix, and we actually should make sure the
transition can be achieved in the given 5 seconds, as it is very
reliably in the corresponding gazebo test case. check:
 - does SIH_T_MAX make sense?
 - does SIH_MASS make sense?
 - and any other model parameters which are suspicious
2025-11-24 09:12:15 -08:00
Balduin 48eaa7513a cleanup 2025-11-24 09:12:15 -08:00
Balduin 790b60f027 mavsdk tests: use tester sleep function
the original std::this_thread::sleep_for is with respect to host system
time which is different from autopilot time if speed factor != 1, if
some component runs slower than real time, or if debugging.
tester.sleep_for (which already existed) correctly sleeps w.r.t.
px4/simulation time.
2025-11-24 09:12:13 -08:00
Balduin 64dc071c34 consider thrust in aero model
previously I removed this assuming that it would add the forward thrust
as a resulting force. but it just considers its influence on the wing
segment.
2025-11-24 09:10:23 -08:00
Balduin 56e361197e specify timeout duration to wait for disarm 2025-11-24 09:09:44 -08:00
Balduin 12df575081 implement additional failure: airspeed wrong 2025-11-24 09:09:41 -08:00
Balduin 96d8a4f089 format 2025-11-24 09:09:02 -08:00
Balduin b3c1d91408 start airspeed sensor sim according to param
AFAIK this is not done anywhere else for SIH-as-SITL. Just below for
gazebo it is already present.

the corresponding check for SIH-on-FC happens at
ROMFS/px4fmu_common/init.d/rcS:388 - also no airspeed is enabled
anywhere. is that intended?

also, handle airspeed failure correctly in SensorAirspeedSim.cpp
2025-11-24 09:09:00 -08:00
Balduin 5c08b11442 DataValidator: handle low noise scale
Previously, DataValidator would automatically reject sensor data as
stale if (almost) constant.

But if setting SIH_NOISE_SCALE = 0 for deterministic sim, constant
sensor data are to be expected.

This adds logic to not flag sensor values as stale if noise scale is
very small. If the sensor has *actually* gone stale with very low noise
scale, this means we cannot detect it anymore.
2025-11-24 09:08:45 -08:00
Balduin ce98211181 clean up comments 2025-11-24 09:08:45 -08:00
Balduin cbbd621acd add noise scale parameter
this makes SIH artificial sensor noise smaller or larger. useful for
deterministic-ish sim. setting it to 0 does not work right now for
mysterious reasons.
2025-11-24 09:08:45 -08:00
Balduin 22b50e47bd model mismatch, more conservative speed factor 2025-11-24 09:08:45 -08:00
Balduin 71c9214388 make tailsitter airframes less wrong 2025-11-24 09:08:45 -08:00
Balduin 43940b872c don't --abort-early 2025-11-24 09:08:45 -08:00
Balduin 2e89edc5e5 implement baro stuck failure 2025-11-24 09:08:45 -08:00
Balduin 321ac6f994 new sensor failures
airspeed, baro, and mag off.

agp has no failures, and other failure types like stuck etc not
implemented at all.

doubting this implementation, lots of repetitions and
almost-repetitions. maybe we should do it more similar to
SimulatorMavlink.cpp? Where simulator_sih handles the sensor failures
itself, with one big if mess, but the rest of it nice and lean.

failing tests for quadx:
 - 'Continue on baro stuck during mission (baro height mode)': failed
 - 'Continue on baro stuck during mission (GPS height mode)': failed
 - 'Fly straight Multicopter Mission': failed
 - 'Offboard takeoff and land': failed
 - 'Offboard position control': failed
2025-11-24 09:08:43 -08:00
Balduin 00bf1413cc first sensor failure 2025-11-24 09:08:17 -08:00
Balduin ddeb548bb2 add workflow for sih-sitl tests
also, fix tailsitter model so actuator signs follow convention
2025-11-24 09:08:17 -08:00
Balduin 345e5296cb (very wip) sitl-sih integration tests 2025-11-24 09:08:15 -08:00
Balduin ea74357dd0 remove confusing 'SVTOL' abbreviation 2025-11-24 09:06:52 -08:00
Balduin ec9465f661 update output docstring 2025-11-24 09:05:36 -08:00
Balduin 467abbf85f add svtol airframe for sih-in-sitl 2025-11-24 09:05:33 -08:00
bresch 45e8712d60 VectorNav: set global position validity 2025-11-24 12:00:55 +01:00
Phil-Engljaehringer 0cefd74fee drivers: add perf counters and documentation to ads7953 2025-11-24 11:06:56 +01:00
PX4 Build Bot 7d8e79c49d New Crowdin translations - ko (#25963)
Co-authored-by: Crowdin Bot <support+bot@crowdin.com>
2025-11-24 07:27:59 +11:00
PX4 Build Bot faedf252b3 New Crowdin translations - zh-CN (#25965)
Co-authored-by: Crowdin Bot <support+bot@crowdin.com>
2025-11-24 07:21:18 +11:00
PX4 Build Bot 7f8d2b5067 New Crowdin translations - uk (#25964)
Co-authored-by: Crowdin Bot <support+bot@crowdin.com>
2025-11-24 07:21:00 +11:00
Peter van der Perk 4498475515 fmu-v6x: zenoh config set CONSTRAINED_FLASH
Fixes flash overflow with zenoh target on fmu-v6x
2025-11-21 10:10:32 -09:00
Peter van der Perk b8974cb77b Zenoh: Improve out-of-memory behaviour
Abort publication immediately when not enough memory is available.
Zero _zenoh_publishers and _zenoh_subscribers to ensure we're not
dereferencing a wrong pointer
2025-11-21 10:10:32 -09:00
Peter van der Perk 042a251542 Zenoh: Update zenoh-pico library 2025-11-21 10:10:32 -09:00
Julian Oes ff06a206d1 mavsdk_tests: bump version to 3.11.1
This should now include the figure eight messages.
2025-11-20 23:23:40 -09:00
Julian Oes 46ed71fa5b mavsdk_tests: figure eight is in common now 2025-11-20 23:23:40 -09:00
Julian Oes 2ef2580388 Gazebo-classic: add define for development.xml
And update submodule.
2025-11-20 23:23:40 -09:00
Julian Oes c89667d911 boards: add MAVLink development targets
These targets can be used to test MAVLink messages in the
development.xml dialect.
2025-11-20 23:23:40 -09:00
Julian Oes fa7ffa423c boards: remove MAVLink development dialect
We should not build and release with the MAVLink development dialect
because messages in development.xml can change at any time and break
things.

Instead we should prototype and test things using specific mavlink-dev
targets.
2025-11-20 23:23:40 -09:00
Julian Oes 8f3442b358 mavlink: update submodule 2025-11-20 23:23:40 -09:00
Niklas Hauser 17f3db9231 [serial] Fix byte size, flow control, parity, stop bits configuration 2025-11-20 10:29:57 -09:00
Henry Kotzé 25138d0a12 MavlinkTimeSync: Specify compid & Sysid (#25949)
Co-authored-by: henrykotze <henry@autonosky.com>
Co-authored-by: Beniamino Pozzan <beniamino.pozzan@gmail.com>
2025-11-20 12:43:46 +00:00
DrinkingHook 70f32f4631 Clean up duplicate assignments in flight_mode_manager-task-auto 2025-11-19 20:44:22 -09:00
Ramon Roche e74e1bb32a github: Update pull request template for clarity
Removed outdated sections and streamlined the pull request template.
2025-11-19 10:26:35 -09:00
Jacob Dahl 5c469a36b8 drivers: bootloaders: specify UAVCAN only in KConfig (#25947) 2025-11-19 13:58:58 -05:00
Jacob Dahl efbc9e64a4 mavlink: esc: fix ESC_STATUS and ESC_INFO message emission. (#25849)
* mavlink: esc: fix ESC_STATUS and ESC_INFO message emission.

Fixes mavlink messages emission for ESC messages. Actuator --> MotorNumber mapping was not respected, the mavlink messages should be reporting the ESC status in motor number order not actuator order.

* Update src/modules/mavlink/streams/ESC_STATUS.hpp

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* Update src/modules/mavlink/streams/ESC_INFO.hpp

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* remove dependency on mixer_module/output_functions.hpp

* add actuator function definitions to EscReport.msg

* clean up

* add missing header

---------

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
2025-11-20 06:51:42 +13:00