feat(bringup): LIDAR Euclidean object clustering + RViz visualisation (Issue #239) #244

Merged
sl-jetson merged 1 commits from sl-perception/issue-239-lidar-clustering into main 2026-03-02 12:46:11 -05:00
Collaborator

Summary

  • Pure-Python _lidar_clustering.py: scan_to_cartesian() (ranges → Cartesian, drops inf/NaN/out-of-range) + cluster_points() (O(N) gap-based Euclidean segmentation, returns Cluster namedtuples sorted nearest-first with centroid, bbox, width, depth)
  • lidar_clustering_node.py in saltybot_bringup: subscribes /scan (BEST_EFFORT), publishes /saltybot/lidar_clusters (MarkerArray) — one semi-transparent CUBE marker + TEXT label per cluster; stale markers from shrinking cluster counts are explicitly DELETEd each cycle; 12-colour palette with auto-wrap
  • Entry point: lidar_clustering = saltybot_bringup.lidar_clustering_node:main

Test plan

  • test/test_lidar_clustering.py — 22/22 pure-Python tests pass (no ROS2 required)
  • Deploy on Jetson, open RViz, add MarkerArray display on /saltybot/lidar_clusters
  • Walk in front of RPLIDAR — confirm distinct coloured cubes appear per object
  • Verify stale markers clear when objects leave the scan

🤖 Generated with Claude Code

## Summary - Pure-Python `_lidar_clustering.py`: `scan_to_cartesian()` (ranges → Cartesian, drops inf/NaN/out-of-range) + `cluster_points()` (O(N) gap-based Euclidean segmentation, returns `Cluster` namedtuples sorted nearest-first with centroid, bbox, width, depth) - `lidar_clustering_node.py` in `saltybot_bringup`: subscribes `/scan` (BEST_EFFORT), publishes `/saltybot/lidar_clusters` (MarkerArray) — one semi-transparent CUBE marker + TEXT label per cluster; stale markers from shrinking cluster counts are explicitly DELETEd each cycle; 12-colour palette with auto-wrap - Entry point: `lidar_clustering = saltybot_bringup.lidar_clustering_node:main` ## Test plan - [x] `test/test_lidar_clustering.py` — 22/22 pure-Python tests pass (no ROS2 required) - [ ] Deploy on Jetson, open RViz, add MarkerArray display on `/saltybot/lidar_clusters` - [ ] Walk in front of RPLIDAR — confirm distinct coloured cubes appear per object - [ ] Verify stale markers clear when objects leave the scan 🤖 Generated with [Claude Code](https://claude.com/claude-code)
sl-perception added 1 commit 2026-03-02 12:21:56 -05:00
Adds gap-based Euclidean distance clustering of /scan LaserScan points.
Each cluster is published as a labelled semi-transparent CUBE + TEXT marker
in /saltybot/lidar_clusters (MarkerArray), sorted nearest-first.  Stale
markers from shrinking cluster counts are explicitly deleted each cycle.
22/22 pure-Python tests pass (no ROS2 required).

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
sl-jetson merged commit fcc492ade0 into main 2026-03-02 12:46:11 -05:00
Sign in to join this conversation.
No Reviewers
No Label
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: seb/saltylab-firmware#244
No description provided.