Skip to content

sensing: add the SENSING SG10A GMSL camera plugin - #998

Draft
jiwenc-nv wants to merge 1 commit into
mainfrom
jiwenc/camera-cuda
Draft

sensing: add the SENSING SG10A GMSL camera plugin#998
jiwenc-nv wants to merge 1 commit into
mainfrom
jiwenc/camera-cuda

Conversation

@jiwenc-nv

Copy link
Copy Markdown
Collaborator

Description

New C++ plugin camera_plugin_sensing for the SENSING SG10A-AGON-G2M-A1 GMSL carrier on a Jetson AGX Orin (JetPack 6.2 / L4T R36.4.3). It captures the Astra S56C through libargus — the sensor is 10-bit Bayer, so it has to go through the ISP — and either encodes H.264 on the Jetson V4L2 M2M engine or serves frames to another process as CUDA device memory. camera_viz gains a matching type: cuda_ipc source: no encode, no host copy, ~1 ms producer-to-consumer at 1080p60. Also here: host/container setup scripts (bring-up is two-sided — kernel modules and the device-tree overlay only exist on the host, the Argus socket and build headers only matter in the container) and a new docs/source/device/sensing.rst.

Two things not to "simplify", both commented in-tree. Legacy CUDA IPC returns cudaSuccess on Tegra and only fails in the far process, so the transport uses the VMM API over SCM_RIGHTS. And GLVND picks the EGL vendor from DISPLAY; losing that probe to Mesa surfaces as EGL_NO_STREAM_KHR out of Argus, so main() clears DISPLAY before the first EGL call.

SHF3L/SHF3H modules on the same carrier are out of scope — they are ISP-processed already, and the stock type: v4l2 source reads them.

Type of change

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Documentation update

Testing

AGX Orin, JetPack 6.2 / L4T R36.4.3, SG10A carrier with one Astra S56C:

  • camera_plugin_sensing --add-stream=sensor=2,ipc=/tmp/sensing2.sock captures 1920x1080 through Argus into CUDA; camera_viz.sh run configs/cuda_ipc.yaml renders it. 60 fps sustained, ~1 ms producer to consumer.
  • H.264 recording on the V4L2 M2M encoder; output plays back with ffplay -f h264 and with nvv4l2decoder on the Jetson.
  • sensing_ipc_testsrc plus examples/camera_viz/tests/test_cuda_ipc_source.py cover the IPC protocol with no camera attached (the test pattern stamps its frame number into the pixels, so a stale or torn slot fails the assert).
  • Docs: make current-docs (sphinx-build -W --keep-going) builds clean.
  • SKIP=check-copyright-year pre-commit run --all-files passes.

Checklist

  • I have read and understood the contribution guidelines
  • I have run the linter and formatter with SKIP=check-copyright-year pre-commit run --all-files
  • I have made corresponding changes to the documentation
  • I have added tests that prove my fix/feature works (or explained why not)
  • I have signed off all my commits (git commit -s) per the DCO

camera_plugin_sensing captures the Astra S56C through libargus on an AGX Orin
and either encodes H.264 on the Jetson V4L2 M2M engine -- Jetson ships no
libnvidia-encode -- or serves frames to another process as CUDA memory, which
camera_viz consumes as `type: cuda_ipc`. The shape follows the OAK plugin:
repeatable --add-stream, raw Annex-B H.264 per sensor, per-frame metadata to
MCAP or an OpenXR schema push.

Bring-up is two-sided and neither half can do the other's job, hence
setup_host.sh for the kernel modules, the device-tree overlay and the POC/PWM
writes, and setup_container.sh for the Argus socket and build headers. The
recurring failure they exist to stop: the vendor install.sh never copies the
sensor .ko files into /lib/modules, so /dev/video* is empty after every reboot.

Two traps fail misleadingly and are called out in code and docs. Legacy CUDA
IPC returns cudaSuccess on Tegra and only breaks in the far process, so the
transport uses the VMM API over SCM_RIGHTS. And GLVND picks the EGL vendor from
DISPLAY, so losing the probe to Mesa surfaces as EGL_NO_STREAM_KHR out of
Argus; main() clears DISPLAY before the first EGL call.

1080p60 sustained, ~1 ms producer to consumer on an AGX Orin. Setup, recording
and live streaming are documented in docs/source/device/sensing.rst.

Signed-off-by: Jiwen Cai <jiwenc@nvidia.com>
@coderabbitai

coderabbitai Bot commented Aug 22, 2026

Copy link
Copy Markdown
Contributor

Important

Review skipped

Draft detected.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Enterprise

Run ID: da88f1c0-5f7b-4143-99ff-c259ab7c6e82

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review

Comment @coderabbitai help to get the list of available commands.

if self._sock is not None:
try:
self._sock.close()
except OSError:
@jiwenc-nv

Copy link
Copy Markdown
Collaborator Author

/preview-docs

@github-actions

Copy link
Copy Markdown
Contributor

✅ Preview deployed: https://NVIDIA.github.io/IsaacTeleop/preview/pr-998/

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant