Camera#

Captures the stereo cameras, rectifies the images and estimates depth. Each topic is only published, and depth only estimated, while the topic has subscribers.

Runs in the start profiles remote (the default), companion.

Node stereo_publisher#

Captures, rectifies, encodes and publishes both cameras, and estimates depth.

Parameters#

Name

Type

Default

Description

rectify

bool

true

Publish rectified images, if the cameras are calibrated. Otherwise the image_rect and depth topics publish nothing; the raw images are always on image_raw. Applied at the next frame.

enable_depth

bool

true

Estimate and publish depth, if the images are rectified. Can be changed while running.

depth_max_rate_hz

double

10.0

Highest rate of depth estimation, which bounds its GPU usage. 0 estimates as often as the model can. Can be changed while running.

depth_min_confidence

double

0.3

Depths with a lower confidence, between 0 and 1, are published as NaN. 0 publishes all of them. Can be changed while running.

depth_max_incidence_deg

double

85.0

Depths of surfaces seen more edge-on than this angle, in (0, 90] degrees, are published as NaN, as most are flying pixels at the borders of objects. 90 keeps them. Can be changed while running.

depth_width

int

640

Width of the depth images; the images are downsampled to it before estimating depth. There must be a model for this width: 960, 768, 640, 480, 384 or 320. Only read at startup.

auto_exposure

bool

false

Adjust exposure time and gains automatically. Changing it restarts the cameras, about 11 s without images.

exposure_time_ms

double

10.0

Exposure time, if auto_exposure is false. Multiples of 10 ms avoid flicker under 50 Hz lighting, and of 8.33 ms under 60 Hz. Changing it restarts the cameras.

analog_gain

double

2.0

Analog gain, if auto_exposure is false. Changing it restarts the cameras.

digital_gain

double

4.0

Digital gain, if auto_exposure is false; the starting point of auto_digital_gain. Applied without restarting the cameras.

auto_white_balance

bool

false

Adjust the white balance automatically.

white_balance

string

fluorescent

White balance preset, if auto_white_balance is false: incandescent, fluorescent, warm-fluorescent, daylight, cloudy-daylight, twilight or shade.

auto_digital_gain

bool

true

If auto_exposure is false, adjust the digital gain so that the images’ median brightness tends to brightness_target.

brightness_target

double

110.0

Target median brightness of auto_digital_gain, in the 16-235 range.

brightness_dead_zone

double

0.3

Relative distance from the target, above black level, beyond which auto_digital_gain corrects the gain; it then corrects it until the distance is a third of this.

max_clipped_fraction

double

0.02

auto_digital_gain lowers the gain while more than this fraction of the pixels is clipped, and does not raise it while more than half of it is.

min_digital_gain

double

1.0

Lowest digital gain that auto_digital_gain sets.

max_digital_gain

double

16.0

Highest digital gain that auto_digital_gain sets.

disable_left

bool

false

Stop the left camera. Restarts the cameras.

disable_right

bool

false

Stop the right camera. Restarts the cameras.

remote_host

string

empty

Address to stream RTP video to, outside ROS, e.g. a phone’s. Empty for none. Cleared if not set again within 10 s, so set it repeatedly, e.g. every 5 s, while streaming.

left_camera_info_url

string

file:///hf1/config/left.yaml

Calibration of the left camera, in the format of the camera_calibration package. Only read at startup.

right_camera_info_url

string

file:///hf1/config/right.yaml

Calibration of the right camera. Only read at startup.

Read and set them with ros2 param, or with the node’s parameter services (/stereo_publisher/set_parameters):

ros2 param get /stereo_publisher rectify
ros2 param set /stereo_publisher rectify true