feat(depth): DepthCameraObstacleLayer gets its own LayerType
The plugin reported VOXEL_LAYER only because SensorGateway feeds sensor data to that type. It is its own layer, so LayerType gains DEPTH_CAMERA_LAYER (appended last: the values of the existing types do not move) and the plugin returns it. move_base2's SensorGateway delivers PointCloud2 and DepthCameraData to the new type in the matching commit; without that commit the layer receives nothing. matchSize() is overridden as well: CostmapLayer::matchSize() rebuilds the own grid with the default value, so the stored columns are re-marked under the layer mutex right away and the whole layer is queued for the next merge.
This commit is contained in:
@@ -17,8 +17,8 @@
|
||||
* reset() kept its global-mode points, B9).
|
||||
* Host adaptations: data arrives through handleImpl() and a cloud is processed in
|
||||
* updateBounds() once TF at its stamp exists (the role of the tf2_ros::MessageFilter);
|
||||
* getType() is VOXEL_LAYER, the only type SensorGateway feeds sensor data to; no ROS
|
||||
* publishers or dynamic_reconfigure; `sensor_frame_is_optical` builds the frustum in a Z-forward
|
||||
* getType() is its own DEPTH_CAMERA_LAYER, which SensorGateway feeds PointCloud2 and
|
||||
* DepthCameraData; no ROS publishers or dynamic_reconfigure; `sensor_frame_is_optical` builds the frustum in a Z-forward
|
||||
* optical frame; markings that leave the rolling window are dropped (B6).
|
||||
*********************************************************************/
|
||||
#ifndef ROBOT_COSTMAP_2D_DEPTH_CAMERA_OBSTACLE_LAYER_H_
|
||||
@@ -110,12 +110,15 @@ public:
|
||||
*/
|
||||
void clearArea(int start_x, int start_y, int end_x, int end_y, bool invert_area = false) override;
|
||||
|
||||
/// SensorGateway only delivers obstacle data to VOXEL_LAYER plugins.
|
||||
/// Own type: SensorGateway delivers PointCloud2 and DepthCameraData to it, not LaserScan.
|
||||
LayerType getType() const override
|
||||
{
|
||||
return LayerType::VOXEL_LAYER;
|
||||
return LayerType::DEPTH_CAMERA_LAYER;
|
||||
}
|
||||
|
||||
/// Resizes the own grid to the master and re-marks the stored columns right away.
|
||||
void matchSize() override;
|
||||
|
||||
/// Number of stored (column, height) points, for tests and the stats log.
|
||||
std::size_t storedPoints() const;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user