GMSL2 Camera
Hardware
AutomatePro can be ordered with 0, 2, or 4 GMSL2 (Gigabit Multimedia Serial Link) camera inputs. GMSL2 is a high-speed, low-latency camera link commonly used in automotive applications. It supports cable lengths up to 15 m and Power over Coax (PoC). AutomatePro can supply up to 12 W total to downstream GMSL2 cameras.
Recommended cameras are listed in the camera accessories. The number of populated FAKRA Z connectors depends on the ordered device configuration.

Onboard GMSL2 Specifications
| Parameter | Value |
|---|---|
| Onboard IC | MAX9296AGT |
| Standard | GMSL2 |
| Max cable length | 15 m |
| Max data rate | 4.5 Gbps |
| PoC voltage | 12 VDC |
| FAKRA type | Type Z (Water Blue) |
| Max power | 12 W total |
ROS API
Nodes: automatepro_cam1_node, automatepro_cam2_node
Publishers
Replace <camera_name> with the configured camera name, usually cam1 or cam2.
| Topic | Type | Description |
|---|---|---|
/camera/<camera_name>/image_raw | sensor_msgs/msg/Image | Raw camera frames in the configured output encoding. |
/camera/<camera_name>/camera_info | sensor_msgs/msg/CameraInfo | Camera calibration and projection information. |
/camera/<camera_name>/h264/video | foxglove_msgs/msg/CompressedVideo | H.264 compressed video frames. |
/camera/<camera_name>/h264/calib | foxglove_msgs/msg/CameraCalibration | Calibration metadata for the compressed stream. |
Debug Service
| Service | Type | Description |
|---|---|---|
/automatepro_cam<N>_node/disable_camera_inputs | std_srvs/srv/SetBool | Debug-only service for simulating camera input loss and recovery behavior. |
Verify Cameras
Run these checks from AutomatePro over SSH:
source /opt/ros/humble/setup.bash
ros2 node list | grep automatepro_cam
ros2 topic list | grep '/camera/'
For a single-frame check:
ros2 topic echo /camera/cam1/camera_info --once
If camera compression is enabled, verify the H.264 stream:
ros2 topic hz /camera/cam1/h264/video
Configuration
Cameras are exposed as V4L2 devices such as /dev/video0 and /dev/video1. The AutomatePro camera driver uses these devices through GStreamer and publishes ROS 2 image and compressed-video topics.
Driver: automatepro_camera_driver
Container: automatepro-core-driver
Runtime ROS configuration is stored in /opt/automatepro/config/ros. Packaged defaults are stored in /opt/automatepro/defconfig/ros.
Edit the camera parameter file:
sudo nano /opt/automatepro/config/ros/camera_params.yaml
Important parameter groups:
| Parameter | Default | Description |
|---|---|---|
enable | true | Enables the camera node when the launch file starts it. |
camera_name | cam1, cam2 | Name used in camera topic namespaces. |
frame_id | cam1, cam2 | Frame ID stamped on camera messages. |
resolution | [640, 512] | ROS output resolution. |
format | bgr8 | ROS image encoding. |
qos_history_depth | 1 | Queue depth for raw image publishers. |
qos_reliability | reliable | Raw image QoS reliability, either reliable or best_effort. |
qos_durability | volatile | Raw image QoS durability, either volatile or transient_local. |
camera_info.* | Identity calibration by default | Calibration values published on camera_info. |
compression.enable | true | Enables H.264 output. |
compression.encoder | auto | Selects the encoder: auto uses GPU encoding when available and falls back to CPU, gpu forces nvv4l2h264enc, and cpu forces x264enc. |
compression.bitrate | 5000 | Target bitrate in kbps. Set to 0 for automatic bitrate calculation. |
compression.bits_per_pixel | 0.1 | Used for automatic bitrate calculation when bitrate is 0. |
compression.resolution | [640, 512] | Compressed stream resolution. |
compression.framerate | 30 | Compressed stream frame rate. |
compression.qos_* | varies by camera | QoS settings for the compressed-video publishers. |
rtp.enable | false | Sends the H.264 stream over RTP/UDP when enabled. |
rtp.ip | 192.168.20.100 | RTP destination IP address. |
rtp.port | 5000 / 5001 | RTP destination UDP port. |
watchdog.timeout | 2000 | Time in milliseconds without frames before recovery starts. |
watchdog.cycle_time | 500 | Watchdog check interval in milliseconds. |
recovery.max_recovery_attempts | 1 | Pipeline recovery attempts before GMSL2 restart escalation. |
frame_validation.sample_pixels | optional | Enables additional frame validation sampling when uncommented. |
logging.level | info | Driver log level. |
logging.throttle_ms | 10000 | Throttle interval for repeated debug logs. |
publish_rate | 0.0 | Raw image publish rate limit in Hz. 0.0 publishes every frame; H.264 output rate is controlled by compression.framerate. |
sensor.device | /dev/video0, /dev/video1 | V4L2 device. Normally fixed by hardware. |
sensor.resolution | [1920, 1536] | Sensor capture resolution. Normally fixed by hardware. |
sensor.frame_rate | 30 | Sensor capture frame rate. |
Default Config
The default file includes one section for each camera node. The most commonly edited values are shown below:
automatepro_cam1_node:
ros__parameters:
enable: true
camera_name: "cam1"
frame_id: "cam1"
resolution: [640, 512]
format: "bgr8"
camera_info:
distortion_model: "plumb_bob"
d: [0.0, 0.0, 0.0, 0.0, 0.0]
k: [1.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 1.0]
r: [1.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 1.0]
p: [1.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0.0]
compression:
enable: true
encoder: "auto"
bitrate: 5000
bits_per_pixel: 0.1
keyframe: 30
resolution: [640, 512]
framerate: 30
rtp:
enable: false
ip: "192.168.20.100"
port: 5000
watchdog:
timeout: 2000
cycle_time: 500
recovery:
wait_time_gmsl2_restart: 10
max_recovery_attempts: 1
window_seconds: 60
publish_rate: 0.0
# Do not change the sensor block unless Lemvos support instructs you to.
sensor:
device: "/dev/video0"
model: "SG3S-ISX031C"
resolution: [1920, 1536]
frame_rate: 30
format: "UYVY"
automatepro_cam2_node:
ros__parameters:
enable: true
camera_name: "cam2"
frame_id: "cam2"
resolution: [640, 512]
format: "bgr8"
# Same structure as cam1. Defaults use /dev/video1 and RTP port 5001.
sensor:
device: "/dev/video1"
model: "SG3S-ISX031C"
resolution: [1920, 1536]
frame_rate: 30
format: "UYVY"
Restart automatepro-core-driver after changing the configuration. Configuration values are loaded when the driver container starts and are only applied after the service restarts.
sudo systemctl restart automatepro-core-driver
Enable or Disable Camera Drivers
To disable the AutomatePro camera driver and use a different V4L2, OpenCV, GStreamer, or custom camera stack, edit /opt/automatepro/.env:
sudo nano /opt/automatepro/.env
Set the relevant flags to 0:
ROS_DRIVER_CAM_1=0
ROS_DRIVER_CAM_2=0
Apply the change:
sudo systemctl restart automatepro-core-driver
Now you can use the cameras with any standard V4L2 driver, OpenCV, GStreamer, or another camera driver. For more details on hardware acceleration and GStreamer, see the NVIDIA Jetson multimedia documentation.
Troubleshooting
Camera Topics Are Missing
-
Check whether the camera driver is enabled:
grep ROS_DRIVER_CAM /opt/automatepro/.env -
Check the services:
systemctl status automatepro-gmsl2 automatepro-core-driver -
Inspect recent logs:
sudo journalctl -u automatepro-gmsl2 -n 100 --no-pager
sudo journalctl -u automatepro-core-driver -n 100 --no-pager
Restart Camera Hardware
If the camera hardware needs to be reinitialized:
sudo systemctl stop automatepro-core-driver
sudo systemctl restart automatepro-gmsl2
sudo systemctl start automatepro-core-driver
Automatic Recovery
The camera driver includes a watchdog. If frames stop arriving, it first attempts driver-level recovery. If hardware-level recovery is required, the driver sets recovery.reset_fail=true; the AutomatePro Driver Manager watches that parameter and triggers GMSL2 restart through the AutomatePro IPC path and systemd services.
Verify that the driver manager is running:
ros2 node list | grep automatepro_driver_manager
Automatic GMSL2 hardware recovery requires ROS_DRIVER_MANAGER=1 in /opt/automatepro/.env and the automatepro_driver_manager node must be running.
Developer Notes: launch and recovery internals
automatepro_bringup starts camera nodes with core_driver.launch.py. Camera 1 and Camera 2 are controlled by the launch arguments enable_cam1 and enable_cam2.
The Driver Manager discovers camera nodes matching /automatepro_cam.*, checks lifecycle state, reads the recovery.reset_fail parameter, and creates a restart request under /opt/automatepro/ipc/ when a camera node is unconfigured with recovery.reset_fail=true. The automatepro-gmsl2-ipc.path unit triggers automatepro-gmsl2-reactor.service, which restarts automatepro-gmsl2.service.