mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-06-25 16:50:35 +08:00
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)
This commit is contained in:
@@ -31,21 +31,28 @@
|
||||
#
|
||||
############################################################################
|
||||
|
||||
# Find the Ignition_Transport library
|
||||
find_package(ignition-transport
|
||||
# Find the gz_Transport library
|
||||
find_package(gz-transport
|
||||
#REQUIRED COMPONENTS core
|
||||
NAMES
|
||||
ignition-transport8
|
||||
ignition-transport10
|
||||
ignition-transport11
|
||||
gz-transport12
|
||||
#QUIET
|
||||
)
|
||||
|
||||
if(ignition-transport_FOUND)
|
||||
if(gz-transport_FOUND)
|
||||
|
||||
add_compile_options(-frtti -fexceptions)
|
||||
|
||||
set(IGN_TRANSPORT_VER ${ignition-transport_VERSION_MAJOR})
|
||||
set(GZ_TRANSPORT_VER ${gz-transport_VERSION_MAJOR})
|
||||
|
||||
if (GZ_TRANSPORT_VER GREATER_EQUAL 12)
|
||||
set(GZ_TRANSPORT_LIB gz-transport${GZ_TRANSPORT_VER}::core)
|
||||
else()
|
||||
set(GZ_TRANSPORT_LIB ignition-transport${GZ_TRANSPORT_VER}::core)
|
||||
endif()
|
||||
|
||||
px4_add_module(
|
||||
MODULE modules__simulation__gz_bridge
|
||||
@@ -58,7 +65,7 @@ if(ignition-transport_FOUND)
|
||||
DEPENDS
|
||||
mixer_module
|
||||
px4_work_queue
|
||||
ignition-transport${IGN_TRANSPORT_VER}::core
|
||||
${GZ_TRANSPORT_LIB}
|
||||
MODULE_CONFIG
|
||||
module.yaml
|
||||
)
|
||||
|
||||
@@ -4,3 +4,6 @@ export PX4_GZ_MODELS=@PX4_SOURCE_DIR@/Tools/simulation/gz/models
|
||||
export PX4_GZ_WORLDS=@PX4_SOURCE_DIR@/Tools/simulation/gz/worlds
|
||||
|
||||
export IGN_GAZEBO_RESOURCE_PATH=$IGN_GAZEBO_RESOURCE_PATH:$PX4_GZ_MODELS:$PX4_GZ_WORLDS
|
||||
|
||||
# IGN -> GZ as of Garden
|
||||
export GZ_SIM_RESOURCE_PATH=$GZ_SIM_RESOURCE_PATH:$PX4_GZ_MODELS:$PX4_GZ_WORLDS
|
||||
|
||||
Reference in New Issue
Block a user