mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-10-28 06:03:34 +08:00
Add ignition gazebo support for PX4 Software-In-The-Loop simulations
This commit adds SITL support for ignition gazebo. Ignition gazebo is a replacement for the "classic" gazebo for future applications. The simulation can be run as the following ``` make px4_sitl ignition ```
This commit is contained in:
@@ -48,6 +48,20 @@ ExternalProject_Add(sitl_gazebo
|
||||
BUILD_COMMAND ${CMAKE_COMMAND} --build <BINARY_DIR> -- -j ${build_cores}
|
||||
)
|
||||
|
||||
px4_add_git_submodule(TARGET git_ign_gazebo PATH "${PX4_SOURCE_DIR}/Tools/simulation-ignition")
|
||||
ExternalProject_Add(simulation-ignition
|
||||
SOURCE_DIR ${PX4_SOURCE_DIR}/Tools/simulation-ignition
|
||||
CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=${CMAKE_INSTALL_PREFIX}
|
||||
BINARY_DIR ${PX4_BINARY_DIR}/build_ign_gazebo
|
||||
INSTALL_COMMAND ""
|
||||
DEPENDS git_ign_gazebo
|
||||
USES_TERMINAL_CONFIGURE true
|
||||
USES_TERMINAL_BUILD true
|
||||
EXCLUDE_FROM_ALL true
|
||||
BUILD_ALWAYS 1
|
||||
BUILD_COMMAND ${CMAKE_COMMAND} --build <BINARY_DIR> -- -j ${build_cores}
|
||||
)
|
||||
|
||||
ExternalProject_Add(mavsdk_tests
|
||||
SOURCE_DIR ${PX4_SOURCE_DIR}/test/mavsdk_tests
|
||||
CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=${CMAKE_INSTALL_PREFIX}
|
||||
@@ -90,6 +104,7 @@ set(viewers
|
||||
none
|
||||
jmavsim
|
||||
gazebo
|
||||
ignition
|
||||
)
|
||||
|
||||
set(debuggers
|
||||
@@ -179,6 +194,8 @@ foreach(viewer ${viewers})
|
||||
add_dependencies(${_targ_name} px4 sitl_gazebo)
|
||||
elseif(viewer STREQUAL "jmavsim")
|
||||
add_dependencies(${_targ_name} px4 git_jmavsim)
|
||||
elseif(viewer STREQUAL "ignition")
|
||||
add_dependencies(${_targ_name} px4 simulation-ignition)
|
||||
endif()
|
||||
else()
|
||||
if(viewer STREQUAL "gazebo")
|
||||
|
||||
Reference in New Issue
Block a user