I'm probably doing something wrong, but I can't figure out what it is.
I am using an Intel RealSense R200 to capture a pointcloud. It publishes RGBD data on the topic /camera/depth_registered/points. Using rosbag record -l 1 /camera/depth_registered/points and rosbag play original.bag I can replay the captured pointcloud back even after the camera is disconnected. The replayed data is the same as the original data captured by the camera, as expected of course.
Now, if I convert this bag file to a pcd one using rosrun pcl_ros bag_to_pcd and replay it with rosrun pcl_ros pcd_to_pointcloud, it all still works as expected.
The issue arises when I try to generate the pcd directly from the pointcloud. If I run rosrun pcl_ros pointcloud_to_pcd input:=/camera/depth_registered/points and rosbag play original.bag, the generated pcd file will this time contain a lot of red pixels, which were not in the original data. I have also tried to reimplement pointcloud_to_pcd myself by programmatically subscribing to the topic and calling PCDWriter.writeASCII() or pcl::io::savePCDFileASCII() but I also always end up with the red pixels no matter what I try.
I am using ROS Kinetic on Ubuntu 16.04 (4.4.0-66-generic). pcl_conversions is at version 0.2.1, pcl_msgs at 0.2.0 and pcl_ros at 1.4.1.
The rosbag with the original pointcloud is available here: original.bag.zip
Here is an image of the original PCD (generated using pcl_pcd2png on the output of bag_to_pcd):
and here is the corrupted PCD (generated using pcl_pcd2png on the output of pointcloud_to_pcd):
I'm probably doing something wrong, but I can't figure out what it is.
I am using an Intel RealSense R200 to capture a pointcloud. It publishes RGBD data on the topic
/camera/depth_registered/points
. Usingrosbag record -l 1 /camera/depth_registered/points
androsbag play original.bag
I can replay the captured pointcloud back even after the camera is disconnected. The replayed data is the same as the original data captured by the camera, as expected of course.Now, if I convert this bag file to a pcd one using
rosrun pcl_ros bag_to_pcd
and replay it withrosrun pcl_ros pcd_to_pointcloud
, it all still works as expected.The issue arises when I try to generate the pcd directly from the pointcloud. If I run
rosrun pcl_ros pointcloud_to_pcd input:=/camera/depth_registered/points
androsbag play original.bag
, the generated pcd file will this time contain a lot of red pixels, which were not in the original data. I have also tried to reimplementpointcloud_to_pcd
myself by programmatically subscribing to the topic and callingPCDWriter.writeASCII()
orpcl::io::savePCDFileASCII()
but I also always end up with the red pixels no matter what I try.I am using ROS Kinetic on Ubuntu 16.04 (4.4.0-66-generic).
pcl_conversions
is at version0.2.1
,pcl_msgs
at0.2.0
andpcl_ros
at1.4.1
.The rosbag with the original pointcloud is available here: original.bag.zip
Here is an image of the original PCD (generated using
pcl_pcd2png
on the output ofbag_to_pcd
):and here is the corrupted PCD (generated using
pcl_pcd2png
on the output ofpointcloud_to_pcd
):