I’m posting on behalf of a ROS 2 development effort targeting Jetson AGX Orin (MILBOARD-AGX), using GStreamer for real-time camera processing.
We’re building a camera_publisher node with multiple appsink branches (raw, dewarped, compressed), and we’re running into significant CPU overhead as well as pipeline configuration issues that prevent full GPU acceleration.
Our current pipline:
pipeline << "nvv4l2camerasrc device=/dev/video0 ! "
<< "nvvideoconvert ! "
<< "video/x-raw(memory:NVMM),format=RGBA,width=1920,height=1080 ! "
<< “nvdewarper config-file=” << device_rectified_path_ << " ! "
<< "nvvideoconvert ! video/x-raw(memory:NVMM),format=NV12 ! "
<< "nvvidconv ! video/x-raw,format=BGRx ! "
<< "videoconvert ! video/x-raw,format=BGR ! "
<< "tee name=t ";
// RAW branch
pipeline << "t. ! queue ! videoconvert ! video/x-raw,format=BGR ! appsink name=raw_sink emit-signals=false sync=false ";
// Dewarped branch
pipeline << "t. ! queue ! videoconvert ! video/x-raw,format=BGR ! appsink name=dewarped_sink emit-signals=false sync=false ";
// Compressed branch
pipeline << "t. ! queue ! videoconvert ! x264enc tune=zerolatency bitrate=500 speed-preset=ultrafast ! "
<< "video/x-h264,profile=baseline ! appsink name=compressed_sink emit-signals=false sync=false ";
Frames are retrieved using gst_app_sink_try_pull_sample() and published via cv_bridge.
High CPU Usage
We observe CPU usage exceeding 170%, even with NVMM and hardware encoders.
How do we profile performance on Jetson to identify what’s consuming so much CPU in our pipeline? Any recommended tools (TegraStats, nvprof, Nsight)?