Skip to content

Add line sensors topics - #41

Closed
hello-ola wants to merge 12 commits into
jazzyfrom
feature/add_line_sensors
Closed

Add line sensors topics#41
hello-ola wants to merge 12 commits into
jazzyfrom
feature/add_line_sensors

Conversation

@hello-ola

Copy link
Copy Markdown
Contributor

This PR adds a ROS2 line sensor pipeline for Stretch 4. It publishes calibrated/projected PixArt line sensor points and filtered hazard outputs so downstream packages can consume either the raw projected data or cleaner obstacle/drop evidence.

How To Test

Run stretch_body_server with line_sensor_loop enbaled by adding this

server:
   subsystems:
     - line_sensor_loop

under robot key.

Launch the line sensor publisher: ros2 launch stretch_core line_sensor.launch.py

Confirm topics exist:

ros2 topic list | grep line_sensor

Expected topics:

  /line_sensor/points
  /line_sensor/obstacle_points
  /line_sensor/small_drop_points
  /line_sensor/debug/source_counts

With debug enabled:

ros2 launch stretch_core line_sensor.launch.py publish_debug:=true

Expected extra topics:

  /line_sensor/debug/raw_obstacle_points
  /line_sensor/debug/spatial_obstacle_points
  /line_sensor/debug/raw_small_drop_points
  /line_sensor/debug/spatial_small_drop_points
  /line_sensor/debug/spray_points

To Visualize:

rviz2 -d ~/ament_ws/install/stretch_core/share/stretch_core/rviz/line_sensor.rviz
What To Look For

  • /line_sensor/points should publish projected calibrated points in base_link.
  • On normal flat floor, obstacle_points and small_drop_points should be empty or low.
  • Put a small obstacle near a line sensor:
    • raw_obstacle should increase.
    • obstacle_points should appear after temporal confirmation.

@hello-robot-shehab
hello-robot-shehab self-requested a review July 10, 2026 20:43
@hello-ola
hello-ola requested a review from hello-binit July 10, 2026 21:25
@hello-binit hello-binit changed the title Feature/add line sensors Add line sensors topics Jul 20, 2026

@hello-robot-shehab hello-robot-shehab left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Works on 4024!

Image
ros2 topic list | grep line_sensoror

/line_sensor/debug/source_counts
/line_sensor/obstacle_points
/line_sensor/points
/line_sensor/small_drop_points

@hello-ola hello-ola closed this Aug 16, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants