86 Commits

Author SHA1 Message Date
Jacob Dahl
9e8b530ad9
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-03-25 11:49:03 -06:00
Jaeyoung Lim
950f2272bf
Fix scene path for jsbsim (#24568)
The sitl_run script was misdirecting FG_AIRCRAFT when running flightgear GUI
2025-03-19 20:00:19 +01:00
Jacob Dahl
690fa8bb15
update gz classic submodule (#24468) 2025-03-09 10:18:59 +01:00
Jacob Dahl
ea8bcd9cef
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-03-05 17:37:16 -07:00
Jacob Dahl
6dc39d9deb
[wip] gz plugins (#24153)
* added optical flow to gz bridge

* log high rate sensor data

* it builds

* it builds and publishes, need to figure out build system now

* single library

* rename files

* add gz_msg for proto, fix build, test basic flow impl

* update rate, no blur

* PX4-OpticalFlow impl

* rename OpticalFlowSensor

* rename plugins

* disable gps, add plugin path

* cleanup

* fix plugin path export

* properly add OpticalFlowSystem dependency to gz

* move everything under gz_bridge

* cleanup

* add GZ_VEBOSE

* cleanup model/world build target cmake

* added GZ_DISTRO env, harmonic or ionic

* fix gz transport, unstage ark fpv bootloader

* unstage logged_topics.cpp

* cleanup

* make format

* ci fixes

* fix cmake

* remove required for gz-transport

* use model/world namespace for multi vehicle sim. Make format

* make format

* license

* remove needless member var

* made separate Kconfig for gz_msgs, gz_plugins, and gz_bridge

* move OpticalFlow build to it's own cmake

* fix clang

* cleanup comments

* fix rebase
2025-03-03 12:21:28 -09:00
Jacob Dahl
3b2d74b017
gz: Refactor GZBridge and px4-rc.simulator (#24421)
* disable SENS_EN_GPSSIM for all gz airframes

* add GPS + noise to GZBridge

* remove mutex from gz callbacks. Callbacks run synchronously after sim update step and run() loop does not share resources.

* remove hrt check in callbacks

* format

* remove param set-default for already default params

* update submodule

* remove unnecessary comments

* overhaul of the GZBridge and px4-rc.simulator script

* remove arg

* shellcheck disable

* add bus/address

* start gz_bridge before adjusting sim speed or camera follow
2025-03-03 11:29:21 -09:00
Jacob Dahl
af311c8d45 gz: update submodule 2025-02-19 12:08:40 -05:00
Pedro Roque
e7e76e2e21
Spacecraft build and bare control allocator (#24221) 2025-02-06 23:54:24 -05:00
Sam 3 Firestorm
1eb9d05f69
Gazebo classic: report correct limits for H480 gimbal yaw (#24269) 2025-01-29 18:37:00 +01:00
Silvan Fuhrer
367a8a7fc4 update gz submodule to get new tiltrotor sim
Signed-off-by: Silvan Fuhrer <silvan@auterion.com>
2024-12-19 09:57:55 +01:00
Matthias Grob
ef823e5bb1 gz submodule: switch to hash on submodule main branch
after https://github.com/PX4/PX4-gazebo-models/pull/71 was merged
2024-12-18 18:06:37 +01:00
Perre
8a9391321d
Adding gimbal rate in gz simulation (#24125)
* Adding gimbal rate in gz simulation

* add submodule
2024-12-18 16:25:12 +01:00
Stefano Colli
0561f6c9fc
GZ: add gimbal simulation (#23382) 2024-12-18 12:15:03 +01:00
Perre
4696338d29
Add gz model for quadtailsitter (#23943)
* Add gazebo airspeed plugin and add a tailsitter model
---------

Co-authored-by: Claudio Chies <61051109+Claudio-Chies@users.noreply.github.com>
2024-12-02 17:27:23 +01:00
Claudio Chies
d14c054149
SIM: MPC: add two x500 lidar airframes (#23879)
* add two x500 lidar airframe, including the gazebo bridge for the lidar sensors and their orientation

* Update src/modules/simulation/gz_bridge/GZBridge.cpp

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

* Update src/modules/simulation/gz_bridge/GZBridge.hpp

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

* update submodule

---------

Co-authored-by: Jacob Dahl <37091262+dakejahl@users.noreply.github.com>
2024-11-13 08:44:19 +01:00
Hamish Willee
b390d5876a
AUTOPILOT.capabilities includes gimbal manager protocol bit (#23692)
* AUTOPILOT.capabilities includes gimbal manager protocol bit

Sets MAV_PROTOCOL_CAPABILITY_COMPONENT_IMPLEMENTS_GIMBAL_MANAGER bit in AUTOPILOT.capabilities

* mavlink: update submodule

* mavlink: only set gimbal flag if gimbal param set

We should probably only set the flag if the gimbal manager is actually
set up using the MNT_MODE_IN parameter.

* mavlink: make param optional

If the gimbal module is not built in we don't have the MNT_MODE_IN
param, so we need to deal with that.

* gazebo-classic: update submodule

---------

Co-authored-by: Julian Oes <julian@oes.ch>
2024-10-17 08:41:38 +11:00
Daniel Agar
c9343ca11d sitl_gazebo-classic update submodule to latest 2024-08-12 16:26:56 +02:00
PX4 BuildBot
a39a3e2099 Update submodule gz to latest Wed Aug 7 12:39:06 UTC 2024
- gz in PX4/Firmware (411a328e325e5109a453cf84d0c65393be86bfef): 312cd002ff
    - gz current upstream: 536305adee
    - Changes: 312cd002ff...536305adee

    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 (28a0de63c5787c10b366aeb0371c5bfe710d0ca7): 67431d233f
    - sitl_gazebo-classic current upstream: 67af3c3a6d
    - Changes: 67431d233f...67af3c3a6d

    67af3c3 2024-07-18 Silvan Fuhrer - model/lidar: incrase range to 50m (#1049)
2024-08-07 11:23:16 -04:00
PX4 BuildBot
e0ea91fc27 Update submodule gz to latest Thu Jul 11 00:39:09 UTC 2024
- gz in PX4/Firmware (2c3401dc8367a860cbbabc5e77898ff206f554aa): 881558c8c2
    - gz current upstream: 312cd002ff
    - Changes: 881558c8c2...312cd002ff

    312cd00 2024-07-08 chfriedrich98 - Add rover ackermann model (#46)
2024-07-10 21:05:57 -04:00
PX4 BuildBot
ea72d56a00 Update submodule gz to latest Mon Jun 17 12:39:07 UTC 2024
- gz in PX4/Firmware (0c18d43657b1b7279b8dce78a6014243cc14d1e2): d754381a1c
    - gz current upstream: 881558c8c2
    - Changes: d754381a1c...881558c8c2

    881558c 2024-05-29 Jacob Dahl - new lidar_v2 model and x500_lidar vehicle
2024-06-17 19:04:15 -04:00
Silvan Fuhrer
ad58808cf3
update gazebo classic (#23276)
Signed-off-by: Silvan Fuhrer <silvan@auterion.com>
2024-06-17 16:25:56 +02:00
Sergei
b909cc1b5b Updated GZ submodule to the latest hash (d754381) 2024-04-16 11:36:57 -04:00
PX4 BuildBot
67e68783cf Update submodule gz to latest Tue Mar 5 12:39:22 UTC 2024
- gz in PX4/Firmware (5f8f0213a807d327a30a7df05e58f7887cf936ab): 2228336568
    - gz current upstream: 6b4ed09d1b
    - Changes: 2228336568...6b4ed09d1b

    6b4ed09 2024-02-23 Sergei Grichine - Added IMU sensor noise to the model, to avoid STALE messages (#34)
953e02b 2024-02-22 frede791 - add imu sensor model noise
2024-03-05 13:59:22 -05:00
Don Gagne
f02b44bec5 Update to latest sitl gazebo camera 2024-03-03 12:18:02 +13:00
Sergei Grichine
b405d75553
Added Zero Turn Lawnmower model (#22717)
* Added Lawnmower airframe

* Update 5005_gz_lawnmower

Works all right

* Update 5005_gz_lawnmower

RDD_WHL_SPEED has new name: RDD_WHEEL_SPEED

* Update ROMFS/px4fmu_common/init.d-posix/airframes/5005_gz_lawnmower

Co-authored-by: Per Frivik <94360401+PerFrivik@users.noreply.github.com>

* Update ROMFS/px4fmu_common/init.d-posix/airframes/CMakeLists.txt

Co-authored-by: Per Frivik <94360401+PerFrivik@users.noreply.github.com>

* Renamed 5005_gz_lawnmower to 4011_gz_lawnmower

also pulled latest GZ models hash

---------

Co-authored-by: Per Frivik <94360401+PerFrivik@users.noreply.github.com>
2024-02-22 15:30:12 +01:00
PX4 BuildBot
0c099f2b56 Update submodule gz to latest Tue Feb 13 12:39:17 UTC 2024
- gz in PX4/Firmware (c9ad60e3cceedc218fa7b94ca1ae3632fda68b60): c78f7f0141
    - gz current upstream: f1c461fffb
    - Changes: c78f7f0141...f1c461fffb

    f1c461f 2024-02-08 frederik - increase monocam clipping distance
6d5db73 2024-02-07 Sergei Grichine - Added Zero Turn Lawnmower model (#27)
5332071 2024-02-06 Frederik Markus - add navsat plugin to worlds and navsat sensor to models (#26)
2024-02-13 11:13:17 -05:00
Frederik Markus
0aa7af8b66
update submodule to current main branch commit (#22566)
Signed-off-by: frederik <frederik.anilmarkus@gmail.com>
2023-12-18 15:04:29 +01:00
Frederik Markus
65e53286b6
Standalone px4 stable (#22467)
simulation gazebo: move the gazebo models to submodule, allow for operation with external gazebo instance, independent of startup order. Allows drag an drop of models from gazebo fuel.

* rolled back updates

Signed-off-by: frederik <frederik@auterion.com>

* fixing empy

Signed-off-by: frederik <frederik@auterion.com>

* Update GZBridge.cpp to lower drop position 

Dropping from 1m leads to movement in the rc_cessna. Dropping from 0.5m leads to no movement.

* Update STANDALONE env variable.

* Update STANDALONE env_variable on GZBridge

* Update src/modules/simulation/gz_bridge/GZBridge.cpp

Co-authored-by: Daniel Agar <daniel@agar.ca>

* test removal of x500

Signed-off-by: frederik <frederik.anilmarkus@gmail.com>

* removed all models and reworked logic

Signed-off-by: frederik <frederik.anilmarkus@gmail.com>

* remove model path in set_sdf_filename

Signed-off-by: frederik <frederik.anilmarkus@gmail.com>

* filter resource path for world sdf

Signed-off-by: frederik <frederik.anilmarkus@gmail.com>

* updated structure to keep old make px4_sitl

Signed-off-by: frederik <frederik.anilmarkus@gmail.com>

* remove gz tools

Signed-off-by: frederik <frederik.anilmarkus@gmail.com>

* import gz as submodule and reverse rc simulator logic

Signed-off-by: frederik <frederik.anilmarkus@gmail.com>

* [gz-sim]: source GZ_SIM_RESOURCE_PATH only if PX4 starts gz server

Signed-off-by: Beniamino Pozzan <beniamino.pozzan@gmail.com>

* Typo fix

---------

Signed-off-by: frederik <frederik@auterion.com>
Signed-off-by: frederik <frederik.anilmarkus@gmail.com>
Signed-off-by: Beniamino Pozzan <beniamino.pozzan@gmail.com>
Co-authored-by: Daniel Agar <daniel@agar.ca>
Co-authored-by: Beniamino Pozzan <beniamino.pozzan@gmail.com>
2023-12-18 09:43:20 +01:00
PX4 BuildBot
7c1d41aeb8 Update submodule sitl_gazebo-classic to latest Thu Nov 23 00:38:54 UTC 2023
- sitl_gazebo-classic in PX4/Firmware (9387de8282daaae776a717d5ff1b6f4b82dd1e51): 20ded0757b
    - sitl_gazebo-classic current upstream: 33ac87a376
    - Changes: 20ded0757b...33ac87a376

    33ac87a 2023-11-14 Daniel Honies - Fix opencv aruco version bug (#1017)
ff6f74e 2023-11-13 jmackay2 - Remove unused props from tailsitter (#1015)
2023-11-22 21:40:35 -05:00
Frederik Markus
fc5b868138
fixing the turning direction of the Cessna Propeller (#22276)
Signed-off-by: frederik <frederik@auterion.com>
Co-authored-by: frederik <frederik@auterion.com>
2023-11-09 13:08:54 +01:00
Frederik Markus
142e44c418
Tools/simulation/gz/models/advanced_plane: updated paths
Moves paths for advanced plane files from personal directory (frede791) to PX4 directory on fuel.

Signed-off-by: frederik <frederik@auterion.com>
2023-11-07 17:39:26 -05:00
Frederik Markus
39fbfd8e0c
Port of Advanced Plane from Gazebo Classic to Gazebo (#22167)
* started tiltrotor port

* added advanced plane and changed some parameters on the tiltrotor

* added advanced plane

* removed tiltrotor for clean push

* removed standard vtol old model file

* removing the standard vtol changes from this PR, since it is not part of the advanced plane

* removed advanced plane meshes as they are already found in the rc_cessna

* updating and improving airframe parameters

* updated mesh paths

Signed-off-by: frederik <frederik@auterion.com>

---------

Signed-off-by: frederik <frederik@auterion.com>
Co-authored-by: frederik <frederik@auterion.com>
2023-11-06 09:31:04 +01:00
Frederik Markus
d6dbf38a1b
add windy default world (#22273)
* add windy default world

* Rename windy_default.sdf to windy.sdf

* rename windy.sdf world

---------

Co-authored-by: frederik <frederik@auterion.com>
2023-11-01 09:35:37 +01:00
Frederik Markus
26fd4c852c
update default omnicopter pose (#22218)
Co-authored-by: frederik <frederik@auterion.com>
2023-10-30 14:38:48 +01:00
Frederik Markus
7ac50a20b0
Tools/simulation/gz: initial AVL automation tool (#22204)
This is a tool that can be used to generate advanced lift drag plugin parameters automatically using AVL. Rather than having to create .avl files yourself, pass them to AVL, read out the correct parameters and place them in the Advanced Lift Drag plugin, this tool will do all that for you and generate a complete advanced_lift_drag plugin sdf containing all necessary parameters for any vehicle. All that is required is to specify what the physical geometries of the vehicle are. The scripts are adaptable enough to support a self-selected number of control surfaces.

---------

Co-authored-by: frederik <frederik@auterion.com>
2023-10-18 15:33:50 -04:00
PX4 BuildBot
5f94eb1493 Update submodule sitl_gazebo-classic to latest Thu Jul 27 12:39:07 UTC 2023
- sitl_gazebo-classic in PX4/Firmware (1c1f8da7d9cc416aaa53d76254fe08c2e9fa65e6): c8ac7ff39b
    - sitl_gazebo-classic current upstream: 20ded0757b
    - Changes: c8ac7ff39b...20ded0757b

    20ded07 2023-07-21 Silvan Fuhrer - wind pluging: fix wind ramp (#998)
6620a6b 2023-07-20 Silvan Fuhrer - wind plugin: add option to simulate a constant wind change with ramp up (#996)
2023-07-27 12:58:59 -04:00
Ayham Alharbat
1c1f8da7d9
add a gz-omnicopter model (#21818)
* [not-working] add a gz-omnicopter model

* Fix axis directions on omnicopter model

The omnicopter joint axis directions had to be adapted for sdf 1.9 as it has different conventions for joint axis definitions.

* include model from gz-fuel & remove mesh files

* Fix omnicopter model using fuel

---------

Co-authored-by: Jaeyoung Lim <jalim@ethz.ch>
2023-07-27 11:34:27 +02:00
Daniel Agar
57b3c26ab0
Tools/simulation/gz: load ApplyLinkWrench plugin by default (#21874)
- this can be useful for applying arbitrary forces via ignition transport like hand launching a vehicle by throwing it in the air
2023-07-23 11:05:51 -04:00
PX4 BuildBot
3f1740cb46 Update submodule sitl_gazebo-classic to latest Tue Jul 18 17:04:39 UTC 2023
- sitl_gazebo-classic in PX4/Firmware (a3f398943ebe28ba0074a8a67f300e49c261d708): 0d53638452
    - sitl_gazebo-classic current upstream: c8ac7ff39b
    - Changes: 0d53638452...c8ac7ff39b

    c8ac7ff 2023-07-18 Martina Rivizzigno - Add gimbal device id to mavlink messages DeviceAttitudeStatus and DeviceInformation (#994)
2023-07-18 14:26:35 -04:00
PX4 BuildBot
bbc6ed43bd Update submodule sitl_gazebo-classic to latest Sat Jun 10 00:39:02 UTC 2023
- sitl_gazebo-classic in PX4/Firmware (f9510557a64825a00c8d52481def76a7a31cde1b): 2e3ed9bfb0
    - sitl_gazebo-classic current upstream: 0d53638452
    - Changes: 2e3ed9bfb0...0d53638452

    0d53638 2023-05-23 JaeyoungLim - Fix force visualization feature (#985)
9bfecb6 2023-05-22 JaeyoungLim - Fix readme displayed in github (#984)
2023-06-09 21:17:46 -04:00
Giacomo Bertelli
99f6d4190c
Update sitl_multiple_run.sh (#21538)
Edited line to account for the fact that the file has been moved one level deeper in the folder tree (the same edit should be made in the documentation https://docs.px4.io/main/en/simulation/multi_vehicle_jmavsim.html)
2023-06-02 10:28:49 +02:00
PX4 BuildBot
8ae7720569 Update submodule sitl_gazebo-classic to latest Fri May 19 12:38:32 UTC 2023
- sitl_gazebo-classic in PX4/Firmware (599a66c8a5f33fd9e139ab950e716d0e36a3e809): 3f2b9678af
    - sitl_gazebo-classic current upstream: 2e3ed9bfb0
    - Changes: 3f2b9678af...2e3ed9bfb0

    2e3ed9b 2023-05-14 JaeyoungLim - Add Quadtailsitter model based on the swan K1 (#982)
670d4d2 2023-05-12 Julian Oes - airspeed: rotate tube so it faces forward (#981)
803254d 2023-05-11 Julian Oes - tailsitter: add valid inertia, fix CG (#980)
6fd1d17 2023-05-09 JaeyoungLim - Fix advanced plane model (#979)
506f10c 2023-05-05 Julian Oes - iris: move IMU and GPS where they are (#978)
2023-05-19 08:41:03 -06:00
PX4 BuildBot
432ce45ef0 Update submodule sitl_gazebo-classic to latest Mon May 1 12:38:59 UTC 2023
- sitl_gazebo-classic in PX4/Firmware (4bb4bc185bf326c45b294258a7e0d2732ad04d9d): 1c5818e56c
    - sitl_gazebo-classic current upstream: 3f2b9678af
    - Changes: 1c5818e56c...3f2b9678af

    3f2b967 2023-04-11 JaeyoungLim - Ignore sdf validation for land_pad (#977)
a91e4fd 2023-04-11 Jonas Perolini - Add support for camera and new land pad in irlock simulation (#950)
8fcd3cf 2023-04-10 JaeyoungLim - Remove bionic related tests (#974)
2023-05-01 11:10:37 -04:00
TheotimeBlg
67d03461d1
Port px4vision airframe to gz environment (#21409)
* Port of the PX4 Vision gazebo-classic model to Gazebo. With Gazebo Garden, everything seems functionnal.

* Port of the PX4 Vision gazebo-classic model to Gazebo.

With Gazebo Garden, everything seems functionnal.

* Added airframe for command make px4_sitl gz_px4vision

* revert author field

* Import model from Ignition Fuel instead of defining it directly in the .sdf
2023-04-12 18:46:49 +02:00
Beniamino Pozzan
448b915694
gazebo airframes: cleanup and fix missing parameters (#21411)
Signed-off-by: Beniamino Pozzan <beniamino.pozzan@phd.unipd.it>
2023-03-31 23:01:29 -07:00
SungTae Moon
178b31b6ff
jmavsim_run.sh: fix the wrong flags expression in getopt (#20162) 2023-03-30 07:22:31 +02:00
Beniamino Pozzan
eeb90ac70a
gazebo-classic/sitl_mutliple_run.sh: start spawning drones from index 1 (#21183)
Fix microdds key session collision when drones
with index 0 and 1 are used together

Signed-off-by: Beniamino Pozzan <beniamino.pozzan@phd.unipd.it>
2023-03-24 05:58:26 +01:00
Frederic Taillandier
18898f1876
updating sitl-gazebo classic (#21352)
Co-authored-by: root <root@DESKTOP-OINCOKE>
2023-03-22 14:04:02 +01:00
frederic@auterion.com
9a56b0a70d refactoring jinja-gen call in a cleaner way 2023-03-20 14:50:56 +01:00