I am building a simulation in Gazebo harmonic on a custom airframe which has 4 lidars. I have the first two sensors in the model’s SDF file with the gz plugin:
` <plugin filename="gz-sim-sensors-system" name="gz::sim::systems::Sensors">
</plugin>`
The gz topics get correctly created and published as:
/world/default/model/custom_airframe/link/lidar2_sensor_link/sensor/lidar2/scan
/world/default/model/custom_airframe/link/lidar_sensor_link/sensor/lidar/scan
I have also set distance_sensor to be PublicationMulti in dds_topics.yaml :
`subscriptions_multi:
- topic: /fmu/in/distance_sensor
type: px4_msgs::msg::DistanceSensor`
However, I can only get the "/world/default/model/custom_airframe/link/lidar_sensor_link/sensor/lidar/scan/points"
gz topic to correctly connect with the PX4 uORB topic distance_sensor.
When looking at the GZBridge.cpp file we can see:
`bool GZBridge::subscribeDistanceSensor(bool required)
{
std::string lidar_sensor = "/world/" + _world_name + "/model/" + _model_name +
"/link/lidar_sensor_link/sensor/lidar/scan";
if (!_node.Subscribe(lidar_sensor, &GZBridge::laserScantoLidarSensorCallback, this)) {
PX4_WARN("failed to subscribe to %s", lidar_sensor.c_str());
return required ? false : true;
}
return true;
}`
How can I do have more than one distance_sensor?