Skip to main content

GMSL 2 Camera

Hardware

AutomatePro has an option of 0, 2 or 4 channel GMSL2 (Gigabit Multimedia Serial Link) camera link. GMSL2 is a robust high speed and low latency data link which was developed for automotive camera and display applications. It allows for cable lengths up to 15m and supports Power Over Coaxial (PoC). A maximum of 12W of power can be delivered through the AutomatePro to the downstream cameras. While other GMSL2 cameras can be used we recommend using those offered here. The number of FAKRA Z connectors populated will depend on the device ordered - see image below

alt text

Onboard GMSL2 Specifications

ParameterValue
Onboard ICMAX9296AGT
StandardGMSL2
Max Cable Length15m
Max Data Rate4.5Gbs
PoC Voltage12VDC
FAKRA TypeType Z (Water Blue)
Max Power (total)12W

ROS API

Node: automatepro_cam1_driver, automatepro_cam2_driver

Publishers

TopicTypeDescription
/camera/camera_name/image_rawsensor_msgs/msg/ImageContains Image frame.
/camera/camera_name/camera_infosensor_msgs/msg/CameraInfoContains camera info.
/camera/camera_name/h264/videofoxglove_msgs/msg/CompressedVideoContains h264 compressed video frame.
/camera/camera_name/h264/calibfoxglove_msgs/msg/CameraCalibrationContains camera calibration info.

Parameters

ParameterTypeValuesRuntime R/WDescription
frame_idstringcam1/cam2read-onlyThe frame sensor data messages.
camera_namestringcam1/cam2read-onlyUnique name for the camera.
resolutionint[2][640,512]read-onlyOutput resolution of the /image_raw, upto [1536, 1920]
compression.enablebooltrue / falseread-onlyEnable video compression.
compression.formatstringh264read-onlyCompression Format (Currently supports h264 only)
compression.bitrateint5000read-onlyMax bitrate in kbits per second, driver will reduce quality to keep the bitrate below the set max limit
compression.keyframeint30read-onlyNo of frames between transmitting the keyframes

Configuration

Cameras are controlled using the V4L2 API and are exposed as /dev/video0 and /dev/video1 devices. Below is a description for using the automatepro_camera_driver, but these cameras can be used with any standard drivers, which support V4L2 devices. More details are available here.

Driver: automatepro_camera_driver
Container: automatepro-core-driver

info

All the configuration related files can be found at ~/.automatepro/config/ros directory.
These files will be mounted to docker container and will be used by the ROS driver.

config file can be found here.

/automatepro/config/ros/camera_params.yaml

Default Config

automatepro_cam1_node:
ros__parameters:
camera_name: "cam1"
camera_info_url: ""
resolution: [640, 512]
format: "bgr8"
frame_id: "cam1"

compression:
enable: true
format: "h264"
bitrate: 5000 # kbps
keyframe: 30

# Do not change the following parameters
sensor:
device: "/dev/video0"
model: "SG3S-ISX031C"
resolution: [1920, 1536]
frame_rate: 30
format: "UYVY"

automatepro_cam2_node:
ros__parameters:
camera_name: "cam2"
camera_info_url: ""
resolution: [640, 512]
format: "bgr8"
frame_id: "cam2"

compression:
enable: true
format: "h264"
bitrate: 5000 # kbps
keyframe: 30

# Do not change the following parameters
sensor:
device: "/dev/video1"
model: "SG3S-ISX031C"
resolution: [1920, 1536]
frame_rate: 30
format: "UYVY"
Important

Restart the automatepro-core-driver docker container after changing the configuration.
Configurations will only be applied after the container restarts.

docker restart automatepro-core-driver

Using other drivers

To use the cameras with different drivers, you need to disable the automatepro_camera_driver. Edit the ~/.automatepro/docker-compose-core.yamlfile and set the ENABLE_CAM1 and ENABLE_CAM2 to false.
Restart the automatepro-core-driver container to apply the changes.

sudo systemctl restart automatepro-core-driver

Now, you can use the cameras with any standard V4L2 driver, OpenCV, GStreamer, or any other camera driver. For more details on hardware acceleration and GStreamer, check the NVDIA Jetson documentation.

Troubleshooting

if you are facing any issues with the camera, restart the automatepro-gmsl2.service

sudo systemctl restart automatepro-gmsl2.service

Then restart the automatepro-core-driver container to apply the changes.

sudo systemctl restart automatepro-core-driver