Stereoscopic Camera
Stereoscopic Camera – definition
A stereoscopic camera, also called a stereo camera, is a vision sensor composed of two spatially separated imaging channels that observe the same scene from slightly different viewpoints. In mobile robotics, the sensor is used to estimate depth from disparity, which is the horizontal shift of corresponding image points between the left and right images after rectification. This geometry is the basis of passive 3D perception.
For UGV platforms, a stereoscopic camera is primarily a range sensor for obstacle detection, traversability estimation, visual odometry, and 3D mapping. Unlike LiDAR, stereo does not emit light in its basic form. It relies on scene texture, calibration quality, baseline, focal length, and image matching performance. In ROS and ROS 2 systems, stereo data is typically represented as synchronized image streams plus calibration metadata, and can be converted into depth images or point clouds for downstream navigation and SLAM pipelines.
In the context of Leo Rover and Raph Rover, a stereoscopic camera is usually treated as a front-facing perception payload. It complements wheel odometry and IMU data. On Leo Rover, it is commonly used in research or education setups where compact size and moderate power draw matter. On Raph Rover, stereo can support larger-scale outdoor experiments, often together with GNSS/RTK and LiDAR, where payload capacity and compute budget are less constrained.
How a stereoscopic camera measures depth
The core principle is triangulation. Two cameras with a known baseline observe the same feature. After rectification, corresponding points should lie on the same image row. The disparity between their pixel positions is then converted into depth.
The standard pinhole approximation is:
Z = (f * B) / d
Where:
- Z – depth to the observed point
- f – focal length in pixels
- B – stereo baseline in meters
- d – disparity in pixels
This equation explains two important engineering constraints. First, depth accuracy degrades with distance because disparity becomes small. Second, a larger baseline improves far-range resolution but may reduce the overlap of both views and increase mechanical size.
In practice, the full processing chain includes camera synchronization, intrinsic and extrinsic calibration, image rectification, stereo matching, and optional filtering. Calibration quality is critical. In ROS, stereo pipelines depend on accurate sensor_msgs/CameraInfo data and a valid left-to-right transform encoded in the stereo calibration parameters.
ROS 2 data model and integration
In ROS 2, a stereoscopic camera is usually integrated as two image publishers plus calibration information. The most common message types come from sensor_msgs. Rectified images may then be processed by stereo nodes to produce disparity, depth, or point clouds.
A typical topic set looks like this:
/stereo/left/image_raw–sensor_msgs/msg/Image/stereo/right/image_raw–sensor_msgs/msg/Image/stereo/left/camera_info–sensor_msgs/msg/CameraInfo/stereo/right/camera_info–sensor_msgs/msg/CameraInfo/stereo/disparity–stereo_msgs/msg/DisparityImage/stereo/points2–sensor_msgs/msg/PointCloud2
For coordinate frames, ROS conventions are defined by REP 103 and REP 105. Optical frames usually follow camera optical axis conventions, while the robot body frame is linked through TF2. For navigation stacks, the camera frame must be connected consistently to base_link.
Example ROS 2 inspection commands:
ros2 topic list
ros2 topic hz /stereo/left/image_raw
ros2 topic echo /stereo/left/camera_info
ros2 run tf2_ros tf2_echo base_link stereo_camera_left_optical_frame
Key parameters and metrics
A stereo sensor should be evaluated with geometric and systems-level parameters. The correct choice depends on indoor lab work, outdoor field robotics, or long-range terrain observation.
| Parameter | Why it matters | Typical robotics impact |
|---|---|---|
| Baseline | Determines disparity sensitivity | Larger baseline improves far-depth resolution |
| Resolution | Affects feature density and matching | Higher resolution can improve detail but increases compute load |
| Frame rate | Controls temporal responsiveness | 15-60 Hz is common for odometry and obstacle updates |
| Global vs rolling shutter | Affects motion distortion | Global shutter is preferred on moving UGVs |
| Field of view | Sets coverage in front of the robot | Wide FoV helps near-field obstacle detection |
| Synchronization accuracy | Needed for valid disparity | Poor sync causes depth artifacts on moving platforms |
| Depth range | Defines useful operating envelope | Depends on baseline, optics, texture, and lighting |
For UGV navigation, practical metrics include point cloud density at 2-10 m, latency from exposure to point cloud publication, and robustness under low-texture terrain, shadows, dust, and direct sunlight. These factors often matter more than headline image resolution.
Supported hardware and software pipelines
On Linux and ROS 2, stereo can be integrated from industrial USB or GMSL cameras, embedded depth modules, or vendor-specific stereo devices. The software path usually includes a driver, calibration, image transport, and stereo processing. OpenCV stereo calibration and rectification are standard building blocks, while ROS image pipeline packages provide the message-level integration.
Common processing variants include:
- block matching for lower compute cost
- semi-global matching for better disparity quality
- vendor SDK depth output instead of raw stereo matching
- visual-inertial odometry when an IMU is integrated in the camera unit
When a device outputs a depth image directly, engineers should still verify whether the source is true passive stereo, active stereo with projected texture, or a hybrid implementation. This distinction affects outdoor performance and susceptibility to sunlight.
Use on Leo Rover and Raph Rover
On Leo Rover, a stereoscopic camera is usually mounted as a lightweight front sensor for local perception. Because Leo Rover uses a Raspberry Pi as the default onboard compute unit, full-resolution stereo matching may require offloading or reduced settings. Typical strategies include lower image resolution, reduced frame rate, compressed image transport, or edge processing on a companion computer.
A practical Leo Rover setup often combines:
- stereo camera for short-range 3D perception
- wheel odometry from the differential drive base
- IMU for orientation stabilization in visual odometry
- Nav2 costmaps fed from depth-derived point clouds
On Raph Rover, the same sensor can be used at higher speed, with larger compute modules and additional sensors. This is useful in outdoor inspection or research where stereo is fused with LiDAR and GNSS/RTK. The larger payload capacity supports more rigid mounts, better vibration isolation, and higher-performance GPUs for dense stereo or visual SLAM.
Example ROS 2 configuration
The exact package depends on the camera vendor, but the processing pattern is similar. The example below shows a simplified parameter block for stereo processing and point cloud generation.
stereo_processor:
ros__parameters:
approx_sync: false
queue_size: 10
prefilter_size: 9
correlation_window_size: 15
min_disparity: 0
disparity_range: 64
speckle_size: 100
speckle_range: 4
uniqueness_ratio: 10
publish_point_cloud: true
Limitations and trade-offs in field robotics
Stereo is useful, but it has failure modes that matter on UGVs. Performance degrades on low-texture surfaces such as uniform walls, polished floors, mud, snow, or vegetation with repetitive patterns. Strong sunlight can reduce image quality, and dynamic shadows can destabilize matching. Rain, dust, and lens contamination also affect depth reliability.
Compared with LiDAR, stereo usually provides denser appearance-linked information but less stable geometry at long range. Compared with monocular vision, stereo provides metric depth without scale ambiguity, but at higher calibration and compute complexity. For this reason, stereo is often used as one component of a multi-sensor stack rather than as the only perception source.
Normative references and standards
The technical interpretation of stereo integration in ROS systems should follow official ROS conventions and message specifications. The most relevant references are REP 103 for standard units and coordinate conventions, REP 105 for mobile platform frame semantics, and the ROS 2 sensor_msgs, stereo_msgs, and TF2 documentation. Camera model and calibration handling are typically aligned with OpenCV pinhole and distortion models, which are widely used by ROS camera drivers and image pipeline components.