refactor(simulation/gz_bridge): convert params.c to module.yaml

Convert 1 parameter file(s) from legacy C format to YAML
module configuration.
This commit is contained in:
Jacob Dahl
2026-03-17 21:55:35 -08:00
committed by Jacob Dahl
parent 146f2b2331
commit 1d1abb3ba2
3 changed files with 67 additions and 107 deletions
@@ -69,6 +69,7 @@ if (gz-transport_FOUND)
${GZ_TRANSPORT_TARGET}
MODULE_CONFIG
module.yaml
parameters.yaml
)
target_include_directories(modules__simulation__gz_bridge
@@ -1,107 +0,0 @@
/****************************************************************************
*
* Copyright (c) 2022 PX4 Development Team. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
*
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in
* the documentation and/or other materials provided with the
* distribution.
* 3. Neither the name PX4 nor the names of its contributors may be
* used to endorse or promote products derived from this software
* without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
* FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
* COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
* BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
* OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
* AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
* ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGE.
*
****************************************************************************/
/**
* Simulator Gazebo bridge enable
*
* @boolean
* @reboot_required true
* @group UAVCAN
*/
PARAM_DEFINE_INT32(SIM_GZ_EN, 0);
/**
* Enable laser/lidar sensors in Gazebo bridge
*
* @boolean
* @reboot_required true
* @group Simulation
* @value 0 Disabled
* @value 1 Enabled
*/
PARAM_DEFINE_INT32(SIM_GZ_EN_LIDAR, 1);
/**
* Enable optical flow sensor in Gazebo bridge
*
* @boolean
* @reboot_required true
* @group Simulation
* @value 0 Disabled
* @value 1 Enabled
*/
PARAM_DEFINE_INT32(SIM_GZ_EN_FLOW, 1);
/**
* Enable airspeed sensor in Gazebo bridge
*
* @boolean
* @reboot_required true
* @group Simulation
* @value 0 Disabled
* @value 1 Enabled
*/
PARAM_DEFINE_INT32(SIM_GZ_EN_ASPD, 1);
/**
* Enable barometer/air pressure sensor in Gazebo bridge
*
* @boolean
* @reboot_required true
* @group Simulation
* @value 0 Disabled
* @value 1 Enabled
*/
PARAM_DEFINE_INT32(SIM_GZ_EN_BARO, 1);
/**
* Enable odometry in Gazebo bridge
*
* @boolean
* @reboot_required true
* @group Simulation
* @value 0 Disabled
* @value 1 Enabled
*/
PARAM_DEFINE_INT32(SIM_GZ_EN_ODOM, 1);
/**
* Enable GPS/NavSat sensor in Gazebo bridge
*
* @boolean
* @reboot_required true
* @group Simulation
* @value 0 Disabled
* @value 1 Enabled
*/
PARAM_DEFINE_INT32(SIM_GZ_EN_GPS, 1);
@@ -0,0 +1,66 @@
module_name: gz_bridge
parameters:
- group: Simulation
definitions:
SIM_GZ_EN_LIDAR:
description:
short: Enable laser/lidar sensors in Gazebo bridge
type: enum
values:
0: Disabled
1: Enabled
default: 1
reboot_required: true
SIM_GZ_EN_FLOW:
description:
short: Enable optical flow sensor in Gazebo bridge
type: enum
values:
0: Disabled
1: Enabled
default: 1
reboot_required: true
SIM_GZ_EN_ASPD:
description:
short: Enable airspeed sensor in Gazebo bridge
type: enum
values:
0: Disabled
1: Enabled
default: 1
reboot_required: true
SIM_GZ_EN_BARO:
description:
short: Enable barometer/air pressure sensor in Gazebo bridge
type: enum
values:
0: Disabled
1: Enabled
default: 1
reboot_required: true
SIM_GZ_EN_ODOM:
description:
short: Enable odometry in Gazebo bridge
type: enum
values:
0: Disabled
1: Enabled
default: 1
reboot_required: true
SIM_GZ_EN_GPS:
description:
short: Enable GPS/NavSat sensor in Gazebo bridge
type: enum
values:
0: Disabled
1: Enabled
default: 1
reboot_required: true
- group: UAVCAN
definitions:
SIM_GZ_EN:
description:
short: Simulator Gazebo bridge enable
type: boolean
default: 0
reboot_required: true