mirror of
https://github.com/PX4/PX4-Autopilot.git
synced 2026-06-02 03:36:48 +08:00
laser scan subscription optional
This commit is contained in:
committed by
Matthias Grob
parent
fe5a07a96d
commit
aa8a9e3a06
@@ -196,12 +196,11 @@ int GZBridge::init()
|
|||||||
return PX4_ERROR;
|
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";
|
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)) {
|
if (!_node.Subscribe(laser_scan_topic, &GZBridge::laserScanCallback, this)) {
|
||||||
PX4_ERR("failed to subscribe to %s", laser_scan_topic.c_str());
|
PX4_WARN("failed to subscribe to %s", laser_scan_topic.c_str());
|
||||||
return PX4_ERROR;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
#if 0
|
#if 0
|
||||||
|
|||||||
Reference in New Issue
Block a user