-
Notifications
You must be signed in to change notification settings - Fork 1.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
CPU usage with two d435i in Jetson AGX Xavier #2722
Comments
Hi @tugbakara Using two cameras at the same time should not result in half the performance, especially on an Nvidia Jetson, as Jetsons can have multiple RealSense 400 Series cameras attached to them. If the SDK has CUDA support enabled then it can offload work from the CPU onto the Jetson's Nvidia graphics GPU for three types of processing: YUY to RGB color conversion, depth-color alignment and pointcloud generation. These are the only types of processing that benefit from offloading from the CPU to GPU. CUDA support is included automatically if the SDK is installed from the SDK's Jetson packages. It can also be added to the SDK when building it from source code by including the build flag -DBUILD_WITH_CUDA=true in the CMake build instruction. You could define a usb_port_id in the roslaunch instruction. For example: For a multiple camera launch, you can open two separate ROS terminals and have an individual roslaunch instruction for each camera, with a different usb_port_id in each roslaunch. https://github.com/IntelRealSense/realsense-ros/tree/ros1-legacy#work-with-multiple-cameras If you are using pointclouds or alignment on Jetson then you may experience better performance on Jetson if you use the launch file rs_rgbd.launch instead of rs_camera.launch. To use rs_rgbd.launch, you should first install RGBD launch support for the ROS1 branch (Kinetic, Melodic or Noetic) that you are using, as described at IntelRealSense/librealsense#10223 (comment) |
Hi @MartyG-RealSense :) I set usb_port_id instead serial-no in launch and used SDK 2.48 with 2.3.1 wrapper seperately and now realsenses look nice in CPU side, I use rs_rgbd.launch to create pointclouds and when I echo (subscribe into terminal) the topic of this launch CPU increases not so critically but my other package in ROS does not accept the data type. So I need to use filter that is voxel filter to decrease data and fit to package but it gives almost 2 times much more CPU load than realsense's pointcloud when I subscribe. I found the reason that voxel creates unordered pointcloud but realsense creates ordered that's why their array shapes are different, how can I achieve voxel type data in realsense? Here is voxel filter message type and realsense message type, respectively:
and also in the message there is another difference between the messages is dense , don't know whether affect package or not.
and here is my cpu usage when I subscribe voxel (left side of the pic) and realsense(right side of the pic) , respectively: |
The generation of a voxel pointcloud with librealsense using C++ and PCL is discussed at IntelRealSense/librealsense#6411 though this would not be helpful if you need to produce voxel data in ROS. rs_rgbd launch publishes an ordered pointcloud by default, whilst rs_camera.launch publishes an unordered pointcloud by default. Data can be downsampled to reduce depth image complexity with the post-processing Decimation filter, as described for the ROS1 wrapper at #1924 (comment) |
Is there any chance to change rs_rgbd to unordered? |
I believe that an unordered cloud is 'dense' and an ordered cloud is not dense. So you could try adding to the rs_rgbd roslaunch instruction is_dense:=true See #1563 (comment) for further information. |
Hi @tugbakara Do you require further assistance with this case, please? Thanks! |
Thanks @MartyG-RealSense |
You are very welcome, @tugbakara - thanks very much for the update. |
hi, the issue briefly is the title but I got observation like, when two cam runs in ROS wrapper at the same time, SDK runs twice behind don't know whether is correct or not? If it is correct running two cam with running SDK at once could be the solution? Firstly could you make it clear, then in this issue you mentioned about using usb_port_id instead serial no for multi cams makes more CPU friend approach. I couldn't find what to put usb_port_id two run it with two cam?
Also to reduce CPU usage I tried different ros wrappers, SDKs and firmwares based on recommendation but nothing gives proper results.
Briefly, what other suggestions can reduce CPU usage with two d435i?
Kernel:4.9.253
JetPack: 4.6
Current RealSense Versions:
SDK: 2.50
Firmware: 5.13.0.50
ROS-Wrapper: 2.3.2
The text was updated successfully, but these errors were encountered: