refactor(depth): keep DepthCameraObstacleLayer, drop the legacy depth clearing
Two depth-image clearing designs lived in this package: the frustum ray
clearing inherited from dev_cam_intel (DepthCameraData sources of
ObstacleLayer/VoxelLayer, frustum_* and column_* keys) and the observed_volume
evidence clearing (ROC) on top of it. Both are replaced on the robot by
DepthCameraObstacleLayer, a port of costmap_depth_camera that takes the
filtered PointCloud2 directly, so both are removed and the tree is rebuilt
from main (a63c084) plus the plugin.
- observation.h / observation_buffer: DepthFrustumConfig, DepthCameraObservation
and the depth buffering API are gone; buffers hold point clouds only.
- ObstacleLayer/VoxelLayer: no frustum ray casting, column clearing or depth
ray cache. A DepthCameraData source or frustum_clearing_enabled: true now
fails at startup with a message pointing to DepthCameraObstacleLayer
instead of silently dropping the camera; DepthCameraData reaching the layer
through the gateway is ignored.
- copyParentParameters no longer forwards the frustum_* / column_* keys.
- ROC files (depth_evidence_store, depth_visibility, depth_frame_pairer) and
their tests are not carried over; CloudProcessingConfig goes with them.
- PCL is needed by the plugin library only. The plugin test moves under
BUILD_COSTMAP_TESTS; BUILD_DEPTH_MARKING_TESTS is gone.
- README documents DepthCameraObstacleLayer and its known limits.
The plugin code is unchanged from the version running on the KIT robot.
This commit is contained in:
@@ -50,14 +50,6 @@
|
||||
|
||||
namespace robot_costmap_2d
|
||||
{
|
||||
// Opt-in per source: legacy callers keep their TF and cloud policy.
|
||||
struct CloudProcessingConfig
|
||||
{
|
||||
bool transform_at_stamp{false};
|
||||
bool voxel_filter_enabled{false};
|
||||
double voxel_leaf_size{0.05}; // [m], applied after height/range gates
|
||||
};
|
||||
|
||||
/**
|
||||
* @class ObservationBuffer
|
||||
* @brief Takes in point clouds from sensors, transforms them to the desired frame, and stores them
|
||||
@@ -83,12 +75,6 @@ public:
|
||||
double min_obstacle_height, double max_obstacle_height, double obstacle_range,
|
||||
double raytrace_range, tf3::BufferCore& tf3_buffer, std::string global_frame,
|
||||
std::string sensor_frame, double tf_tolerance);
|
||||
|
||||
ObservationBuffer(std::string topic_name, double observation_keep_time, double expected_update_rate,
|
||||
double min_obstacle_height, double max_obstacle_height, double obstacle_range,
|
||||
double raytrace_range, const DepthFrustumConfig& frustum_config,
|
||||
tf3::BufferCore& tf3_buffer, std::string global_frame,
|
||||
std::string sensor_frame, double tf_tolerance);
|
||||
|
||||
|
||||
/**
|
||||
@@ -112,32 +98,12 @@ public:
|
||||
*/
|
||||
void bufferCloud(const robot_sensor_msgs::PointCloud2& cloud);
|
||||
|
||||
// Configure before receiving samples. Empty valid clouds return true;
|
||||
// missing TF/malformed observations return false and do not refresh the buffer.
|
||||
void setCloudProcessingConfig(const CloudProcessingConfig& config);
|
||||
bool tryBufferCloud(const robot_sensor_msgs::PointCloud2& cloud);
|
||||
bool tryBufferCloudWithTransform(const robot_sensor_msgs::PointCloud2& cloud,
|
||||
const tf3::TransformStampedMsg& transform);
|
||||
const std::string& sensorFrame() const { return sensor_frame_; }
|
||||
|
||||
/**
|
||||
* @brief Store the newest depth frame without converting it to PointCloud2.
|
||||
*/
|
||||
void bufferDepthCamera(const robot_sensor_msgs::DepthCameraData& depth);
|
||||
|
||||
void bufferDepthCamera(robot_sensor_msgs::DepthCameraData::ConstPtr depth);
|
||||
|
||||
/**
|
||||
* @brief Pushes copies of all current observations onto the end of the vector passed in
|
||||
* @param observations The vector to be filled
|
||||
*/
|
||||
void getObservations(std::vector<Observation>& observations);
|
||||
|
||||
/**
|
||||
* @brief Append the current depth observation, if it has not expired.
|
||||
*/
|
||||
void getDepthObservations(std::vector<DepthCameraObservation>& observations);
|
||||
|
||||
/**
|
||||
* @brief Check if the observation buffer is being update at its expected rate
|
||||
* @return True if it is being updated at the expected rate, false otherwise
|
||||
@@ -171,10 +137,6 @@ private:
|
||||
*/
|
||||
void purgeStaleObservations();
|
||||
|
||||
void purgeStaleDepthObservations();
|
||||
bool tryBufferCloudImpl(const robot_sensor_msgs::PointCloud2& cloud,
|
||||
const tf3::TransformStampedMsg* prepared_transform);
|
||||
|
||||
tf3::BufferCore& tf3_buffer_;
|
||||
const robot::Duration observation_keep_time_;
|
||||
const robot::Duration expected_update_rate_;
|
||||
@@ -182,15 +144,11 @@ private:
|
||||
std::string global_frame_;
|
||||
std::string sensor_frame_;
|
||||
std::list<Observation> observation_list_;
|
||||
std::list<DepthCameraObservation> depth_observation_list_;
|
||||
// DepthCameraObservation depth_observation_;
|
||||
std::string topic_name_;
|
||||
double min_obstacle_height_, max_obstacle_height_;
|
||||
boost::recursive_mutex lock_; ///< @brief A lock for accessing data in callbacks safely
|
||||
double obstacle_range_, raytrace_range_;
|
||||
double tf_tolerance_;
|
||||
DepthFrustumConfig frustum_config_;
|
||||
CloudProcessingConfig cloud_processing_config_;
|
||||
};
|
||||
} // namespace robot_costmap_2d
|
||||
#endif // ROBOT_COSTMAP_2D_OBSERVATION_BUFFER_H_
|
||||
|
||||
Reference in New Issue
Block a user