NAV2-Camera (Jetson)
Jetson ARM64 USB/V4L2 camera module for the LMS visualization camera panel.
The template folder remains [lms-nav2-camera-test]nav2-camera-test_v1.0.0_ws.
Runtime
- Image:
future-nav2-camera-test:humble-jetson_orin - Package:
camera_test_pkg - Launch:
camera.launch.py - Viewer topic:
/camera_test/image_jpeg(sensor_msgs/msg/CompressedImage, sensor-data QoS) - Only selected capture devices are passed into the container, never the whole
/devdirectory. - No vehicle commands, fabricated calibration, or fixed camera mounting TF are published.
Parameters
| Parameter | Default | Meaning |
|---|---|---|
video_device |
/dev/video0 |
One V4L2 device, or /dev to discover up to eight capture endpoints |
width / height |
640 / 480 |
Capture resolution supported by the camera |
fps |
30 |
Capture frame rate |
publish_fps |
10 |
Maximum publication rate |
pixel_format |
auto |
auto, MJPEG, UYVY, or YUY2 |
jpeg_width |
640 |
Maximum preview width |
jpeg_topic |
/camera_test/image_jpeg |
Keep the default for the LMS viewer |
frame_id |
camera_test_link |
Image frame identifier |
publish_raw |
false |
Also publish /camera_test/image_raw |
raw_topic |
/camera_test/image_raw |
Raw topic for single-camera operation |
auto negotiates raw/JPEG encoding, not resolution or frame rate. Use a mode
reported by v4l2-ctl --device /dev/video0 --list-formats-ext when defaults are unsupported.
This module provides a video preview, not calibrated visual SLAM input.
Multiple Cameras
Set video_device:=/dev to inspect /dev/video* when the module starts.
Capture-capable nodes are selected using V4L2 device capabilities; metadata-only,
codec, non-character and inaccessible nodes are skipped. Device numbers are not
physical-camera counts: a device can expose multiple usable capture streams.
Discovery does not start streams on the host. Only the selected device nodes
and Jetson VI channels are passed to Docker.
Each endpoint has its own process and topics, for example
/camera_test/cameras/video0/image_jpeg and
/camera_test/cameras/video2/image_jpeg. Raw topics and frame IDs are also unique.
In automatic mode these per-device names replace jpeg_topic, raw_topic and
frame_id. Single-device operation retains the original names and overrides.
The updated LMS viewer displays only endpoints actually publishing JPEG frames,
with device labels and scrolling when needed. A failed camera does not stop
other camera processes. Restart the module after adding, removing or reconnecting
a camera so device discovery and failed capture processes are refreshed.
Update and rebuild this module on Jetson before using automatic discovery. Old ARM64 prebuilt build/install archives must be regenerated before publishing. The runtime image is unchanged. Update the LMS FE as well; the remote viewer bridge receives the bundled bridge source on visualization startup.
./build.sh
ROS_DOMAIN_ID=77 ./run.sh video_device:=/dev publish_fps:=5
All selected cameras use the same resolution, capture FPS and pixel format. Choose a mode supported by every camera, and reduce FPS/resolution if USB bandwidth, encoding CPU usage or remote network traffic becomes excessive.
LMS Installation
The environment profile supplies the runtime image artifact; the module supplies the ARM64 build/install artifact. Installing these avoids an initial source build. The LMS app needs camera-test module routing support before running this template. ROS domain and DDS settings are supplied by the LMS workspace runtime.
Manual Development
Provision the image from its published artifact first. For image maintainers only:
docker build -t future-nav2-camera-test:humble-jetson_orin docker
./build.sh
ROS_DOMAIN_ID=77 ./run.sh video_device:=/dev/video0 pixel_format:=auto
The standalone script defaults to domain 77, host networking, and
ROS_LOCALHOST_ONLY=0. LMS execution uses workspace configuration instead.
Tests in tests/test_camera.py use synthetic video and never access a camera.