refactor(obstacle_layer): drop the DepthCameraData startup guard

ObstacleLayer and VoxelLayer no longer carry any depth code, so the check
that rejected a DepthCameraData source or frustum_clearing_enabled goes too.
A DepthCameraData source still fails at startup through the generic
data_type check; frustum_clearing_enabled is now an unknown key.

The README and the LayerType comment now say the gateway feeds
DepthCameraObstacleLayer PointCloud2 only.
This commit is contained in:
2026-10-21 14:10:55 +07:00
parent 64974d48b7
commit 3b89add5ee
3 changed files with 8 additions and 20 deletions

View File

@@ -175,16 +175,6 @@ bool ObstacleLayer::getParams(const std::string& config_file_name, robot::NodeHa
if (priv_nh.hasParam("raytrace_range"))
priv_nh.getParam("raytrace_range", raytrace_range);
// Depth images are handled by DepthCameraObstacleLayer; the frustum clearing that used to
// live here was removed. Fail at startup instead of silently dropping a camera.
if (data_type == "DepthCameraData" ||
loadParam(layer[source], "frustum_clearing_enabled", false))
{
robot::log_error("source %s: DepthCameraData / frustum_clearing_enabled are no longer supported by "
"ObstacleLayer/VoxelLayer, use a DepthCameraObstacleLayer plugin\n", source.c_str());
throw std::invalid_argument("source " + source + ": depth frustum clearing was removed from "
"ObstacleLayer/VoxelLayer, use DepthCameraObstacleLayer");
}
if (!(data_type == "PointCloud2" || data_type == "PointCloud" || data_type == "LaserScan"))
{
robot::log_error("Only topics that use point clouds or laser scans are currently supported\n");
@@ -236,7 +226,7 @@ void ObstacleLayer::handleImpl(const void* data,
if (!enabled_ || stop_receiving_data_)
return;
// DepthCameraData and other types are for other layers sharing this gateway; ignored here.
// Samples that match no configured source (type and topic) are ignored.
if (observation_buffers_.empty() || callback_infos_.empty())
return;