* 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>
* 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
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.
- 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?
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
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.
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
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.
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.
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
Abort publication immediately when not enough memory is available.
Zero _zenoh_publishers and _zenoh_subscribers to ensure we're not
dereferencing a wrong pointer
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.
* 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>