feat(sensor_gateway): feed DepthCameraObstacleLayer through its own LayerType
robot_costmap_2d has LayerType::DEPTH_CAMERA_LAYER for DepthCameraObstacleLayer. The gateway now pushes PointCloud2 to that type as well as to VOXEL_LAYER, in both the local and the global costmap. LaserScan, PointCloud and DepthCameraData stay VOXEL_LAYER only: the layer marks and clears from the filtered camera cloud and does not use the depth image. Needs robot_costmap_2d main 64974d4 or later (the enum value). Squashed from feature/depth-camera-layer-type (c280a0a..d3a9208).
This commit is contained in:
@@ -44,6 +44,8 @@ const char* toString(robot_costmap_2d::LayerType type)
|
||||
return "PreferredLayer";
|
||||
case robot_costmap_2d::LayerType::UNPREFERRED_LAYER:
|
||||
return "UnpreferredLayer";
|
||||
case robot_costmap_2d::LayerType::DEPTH_CAMERA_LAYER:
|
||||
return "DepthCameraObstacleLayer";
|
||||
case robot_costmap_2d::LayerType::UNKNOWN:
|
||||
break;
|
||||
}
|
||||
@@ -331,6 +333,9 @@ void SensorGateway::pushPointCloud2(const std::string& name,
|
||||
ScopedSection timer(telemetry_, section_cloud_);
|
||||
dispatchTo(local_costmap_, cloud, robot_costmap_2d::LayerType::VOXEL_LAYER, name, stats_);
|
||||
dispatchTo(global_costmap_, cloud, robot_costmap_2d::LayerType::VOXEL_LAYER, name, stats_);
|
||||
// DepthCameraObstacleLayer has its own type and marks from the camera's PointCloud2.
|
||||
dispatchTo(local_costmap_, cloud, robot_costmap_2d::LayerType::DEPTH_CAMERA_LAYER, name, stats_);
|
||||
dispatchTo(global_costmap_, cloud, robot_costmap_2d::LayerType::DEPTH_CAMERA_LAYER, name, stats_);
|
||||
}
|
||||
|
||||
void SensorGateway::pushDepthCameraData(const std::string& topic,
|
||||
|
||||
Reference in New Issue
Block a user