50 Commits

Author SHA1 Message Date
Jaeyoung Lim
3f50bd051f Optionally enable airspeed sensor sim
Enable and disable sensor sim module with parameter
2023-02-15 01:37:32 +09:00
Jaeyoung Lim
d5ddb44241 Add sensor airspeed sim
This commit adds the airspeed sensor sim to simulate airspeed sensors
2023-02-13 13:00:39 -05:00
Beat Küng
ebc1d7544e
battery_simulator: add support for failure injection
For failsafe triggering in automated tests
2023-02-07 19:11:08 -05:00
Benjamin Perseghetti
60de5b3ea4
simulation/gz_bridge: remove proceeding px4_ from servos in gazebo model (#20998)
Signed-off-by: Benjamin Perseghetti <bperseghetti@rudislabs.com>
2023-01-24 19:56:11 -05:00
Benjamin Perseghetti
684b4a4b8a
simulation/gz_bridge: rc_cessna plane model working, Gazebo Garden updates, and prepare for proper airspeed (#20989)
Co-authored-by: Benjamin Perseghetti <bperseghetti@rudislabs.com>
Co-authored-by: Alejandro Hernández Cordero <ahcorde@gmail.com>
2023-01-24 19:01:45 -05:00
Daniel Agar
64c2ec5eea
simulation/gz_bridge: remove cmake CONFIGURE_DEPENDS
- PX4 build system simulation targets are optional and no longer
strictly required
2023-01-24 13:58:30 -05:00
Daniel Agar
9cb6de8010
simulation: relax jmavsim java requirements (finding vecmath.jar) 2023-01-24 13:56:24 -05:00
JaeyoungLim
644aeb9153
support fixed-wing in new Gazebo (gz or ignition gazebo) (#20939)
* Add gz plane airframe config

Co-authored-by: Alejandro Hernández Cordero <ahcorde@gmail.com>
Co-authored-by: Benjamin Perseghetti <bperseghetti@rudislabs.com>
2023-01-24 09:22:53 -05:00
Daniel Agar
3f842f01a0
simulator/gz_bridge: split actuator outputs for ESCs and servos (#20979)
- existing SIM_GZ outputs -> SIM_GZ_EC (ESCs)
 - new SIM_GZ_SV for servos (not fully implemented)
2023-01-21 14:44:09 -05:00
Daniel Agar
6991ac014c
rename 'gazebo' simulation to 'gazebo-classic' (#20936)
- use `gazebo-classic` everywhere consistently referring to the original Gazebo (eg version 9,10,11)
   - additional `gazebo_*` helper targets added for compatibility, but warn about deprecation and tell you the new target naming
 - use `gz` everywhere when referring to Gazebo (aka Ignition Gazebo or new Gazebo)
2023-01-15 11:36:12 -05:00
Daniel Agar
52b9b9ba2f
simulation: restore 'gazebo' alias for 'gazebo_iris'
- only create helper targets if Gazebo 11 found on system
2023-01-14 17:03:18 -05:00
Beniamino Pozzan
af336719e6 gz_bridge: fix world selector environment variable
Signed-off-by: Beniamino Pozzan <beniamino.pozzan@phd.unipd.it>
2023-01-08 00:15:35 -05:00
Daniel Agar
618288cca9 SITL Gazebo classic make airframes simulator specific 2023-01-07 17:00:35 -05:00
Daniel Agar
97c8a60d67 SITL gz make airframes simulator specific 2023-01-07 17:00:35 -05:00
Daniel Agar
ae4cb24100 SITL flightgear make airframes simulator specific 2023-01-07 17:00:35 -05:00
Daniel Agar
1abe35c220 SITL jsbsim make airframes simulator specific 2023-01-07 17:00:35 -05:00
Daniel Agar
75125da34c SITL sihsim make airframes simulator specific 2023-01-07 17:00:35 -05:00
Daniel Agar
95a6eba36c SITL jmavsim make airframes simulator specific
-cleanup and simplify jmavsim SITL launch and debug
2023-01-07 17:00:35 -05:00
bresch
14bf04b9a4 SIH: add to px4_fmu-v5_default and auto start GPS sim driver
- add simulator kconfig dependencies
 - exclude SIH (+deps) where sufficient flash isn't available
2023-01-04 16:26:15 -05:00
Daniel Agar
72cb4bee01
SITL gz fixes and init cleanup (#20725)
- remove broken gz version handling and remove x500-legacy
 - fix all shellcheck warnings
 - prepare for Gazebo Garden compatibility (needs more work)
2022-12-07 15:41:13 -05:00
dsix-ls2n
2833832968
simulation/gz_bridge: ignition with no lockstep (#20561)
When using ignition SITL simulation with NO_LOCKSTEP, the SITL PX4 fails to update the IMU data from Ignition Gazebo.

The timestamp for the IMU data is taken from the ignition message:

 - In LOCKSTEP mode the clock from the ignition simulation and the one from PX4 SITL are synchronized, hence everything works fine
 - In NO_LOCKSTEP mode, those clocks are not synchronized anymore, so the timestamp for the IMU data should not be the one from Ignition but the current time in PX4 SITL when receiving the message.
2022-11-22 11:26:11 -05:00
Paul Erik Frivold
8e5efb0131
simulator_mavlink: Add basic vio failure injection (#20577)
* simulator_mavlink: Add basic vio failure injection

Signed-off-by: Paul Frivold <paul@kefrobotics.com>

* simulator_mavlink: Rm failure not supported warning

Failures commands are also handled in other files,
so warning here could be confusing.

Signed-off-by: Paul Frivold <paul@kefrobotics.com>

Signed-off-by: Paul Frivold <paul@kefrobotics.com>
2022-11-14 13:36:23 +13:00
Hamish Willee
96a305322a
params/uorb docs: rename mixer to control allocation (#20447) 2022-10-24 13:22:26 +02:00
Daniel Agar
cea185268e
msg ROS2 compatibility, microdds_client improvements (timesync, reduced code size, added topics, etc), fastrtps purge
- update all msgs to be directly compatible with ROS2
 - microdds_client improvements
   - timesync
   - reduced code size
   - add to most default builds if we can afford it
   - lots of other little changes
 - purge fastrtps (I tried to save this multiple times, but kept hitting roadblocks)
2022-10-19 19:36:47 -04:00
Matthias Grob
5ca28dd6dc Use isAllFinite() in all places that check finiteness on entire vectors or matrices 2022-10-19 19:09:20 +02:00
Daniel Agar
d792a3ff5b simulator_mavlink: use existing development/common mavlink generation if available 2022-10-17 16:16:36 -04:00
Daniel Agar
ce609144b0
simulation/gz_bridge: fix implicit floating-point conversions 2022-10-09 14:11:19 -04:00
Benjamin Perseghetti
f9522e831c
Gazebo Simulation Enablement (#20319) 2022-09-29 13:49:31 -04:00
Karthik S
70d73c8690
Advanced Plane Airframe for SITL Advanced Lift-Drag Plugin (#20207)
* Changed sitl_gazebo to the advanced liftdrag plugin fork.

* Added advanced plane and its associated parameters to PX4. Also tweaked one of the plugins to fix a compilation error (upcasting from float to double).

* Switched gazebo back to main branch, to avoid merge conflicts.

* Change simulator bridge back to what it was in main branch

* Changed sitl_gazebo to match the PX4 main branch's (commit hash b968405)

* Changed SimulatorIgnitionBridge to match most recent main.
2022-09-27 23:09:27 +02:00
chris1seto
77fdce9f3c
drivers/rc/crsf_rc: update standalone driver for CRSF and direct support for lq/rssi (#20084)
Co-authored-by: Chris Seto <chris1seto@gmail.com>
2022-09-23 19:19:25 -04:00
Daniel Agar
87815d8869 simulator_ignition_bridge: add simple esc_status publication
- ideally we'd get this from the actual joint velocity, but this is
good enough to start
2022-09-19 09:49:12 -04:00
Daniel Agar
3440f543f1 simulator_ignition_bridge: wait for first clock set before returning successfully 2022-09-16 21:37:09 -04:00
Daniel Agar
eaa9eae472 simulator_ignition_bridge: fix double promotions 2022-09-16 11:36:35 -04:00
Konrad
5a7f098b8d Enable multiple simulated imu and magnetometers in gazebo 2022-09-14 10:27:04 +02:00
Daniel Agar
b8fb5dfa51
merge px4_sitl_ign into px4_sitl_default (#20188)
- for convenience merge px4_sitl_ign into px4_sitl_default, but allow simulator_ignition_bridge to quietly skip inclusion if ignition-transport isn't available
 - simulator_ignition_bridge only try setting the system clock in
lockstep builds
 - this simplifies usage and CI system dependencies
2022-09-10 16:18:02 -04:00
Daniel Agar
8f25acd428 sih remove gps and use standalone sensor_gps_sim 2022-09-09 18:00:50 -04:00
Daniel Agar
bfe0d71a21 sih remove baro and use standalone sensor_baro_sim 2022-09-09 18:00:50 -04:00
Daniel Agar
c5336abba2 sih remove mag and use standalone sensor_mag_sim 2022-09-09 18:00:50 -04:00
Daniel Agar
99a20646e2 simulator sih add local position ground truth and cleanup 2022-09-09 18:00:50 -04:00
Daniel Agar
15fece7e14 delete SYS_CTRL_ALLOC 2022-09-09 09:14:09 -04:00
Daniel Agar
bdec17a9d4 drivers/pwm_out_sim: add perf counters (sync with drivers/pwm_out) 2022-09-09 09:14:09 -04:00
Daniel Agar
ce337a3d80 delete unused PWM IOCTLs 2022-09-09 09:14:09 -04:00
Daniel Agar
a7bbcd5b04 delete lib/mixer and mixer_module static mixing 2022-09-09 09:14:09 -04:00
Daniel Agar
0019ffbea6 delete drv_mixer.h 2022-09-09 09:14:09 -04:00
Benjamin Perseghetti
a56f654651
Multi-Vehicle Ignition Gazebo Simulation (#20154) 2022-09-04 21:10:29 -04:00
Daniel Agar
f66b5ce204
simulation: ignition bridge allow IMU or pose callbacks to update system time if newer than clock
* requires HRT lockstep changes to eliminate offset (PR #20146)
2022-09-01 20:42:21 -04:00
Daniel Agar
c52f2143d2 posix lockstep remove HRT offset and use full sim time 2022-09-01 20:40:37 -04:00
Daniel Agar
3da0293369 simulator_ignition_bridge: init error handling 2022-09-01 18:54:59 -04:00
Beat Küng
f57321d365 simulator_mavlink: fix esc_status publication 2022-09-01 17:07:23 -04:00
Daniel Agar
4040e4cdf2 simulation organization and cleanup
- new modules/simulation directory to collect all simulators and related modules
 - new Tools/simulation directory to collect and organize scattered simulation submodules, scripts, etc
 - simulation module renamed to simulator_mavlink
 - sih renamed to simulator_sih (not a great name, but I wanted to be clear it was a simulator)
 - ignition_simulator renamed to simulator_ignition_bridge
 - large sitl_target.cmake split by simulation option and in some cases pushed to appropriate modules
 - sitl targets broken down to what's actually available (eg jmavsim only has 1 model and 1 world)
 - new Gazebo consistently referred to as Ignition for now (probably the least confusing thing until we fully drop Gazebo classic support someday)
2022-08-25 09:10:03 -04:00