From aa8a9e3a06293122e8d2fc5741de1f08a64d3b1a Mon Sep 17 00:00:00 2001 From: Jacob Dahl Date: Thu, 30 May 2024 12:00:22 -0600 Subject: [PATCH] laser scan subscription optional --- src/modules/simulation/gz_bridge/GZBridge.cpp | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/modules/simulation/gz_bridge/GZBridge.cpp b/src/modules/simulation/gz_bridge/GZBridge.cpp index 117040555a..3464c62869 100644 --- a/src/modules/simulation/gz_bridge/GZBridge.cpp +++ b/src/modules/simulation/gz_bridge/GZBridge.cpp @@ -196,12 +196,11 @@ int GZBridge::init() return PX4_ERROR; } - // Laser Scan + // Laser Scan: optional std::string laser_scan_topic = "/world/" + _world_name + "/model/" + _model_name + "/link/link/sensor/lidar_2d_v2/scan"; if (!_node.Subscribe(laser_scan_topic, &GZBridge::laserScanCallback, this)) { - PX4_ERR("failed to subscribe to %s", laser_scan_topic.c_str()); - return PX4_ERROR; + PX4_WARN("failed to subscribe to %s", laser_scan_topic.c_str()); } #if 0