Items with no label
3335 Discussions

use depth_image_proc/point_cloud_xyz with rosbag file

MEppl
Beginner
5,076 Views

Hey,

I'm recording the topics "/camera/depth/camera_info" and "/camera/depth/image_rect_raw" from D435 to a bag file. While playing the bag file I would like to start a node that converts the depth image to a pointcloud2 message. I think therefore I have to use "depth_image_proc/point_cloud_xyz".

This is how you do it in your launch files:

.

.

.

args="load depth_image_proc/point_cloud_xyz $(arg manager) $(arg bond)" respawn="$(arg respawn)">

But in your cases always the realsense node is running. I think that's the reason why you can use nodelets with pointers. In my case a nodelet is not working. Is this right?

How can I generate a poincloud2 message from a bag file ? Or do I have to record other topics from "realsense2_camera_manager" to simulate a running realsense node ?

Thanks for your help!

0 Kudos
1 Solution
MartyG
Honored Contributor III
3,201 Views

I'm not sure if this is what you needed, but I got results that seemed useful by searching Google for the term 'depth_image_proc example'. Here's a couple of examples from a search:

https://gist.github.com/bhaskara/2400165 Example ROS launch file that uses depth_image_proc to convert an RGB-depth image pair into a point cloud · GitHub

https://answers.ros.org/question/216748/how-to-use-depth_image_procpoint_cloud_xyzrgb-nodelet-with-rosbag/ https://answers.ros.org/question/216748/how-to-use-depth_image_procpoint_cloud_xyzrgb-nodelet-with-rosbag/

View solution in original post

0 Kudos
3 Replies
MartyG
Honored Contributor III
3,202 Views

I'm not sure if this is what you needed, but I got results that seemed useful by searching Google for the term 'depth_image_proc example'. Here's a couple of examples from a search:

https://gist.github.com/bhaskara/2400165 Example ROS launch file that uses depth_image_proc to convert an RGB-depth image pair into a point cloud · GitHub

https://answers.ros.org/question/216748/how-to-use-depth_image_procpoint_cloud_xyzrgb-nodelet-with-rosbag/ https://answers.ros.org/question/216748/how-to-use-depth_image_procpoint_cloud_xyzrgb-nodelet-with-rosbag/

0 Kudos
MEppl
Beginner
3,201 Views

I've also seen these examples, but was confused because they all use OpenNI, which is not supported by realsense.

After taking a closer look I saw that in my case I don't need the OpenNI camera drivers. It works, thanks !

0 Kudos
MartyG
Honored Contributor III
3,201 Views

I'm very glad it worked for you - thanks for letting us know!

0 Kudos
Reply