High Latency in RealSense ROS1 Node with D435 on Jetson Xavier NX at 15 FPS
We are testing Intel RealSense D435 depth streaming on a Jetson Xavier NX using the ROS1 dcam node and are observing unexpectedly high end-to-end latency, even though the camera is only running at 15 FPS and there is only a single depth camera connected to the system (no additional USB peripherals or cameras).
We wanted to ask:
Is this level of latency expected when using RealSense alignment?
Are there recommended settings or launch parameters to reduce latency in the RealSense ROS1 driver / dcam node?
Are there known bottlenecks on Jetson Xavier NX for frame alignment or image transport?
System Details
Platform: Jetson Xavier NX
ROS version: ROS1
Camera FPS: 15 FPS
Single RealSense depth camera connected
No additional peripherals attached
RealSense alignment enabled
Latency Measurement Method
Latency is measured on the subscriber side as:
latency = ros::Time::now() - msg->header.stamp;
The subscriber is intentionally very simple:
Queue size = 1
No additional processing
Single subscriber node
So the measured latency should primarily reflect:
Camera capture + driver processing
Alignment processing
ROS publish/transport overhead
Scheduling delays
Observed Latencies
For aligned depth at 1280×720 resolution, we observe:
RX rate around 14.74 Hz
Average latency around 102 ms
P95 latency around 107 ms
Maximum latency around 115 ms
For aligned depth at 1920×1080 resolution, we observe:
RX rate around 13.45 Hz
Average latency around 122 ms
P95 latency around 139 ms
Maximum latency around 178 ms
For raw depth with RealSense alignment enabled at 1280×720:
RX rate around 14.92 Hz
Average latency around 128 ms
P95 latency around 141 ms
Maximum latency around 187 ms
For raw depth with RealSense alignment enabled at 1920×1080:
RX rate around 14.04 Hz
Average latency around 139 ms
P95 latency around 158 ms
Maximum latency around 190 ms
For color streams at 1280×720:
Compressed transport gives around 131 ms average latency
Raw transport gives around 121 ms average latency
For color streams at 1920×1080:
Compressed transport gives around 183 ms average latency
Raw transport gives around 193 ms average latency
We also occasionally observe spikes up to 466 ms
The main concern is that even at only 15 FPS with a single camera, the latency remains consistently around:
~100–140 ms for aligned depth
~120–190 ms for color streams
This seems higher than expected for a single-camera setup on Xavier NX.
-
Hi JIshnu S Alignment is a processing-intensive operation and so it is recommended that Nvidia Jetson users enable the librealsense SDK's CUDA support to offload alignment processing from the Jetson's CPU onto its Nvidia graphics GPU. Doing so can greatly reduce the percentage of the processing burden on the CPU.
When building librealsense from source code with CMake, CUDA support can be enabled by adding the flag -DBUILD_WITH_CUDA=ON to the CMake build instruction. Once the SDK's CUDA support is enabled, it will also be automatically applied to the ROS wrapper.
You can also potentially improve FPS when both depth and color are enabled by setting the ROS option auto_exposure_priority to true. For example:
roslaunch realsense2_camera rs_camera.launch auto_exposure_priority:=false
-
MartyX Grover , we tried -DBUILD_WITH_CUDA=ON but dont we any difference in gpu usage
-
In the ROS1 wrapper, some Jetson users experienced problems with alignment when using the rs_camera.launch launch file but got better results when using the rs_rgbd.launch file. To use the RGBD launch file, the following procedure should be used.
1. Support for an RGBD launch of the wrapper must be first installed manually using one of the instructions below, depending on which ROS1 branch you are using.
Kinetic
sudo apt-get install ros-kinetic-rgbd-launchMelodic
sudo apt-get install ros-melodic-rgbd-launchNoetic
sudo apt-get install ros-noetic-rgbd-launch2. Once RGBD support has been installed, use the rs_rgbd.launch launch file instead of the rs_camera.launch one. You do not need to enable alignment when using the rs_rgbd.launch file as it is already set to true by default.
roslaunch realsense2_camera rs_rgbd.launch
-
Hi JIshnu S Do you require further assistance with this case, please? Thanks!
Please sign in to leave a comment.
Comments
4 comments