For the complete documentation index, see llms.txt. This page is also available as Markdown.

Accessing the Lidars

Stretch 4 has two hemispherical lidars in the head. Each lidar yields 115,200 points per frame at 10 Hz (1,152,000 points/second).

Note on intensity values: The lidar outputs an intensity value for each XYZ coordinate. These intensity values are reliable at distances greater than 23 inches (0.6 meters). For objects closer than 23 inches, the intensity readings may be artificially low due to the Geometric Overlap Factor (GOF). Because the lidar's laser emitter and receiver are physically separated, light scattering off objects at very close range partially misses the receiver lens. As a result, even highly reflective materials (like retroreflective markers) placed within this blind spot may incorrectly register as low-intensity targets, while non-reflective materials like a shirt or a person may be registered as having high intensity.

Visualizing The Lidars With Python

To access the lidars using python, use stretch4_pyhesai_wrapper.

In your terminal, launch:

stretch_lidar_show

This will start a Rerun window with the raw, untransformed points from each lidar.

You can also view and cluster high intensity points using

Using The Lidars In Your Code With Python

Similar to the Camera API, stretch4_pyhesai_wrapper offers a Stream API that allows you to access lidar points using a python Generator:

Visualizing The Lidars With ROS2

In your terminal, start these launch files:

Terminal 1:

Terminal 2:

The latter command will start rviz2, with a live visualization of the lidars aligned using the urdf.

dual_hesai.launch.py is a launch file that lives on the robot at ~/ament_ws/src/stretch4_ros2/stretch_core/launch. A preview of the file can be found here.

Using The Lidars In Your Code With ROS2

The dual_hesai.launch.py launch file will publish two PointCloud2 topics:

  • /lidar_points_left

  • /lidar_points_right

You can subscribe to these topics in your ROS2 node to receive point cloud points.

Last updated

Was this helpful?