Jetson Nano 2GB Developer Kit: how to use video-viewer with Docker image ros:humble-pytorch-l4t-r35.3.1?

I have a Jetson Nano 2GB Developer Kit and following a tutorial on HELLO AI WORLD NVIDIA JETSON. In “DNN Inference Nodes for ROS/ROS2” topic, when i execute the “ros2 launch ros_deep_learning video_viewer.ros2.launch input:=/dev/video0 output:=webrtc://@:8554/my_output” command, i received the CUDA error.

The webcam is function normally locally and streaming to browser. Tested with video-viewer outside of container.

JetPack version: 4.6-b197
Webcam: Logitech, Inc. Webcam C200

The error is below.


[video_source-1] [gstreamer] gstBufferManager – recieved first frame, codec=raw format=yuyv width=640 height=480 size=614400
[video_source-1] [cuda] cudaHostAlloc(cpuPtr, size, 0x02)
[video_source-1] [cuda] initialization error (error 3) (hex 0x03)
[video_source-1] [cuda] /usr/local/include/jetson-utils/cudaMappedMemory.h:51
[video_source-1] [cuda] RingBuffer – failed to allocate zero-copy buffer of 614400 bytes
[video_source-1] [gstreamer] gstBufferManager – failed to allocate 4 image buffers (614400 bytes each)
[video_source-1] [gstreamer] gstCamera – failed to handle incoming buffer
[video_source-1] [gstreamer] gstBufferManager recieve caps: video/x-raw, format=(string)YUY2, width=(int)640, height=(int)480, pixel-aspect-ratio=(fraction)1/1, framerate=(fraction)30/1, colorimetry=(string)2:4:5:1, interlace-mode=(string)progressive
[video_source-1] [gstreamer] gstBufferManager – recieved first frame, codec=raw format=yuyv width=640 height=480 size=614400
[video_source-1] [cuda] cudaHostAlloc(cpuPtr, size, 0x02)
[video_source-1] [cuda] initialization error (error 3) (hex 0x03)
[video_source-1] [cuda] /usr/local/include/jetson-utils/cudaMappedMemory.h:51
[video_source-1] [cuda] RingBuffer – failed to allocate zero-copy buffer of 614400 bytes
[video_source-1] [gstreamer] gstBufferManager – failed to allocate 4 image buffers (614400 bytes each)
[video_source-1] [gstreamer] gstCamera – failed to handle incoming buffer
[video_source-1] [gstreamer] gstBufferManager recieve caps: video/x-raw, format=(string)YUY2, width=(int)640, height=(int)480, pixel-aspect-ratio=(fraction)1/1, framerate=(fraction)30/1, colorimetry=(string)2:4:5:1, interlace-mode=(string)progressive
[video_source-1] [gstreamer] gstBufferManager – recieved first frame, codec=raw format=yuyv width=640 height=480 size=614400

Where did i got wrong?

Thank You

Hi,
r35.3.1 is Jetpack 5.1.1 and it may not work properly on Jetpack 4.6. Would suggest use old version.

Based on your information, I tried use the 32.7.1 version on dustynv/jetson-inference Tags | Docker Hub . You’re right, now i can use the video-viewer.

Thank you.