From b15cf929e75439330a544dac2e65105366a8be1c Mon Sep 17 00:00:00 2001 From: hugo2410 Date: Tue, 5 Nov 2024 09:23:47 +0100 Subject: [PATCH 1/7] updates CMakelist to include new world --- src/modules/simulation/gz_bridge/CMakeLists.txt | 1 + 1 file changed, 1 insertion(+) diff --git a/src/modules/simulation/gz_bridge/CMakeLists.txt b/src/modules/simulation/gz_bridge/CMakeLists.txt index 358a4e703226..797e60e6610d 100644 --- a/src/modules/simulation/gz_bridge/CMakeLists.txt +++ b/src/modules/simulation/gz_bridge/CMakeLists.txt @@ -90,6 +90,7 @@ if(gz-transport_FOUND) lawn aruco rover + custom_aruco ) # find corresponding airframes From 48bd3953fc3a0e81546d31b285de570589593c81 Mon Sep 17 00:00:00 2001 From: hugo2410 Date: Tue, 5 Nov 2024 13:33:24 +0100 Subject: [PATCH 2/7] update submodule --- .gitmodules | 2 +- Tools/simulation/gz | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.gitmodules b/.gitmodules index 1ebafcf5a4e5..b3ebf3292726 100644 --- a/.gitmodules +++ b/.gitmodules @@ -74,7 +74,7 @@ branch = px4 [submodule "Tools/simulation/gz"] path = Tools/simulation/gz - url = https://github.com/PX4/PX4-gazebo-models.git + url = https://github.com/hugo2410/PX4-gazebo-models.git branch = main [submodule "boards/modalai/voxl2/libfc-sensor-api"] path = boards/modalai/voxl2/libfc-sensor-api diff --git a/Tools/simulation/gz b/Tools/simulation/gz index 536305adee09..143084f566f7 160000 --- a/Tools/simulation/gz +++ b/Tools/simulation/gz @@ -1 +1 @@ -Subproject commit 536305adee09b9ace391b16107e625cf7c6db7e7 +Subproject commit 143084f566f7cf5d4311c0df89755c53129d6b21 From 26dd3b63366337dbd050d4b4b6b4d6aa8a8c04dc Mon Sep 17 00:00:00 2001 From: hugo2410 Date: Tue, 5 Nov 2024 14:06:42 +0100 Subject: [PATCH 3/7] ADD:updates submodule --- .gitmodules | 2 +- Tools/simulation/gz | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.gitmodules b/.gitmodules index b3ebf3292726..a489eaefcb23 100644 --- a/.gitmodules +++ b/.gitmodules @@ -74,7 +74,7 @@ branch = px4 [submodule "Tools/simulation/gz"] path = Tools/simulation/gz - url = https://github.com/hugo2410/PX4-gazebo-models.git + url = git@github.com:hugo2410/PX4-gazebo-models.git branch = main [submodule "boards/modalai/voxl2/libfc-sensor-api"] path = boards/modalai/voxl2/libfc-sensor-api diff --git a/Tools/simulation/gz b/Tools/simulation/gz index 143084f566f7..fd8d0c0dd240 160000 --- a/Tools/simulation/gz +++ b/Tools/simulation/gz @@ -1 +1 @@ -Subproject commit 143084f566f7cf5d4311c0df89755c53129d6b21 +Subproject commit fd8d0c0dd2404c3f7efb7a7901682878c10b5ad8 From 39d607c5fe11e1cf9db98896f8047cfd560c8667 Mon Sep 17 00:00:00 2001 From: hugo2410 Date: Tue, 5 Nov 2024 15:04:56 +0100 Subject: [PATCH 4/7] ADD:updates submodule --- Tools/simulation/gz | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Tools/simulation/gz b/Tools/simulation/gz index fd8d0c0dd240..87b60d28e21e 160000 --- a/Tools/simulation/gz +++ b/Tools/simulation/gz @@ -1 +1 @@ -Subproject commit fd8d0c0dd2404c3f7efb7a7901682878c10b5ad8 +Subproject commit 87b60d28e21efb3c37bfeb90a0d5fa79cda7f64a From c3c8c421d859d398ecdc13bdefc6467d4d277fad Mon Sep 17 00:00:00 2001 From: hugo2410 Date: Tue, 5 Nov 2024 16:23:26 +0100 Subject: [PATCH 5/7] ADD: new aircraft based on x500 with downward facing cam --- .../airframes/4099_gz_x500_custom_cam | 57 +++++++++++++++++++ .../init.d-posix/airframes/CMakeLists.txt | 1 + 2 files changed, 58 insertions(+) create mode 100644 ROMFS/px4fmu_common/init.d-posix/airframes/4099_gz_x500_custom_cam diff --git a/ROMFS/px4fmu_common/init.d-posix/airframes/4099_gz_x500_custom_cam b/ROMFS/px4fmu_common/init.d-posix/airframes/4099_gz_x500_custom_cam new file mode 100644 index 000000000000..2213c7cff0e4 --- /dev/null +++ b/ROMFS/px4fmu_common/init.d-posix/airframes/4099_gz_x500_custom_cam @@ -0,0 +1,57 @@ +#!/bin/sh +# +# @name Gazebo x500 custom cam +# +# @type Quadrotor +# + +. ${R}etc/init.d/rc.mc_defaults + +PX4_SIMULATOR=${PX4_SIMULATOR:=gz} +PX4_GZ_WORLD=${PX4_GZ_WORLD:=default} +PX4_SIM_MODEL=${PX4_SIM_MODEL:=x500} + +param set-default SIM_GZ_EN 1 + +param set-default SENS_EN_GPSSIM 1 +param set-default SENS_EN_BAROSIM 0 +param set-default SENS_EN_MAGSIM 1 + +param set-default CA_AIRFRAME 0 +param set-default CA_ROTOR_COUNT 4 + +param set-default CA_ROTOR0_PX 0.13 +param set-default CA_ROTOR0_PY 0.22 +param set-default CA_ROTOR0_KM 0.05 + +param set-default CA_ROTOR1_PX -0.13 +param set-default CA_ROTOR1_PY -0.20 +param set-default CA_ROTOR1_KM 0.05 + +param set-default CA_ROTOR2_PX 0.13 +param set-default CA_ROTOR2_PY -0.22 +param set-default CA_ROTOR2_KM -0.05 + +param set-default CA_ROTOR3_PX -0.13 +param set-default CA_ROTOR3_PY 0.20 +param set-default CA_ROTOR3_KM -0.05 + +param set-default SIM_GZ_EC_FUNC1 101 +param set-default SIM_GZ_EC_FUNC2 102 +param set-default SIM_GZ_EC_FUNC3 103 +param set-default SIM_GZ_EC_FUNC4 104 + +param set-default SIM_GZ_EC_MIN1 150 +param set-default SIM_GZ_EC_MIN2 150 +param set-default SIM_GZ_EC_MIN3 150 +param set-default SIM_GZ_EC_MIN4 150 + +param set-default SIM_GZ_EC_MAX1 1000 +param set-default SIM_GZ_EC_MAX2 1000 +param set-default SIM_GZ_EC_MAX3 1000 +param set-default SIM_GZ_EC_MAX4 1000 + +param set-default MPC_THR_HOVER 0.60 +param set-default NAV_DLL_ACT 0 +param set-default COM_RC_IN_MODE 4 +param set-default COM_RCL_EXCEPT 4 diff --git a/ROMFS/px4fmu_common/init.d-posix/airframes/CMakeLists.txt b/ROMFS/px4fmu_common/init.d-posix/airframes/CMakeLists.txt index 1ba611c2755a..c952bd2cd695 100644 --- a/ROMFS/px4fmu_common/init.d-posix/airframes/CMakeLists.txt +++ b/ROMFS/px4fmu_common/init.d-posix/airframes/CMakeLists.txt @@ -87,6 +87,7 @@ px4_add_romfs_files( 4013_gz_x500_lidar 4014_gz_x500_mono_cam_down 4015_gz_r1_rover_mecanum + 4099_gz_x500_custom_cam 6011_gazebo-classic_typhoon_h480 6011_gazebo-classic_typhoon_h480.post From b0d20259a66a77756bbc64aadd26756dff828406 Mon Sep 17 00:00:00 2001 From: hugo2410 Date: Tue, 5 Nov 2024 16:24:09 +0100 Subject: [PATCH 6/7] ADD:updates submodule --- Tools/simulation/gz | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Tools/simulation/gz b/Tools/simulation/gz index 87b60d28e21e..021e0ed328a1 160000 --- a/Tools/simulation/gz +++ b/Tools/simulation/gz @@ -1 +1 @@ -Subproject commit 87b60d28e21efb3c37bfeb90a0d5fa79cda7f64a +Subproject commit 021e0ed328a138ec70cffa7daca314343a89b5dc From c725a46232e6b0ad413f70cc963e6f4c6fdf3aa8 Mon Sep 17 00:00:00 2001 From: hugo2410 Date: Tue, 5 Nov 2024 16:45:05 +0100 Subject: [PATCH 7/7] ADD:updates submodule --- Tools/simulation/gz | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Tools/simulation/gz b/Tools/simulation/gz index 021e0ed328a1..271e3e32d1c2 160000 --- a/Tools/simulation/gz +++ b/Tools/simulation/gz @@ -1 +1 @@ -Subproject commit 021e0ed328a138ec70cffa7daca314343a89b5dc +Subproject commit 271e3e32d1c2089d174904748a73acc54eac634a