How to use depth_image_proc/point_cloud_xyzrgb nodelet with rosbag?
I'm sorry to post such a simple question but I found little references on the web. I have a couple of rosbags recorded with the following topics and I want to take rgb and depth topics to form point clouds in the data type of sensor_msgs/PointCloud2.
topics: /camera/depth/camera_info 49 msgs : sensor_msgs/CameraInfo
/camera/depth/image 49 msgs : sensor_msgs/Image
/camera/depth/points 49 msgs : sensor_msgs/PointCloud2
/camera/rgb/camera_info 49 msgs : sensor_msgs/CameraInfo
/camera/rgb/image_color 49 msgs : sensor_msgs/Image
/camera/rgb/points 49 msgs : sensor_msgs/PointCloud2
/cortex_marker_array 49 msgs : visualization_msgs/MarkerArray
/imu 49 msgs : sensor_msgs/Imu
/tf 49 msgs : tf/tfMessage
And from the depth_image_proc ROS Wiki documentation provided here, I understood that I need to remap the corresponding topics so to get the point clouds. I followed the instruction of nodelet - ROS Wiki and example such as this one to write my launch file. However, once I played my rosbag and then launched my nodelet launch file, the rosbag play node and the point_xyzrgb won't accept any topics whatsoever. So, what is the proper way so to make topics recorded in a rosbag to play as PointCloud2? Thanks !
What I did was the following:
$ rosbag play my_rosbag.bag
and then launched my launch file which is as follows:
<launch>
<arg name="rgb_camera_info" value="/camera/rgb/camera_info"/>
<arg name="rgb_rimg_ect" value="/camera/rgb/image_color"/> <!--Rectified color image-->
<arg name="depReg_imgrect" value="/camera/depth/image"/> <!--Rectified depth image-->
<arg name="out_cloud" value="camera/depth_registered/points"/>
<node pkg="nodelet" type="nodelet" name="standalone_nodelet" args="manager" output="screen"/>
<!-- Construct point cloud of the rgb and depth topics -->
<node pkg="nodelet" type="nodelet" name="points_xyzrgb" args="load depth_image_proc/point_cloud_xyzrgb standalone_nodelet --no-bond">
<remap from="rgb/camera_info" to="$(arg rgb_camera_info)" />
<remap from="rgb/image_rect_color" to="$(arg rgb_rimg_ect)"/>
<remap from="depth_registered/image_rect" to="$(arg depReg_imgrect)"/>
<remap from="depth_registered/points" to="$(arg out_cloud)"/>
</node>
</launch>