ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question

Intel realsense D435 Pointcloud2 without RGB

asked 2018-11-20 10:36:21 -0500

Mobile_robot gravatar image

updated 2018-11-20 10:37:30 -0500

Dear all,

I was wondering if there is a way to have access to the XYZ PointCloud2 instead of the XYZRGB PointCloud2 in the realsense2_camera ROS Package.

The idea is to use as less as possible the CPU computational power.

I have looked at this solution but it was not working properly.


edit retag flag offensive close merge delete

3 Answers

Sort by ยป oldest newest most voted

answered 2018-12-03 08:57:59 -0500

Mobile_robot gravatar image

I got the solution in the last version of the realsense2_camera.

The following configuration should be defined in order to achieve the PointCloud withou RGB:

<!-- Intel Realsense D435 driver -->
<include file="$(find realsense2_camera)/launch/rs_camera.launch">
<arg name="pointcloud_texture_stream" default="RS2_STREAM_ANY"/>  
<arg name="enable_pointcloud"         default="true"/>
<arg name="enable_color"        default="false"/>
<arg name="enable_depth"        default="true"/>
<arg name="enable_infra2"        default="false"/>
<arg name="enable_infra1"        default="false"/>
<arg name="align_depth"         default="false"/>
<arg name="depth_width"         default="640"/>
<arg name="depth_height"        default="480"/>

Unfortunately the current version does not support the RS2_STREAM_DEPTH therefore the result is not the same as I wished cause when you choose the RS2_STREAM_ANY the PointCloud will have more than twice of Points which leads to have even a higher CPU consumption with respect to the PointCloud with RGB.

edit flag offensive delete link more

answered 2018-11-20 20:08:52 -0500

yechun gravatar image

we meet similar issue in ros2_object_analytics, subscribe pointcloud xyzrgb and split to rgb and xyz. to reduce transport bandwidth.

The code for reference. ros2_object_analytics/object_analytics_node/splitter/splitter.cpp,

edit flag offensive delete link more


Thanks a lot for your answer. I will try it and if it solves my problem I will mark it as an answer.

But I really like to deactivate the XYZRGB PointCloud2 from the driver source.

Mobile_robot gravatar image Mobile_robot  ( 2018-11-21 03:48:58 -0500 )edit

answered 2018-11-20 12:44:49 -0500

My fork will do this for you here.

Also, if you're just looking for something to work, I release a snap package as well. Source is here, but available on the snap store. Install instructions for the snap store are in the readme as well.

The ros realsense drivers haven't been stable since the r200's so if you're trying to do other things, I would consider forking and working on it.

edit flag offensive delete link more


Thanks a lot for your answer. I really like to try your fork but unfortunately I did not achieve to compile it. I use Linuxu 16.04 with Kernel 4.15.0-39-generic; ROS kinetic and the librealsense2 installed on my Linux.

Mobile_robot gravatar image Mobile_robot  ( 2018-11-21 03:44:22 -0500 )edit

Question Tools



Asked: 2018-11-20 10:36:21 -0500

Seen: 3,212 times

Last updated: Dec 03 '18