wip: state before depth cleanup
Uncommitted work as it ran on the KIT robot until 2026-10-20: the ROC observed_volume tuning patch on top of 63707c9 and the DepthCameraObstacleLayer plugin (clone of tsengapola/costmap_depth_camera noetic, B6 window fix), its 17 unit tests and the CMake wiring. Kept as one commit so the cleanup that follows has a recoverable starting point; not meant to be pushed.
This commit is contained in:
@@ -9,6 +9,8 @@ namespace robot_costmap_2d
|
||||
{
|
||||
enum class DepthVisibility { Free, Unknown, Surface };
|
||||
enum class DepthVisibilityReason { Free, OutsideView, InvalidDepth, Surface, EmptyRegion };
|
||||
/// What one frame says about a marked voxel under the re-observe-or-clear rule, weakest first.
|
||||
enum class DepthObservation { OutOfView, NoReturn, SeenThrough, Occluded, Confirmed };
|
||||
struct DepthVisibilityResult
|
||||
{
|
||||
DepthVisibility state{DepthVisibility::Unknown};
|
||||
@@ -35,13 +37,27 @@ public:
|
||||
*/
|
||||
DepthVisibilityResult classifyPoints(const std::vector<Eigen::Vector3d>& points) const;
|
||||
|
||||
/**
|
||||
* @brief Re-observes the measured evidence points of one voxel [global frame, m].
|
||||
*
|
||||
* Per point, its projection_margin_px patch decides: a valid pixel within confirm_tolerance_m
|
||||
* of the point is Confirmed; otherwise a valid pixel in front is Occluded; otherwise one
|
||||
* behind is SeenThrough; otherwise NoReturn. A point outside the trusted depth range, the
|
||||
* usable image or the stereo band is OutOfView. The voxel takes its strongest point result.
|
||||
*/
|
||||
DepthObservation observePoints(const std::vector<Eigen::Vector3d>& points) const;
|
||||
|
||||
/// True when a global-frame point projects at least border_px inside the usable image
|
||||
/// (the clear_left/right border strips are not usable). Used to gate evidence marking.
|
||||
/// (the clear_left/right border strips and the stereo band are not usable). Used to gate
|
||||
/// evidence marking, so every marked point can be re-checked later.
|
||||
bool projectsInside(const Eigen::Vector3d& point, unsigned int border_px) const;
|
||||
|
||||
private:
|
||||
/// Raw depth at a pixel [m]; NaN for an unsupported encoding. Caller checks bounds.
|
||||
double depthAt(int u, int v) const;
|
||||
/// First usable image column for a point at depth z [m] > 0: the left border strip or the
|
||||
/// stereo no-disparity band, whichever is wider.
|
||||
int usableLeft(double z) const;
|
||||
|
||||
robot_sensor_msgs::DepthCameraData::ConstPtr data_;
|
||||
Eigen::Isometry3d camera_from_global_{Eigen::Isometry3d::Identity()};
|
||||
|
||||
Reference in New Issue
Block a user