Skip to main content
Version: 1.1.0

Camera

The Camera tab of the AutomatePro Configurator

The Camera tab shows the video of every GMSL2 camera, edits each camera's driver settings, runs the camera gateway and the frame sync, and calibrates the lenses. The strip at the top of the right column switches between Setup, Calibration, and Advanced. The cameras, their topics, and their parameters are described in GMSL2 Camera.

Cameras & Video​

The Cameras card lists the camera nodes, each with a light that is green while it runs. The Video card opens on All cameras, a grid of every camera; select a tile, or Selected camera, to show one camera at full size. Each picture's caption shows its size and rate.

The WebRTC | H.264 | Raw switch chooses how the picture reaches the panel; a choice is grayed out while the camera does not provide it, with the reason on hover.

PicturePathAvailable while
WebRTCThe camera gateway, over UDP: best on slow linksThe camera encodes H.264 and sends RTP, and the camera gateway has a login
H.264The H.264 topic over Foxglove's connectionThe camera encodes and publishes H.264
RawThe image_raw topic, uncompressed: high bandwidthThe camera publishes image_raw

Under the video, Component information shows the sensor, format, and encoder, and Data rates the sensor rate and the bandwidth of the raw and H.264 streams.

Setup​

The Setup sub-tab holds the selected camera's settings:

  • Raw image: publish image_raw, its resolution, and its rate.
  • Video compression: encode and publish H.264, its resolution, frame rate, bitrate, and keyframe interval, and whether to rectify the lens distortion.
  • Rotation: turn the picture by a preset or any angle.
  • RTP stream: send the H.264 stream over RTP, as the camera gateway needs, to its destination and port.

Apply restarts the camera's pipeline, which stops its video for a few seconds: change one camera at a time.

Camera Gateway​

The camera gateway, automatepro-mediamtx.service, serves the cameras over WebRTC to this panel and over RTSP to other video players, at rtsp://<ip-address>:8554/<camera_name>. The configurator server starts it only while Camera gateway on is set, and the setting needs allow_mediamtx, as in Enable Configuration Writes.

The gateway serves a camera only while its driver sends its H.264 stream over RTP to 127.0.0.1, which RTP stream sets: compression.rtp.enable: true and compression.rtp.ip: 127.0.0.1 in camera_params.yaml, described in GMSL2 Camera. RTP is off as shipped. The gateway serves the stream only to a viewer with the camera login, which Username and Password set; without a login, nobody can watch. The password stays on this computer, and saving the login on AutomatePro needs allow_login_write. The video travels unencrypted, so use an encrypted connection to AutomatePro.

After you turn the gateway on, check that it runs:

systemctl status automatepro-mediamtx

A running gateway shows active (running).

Frame Sync​

The frame sync exists only on the four-camera GMSL2 board, as described in Frame Sync on the Four-Camera Board. Turn frame sync on or Turn frame sync off saves the choice for every boot, sets it on the running board, and restarts every running camera. It needs allow_frame_sync.

Check sync compares the cameras' frame starts for 10 s and lists each camera's rate, drift, and offset. It costs about 0.2 s of CPU and does not touch the streams. While the frame sync is on, the tab checks by itself every sync check interval, 5 min by default. Each picture's caption shows its result:

LabelMeaning
ReferenceThe camera the others are compared to, the lowest port that streamed.
SyncedOn the pulse.
Not syncedOff the pulse: select Restart beside it in the table, and the check runs again once its stream is back.
Not checkedNo frames during the check, or restarted since.
Check failedThe check did not finish; the reason is on hover.

Advanced​

The Advanced sub-tab holds the camera name and its frame_id, the watchdog, the IPC output to a consumer on AutomatePro, and the camera's parameter file in an editor.

Calibration​

The Calibration view solves a camera's lens calibration in the panel, as ROS camera_calibration does, from the raw image. Choose Mono for one camera or Stereo for a pair, and Pinhole or Fisheye for the lens.

  1. Under Board, choose ChArUco or Chessboard and enter its squares and sizes. Save board image saves a printable board.
  2. Select Start and move the board in front of the camera, across the picture, near and far, and tilted, until the X, Y, Size, and Skew bars fill.
  3. Select Stop and calibrate, available from 40 views or once every bar is full.
  4. Check the result under Proposed values: its RMS error, its focal lengths, its principal point, and its distortion. Rectified shows the picture with the distortion removed.
  5. Select Accept to set the calibration on the camera at once, or to write it to the camera's file, which needs allow_persistent_apply and takes effect at the driver's next restart.

For a stereo pair, choose the Left camera and the Right camera. The panel pairs their frames by timestamp, up to 0.1 s apart, and shows the epipolar error: how far the same board corner lands from the same row in the two rectified pictures.