Skip to content

Commit 0641a99

Browse files
committed
Gazebo-classic: add define for development.xml
1 parent a31aef4 commit 0641a99

File tree

2 files changed

+9
-1
lines changed

2 files changed

+9
-1
lines changed

src/modules/simulation/simulator_mavlink/sitl_targets_gazebo-classic.cmake

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,12 +44,20 @@ if(gazebo_FOUND)
4444
# project to build sitl_gazebo if necessary
4545
px4_add_git_submodule(TARGET git_sitl_gazebo-classic PATH "${PX4_SOURCE_DIR}/Tools/simulation/gazebo-classic/sitl_gazebo-classic")
4646
include(ExternalProject)
47+
48+
# Set MAVLINK_DEVELOPMENT if using development dialect
49+
set(GAZEBO_MAVLINK_ARGS)
50+
if(CONFIG_MAVLINK_DIALECT STREQUAL "development")
51+
list(APPEND GAZEBO_MAVLINK_ARGS -DMAVLINK_DEVELOPMENT=1)
52+
endif()
53+
4754
ExternalProject_Add(sitl_gazebo-classic
4855
SOURCE_DIR ${PX4_SOURCE_DIR}/Tools/simulation/gazebo-classic/sitl_gazebo-classic
4956
CMAKE_ARGS
5057
-DCMAKE_INSTALL_PREFIX=${CMAKE_INSTALL_PREFIX}
5158
-DSEND_ODOMETRY_DATA=ON
5259
-DGENERATE_ROS_MODELS=ON
60+
${GAZEBO_MAVLINK_ARGS}
5361
BINARY_DIR ${PX4_BINARY_DIR}/build_gazebo-classic
5462
INSTALL_COMMAND ""
5563
DEPENDS git_sitl_gazebo-classic

0 commit comments

Comments
 (0)