feat(perception): depth-based obstacle size estimator (Issue #348) #351
Loading…
x
Reference in New Issue
Block a user
No description provided.
Delete Branch "sl-perception/issue-348-obstacle-size"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Summary
Fuses 2-D LIDAR clusters with the D435i depth image to estimate full 3-D obstacle width and height in metres.
Algorithm
_lidar_clustering)z_tolof sampled depth, back-project row extent viafyNew files
saltybot_scene_msgs/msg/ObstacleSize.msg—obstacle_id,centroid_x/y,depth_z,width_m,height_m,pixel_u/v,lidar_range,confidencesaltybot_scene_msgs/msg/ObstacleSizeArray.msgsaltybot_bringup/_obstacle_size.py— pure Python, no ROS2 depsCameraParams— pinhole intrinsics + LIDAR→camera extrinsicslidar_to_camera()— LIDAR (+X fwd, +Y left) → camera (+X right, +Y down, +Z fwd)project_to_pixel()— pinhole projection + image bounds checksample_depth_median()— uint16 depth window → median metresestimate_height()— vertical strip back-projectionestimate_cluster_size()— full pipelinesaltybot_bringup/obstacle_size_node.py— ROS2 node/scan,/camera/depth/image_rect_raw,/camera/depth/camera_info/saltybot/obstacle_sizesCameraInfoon first arrivalModified files
saltybot_scene_msgs/CMakeLists.txt— register new msgssaltybot_bringup/setup.py— addobstacle_sizeconsole scriptTest plan
CameraParamsdefaults and custom constructionlidar_to_camera: forward axis, lateral→x, extrinsic offset, originproject_to_pixel: principal point, negative/zero Z, off-axis, out-of-bounds, exact valuesample_depth_median: all-zero, uniform, scale, edge clip, sparse, mixed medianestimate_height: blank image, zero z_ref, known span, single row, depth outside toleranceestimate_cluster_size: returns NamedTuple, width from LIDAR, centroid, range, blank depth, obstacle patch, behind-camera, height >0, obstacle_id, confidence boundsCloses #348
🤖 Generated with Claude Code
Projects LIDAR clusters into the D435i depth image to estimate 3-D obstacle width and height in metres. - saltybot_scene_msgs/msg/ObstacleSize.msg — new message - saltybot_scene_msgs/msg/ObstacleSizeArray.msg — array wrapper - saltybot_scene_msgs/CMakeLists.txt — register new msgs - saltybot_bringup/_obstacle_size.py — pure-Python helper: CameraParams (intrinsics + LIDAR→camera extrinsics) ObstacleSizeEstimate (NamedTuple) lidar_to_camera() LIDAR frame → camera frame transform project_to_pixel() pinhole projection + bounds check sample_depth_median() uint16 depth image window → median metres estimate_height() vertical strip scan for row extent → height_m estimate_cluster_size() full pipeline: cluster → size estimate - saltybot_bringup/obstacle_size_node.py — ROS2 node sub: /scan, /camera/depth/image_rect_raw, /camera/depth/camera_info pub: /saltybot/obstacle_sizes (ObstacleSizeArray) width from LIDAR bbox; height from depth strip back-projection; graceful fallback (LIDAR-only) when depth image unavailable; intrinsics latched from CameraInfo on first arrival - test/test_obstacle_size.py — 33 tests, 33 passing - setup.py — add obstacle_size entry Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>