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

Converting intel RealSense D415 bag file to PCD

asked 2018-08-24 11:35:15 -0600

gamesmechanic gravatar image

updated 2018-08-26 06:49:32 -0600

I'm trying to convert a bag file generated from intel RealSense D415 to PCD (or any point cloud) that I can use and manipulate on CloudCompare. I'm using the command:

rosrun pcl_ros bag_to_pcd <input_file.bag> <topic> <output_directory>

It's actually executed but when I go to the output directory it's actually empty.

I'm using the bash shell on windows 10, and ROS Kinetic Desktop-Full Install.

BTW: I've used rosbag info file.bag to know the topics available in the bag file, and the output is below:

version:      2.0
duration:     10.3s
start:        Jan 01 1970 02:00:00.00 (0.00)
end:          Jan 01 1970 02:00:10.35 (10.35)
size:         416.7 MB
messages:     2328
compression:  lz4 [376/376 chunks; 59.66%]
uncompressed: 698.1 MB @ 67.5 MB/s
compressed:   416.5 MB @ 40.2 MB/s (59.66%)
types:        diagnostic_msgs/KeyValue  [cf57fdc6617a881a88c16e768132149c]
              geometry_msgs/Transform   [ac9eff44abf714214112b05d54a3cf9b]
              realsense_msgs/StreamInfo [311d7e24eac31bb87271d041bf70ff7d]
              sensor_msgs/CameraInfo    [c9a58c1b0b154e0e6da7578cb991d214]
              sensor_msgs/Image         [060021388200f6f0f447d0fcd9c64743]
              std_msgs/Float32          [73fcbf46b49191e672908e50842a83d4]
              std_msgs/String           [992ce8a1687cec8c8bd883ec73ca41d1]
              std_msgs/UInt32           [304a39449588c7f8ce2df6e8001c5fce]
topics:       /device_0/info                                                      8 msgs    : diagnostic_msgs/KeyValue
              /device_0/sensor_0/Depth_0/image/data                137 msgs    : sensor_msgs/Image
              /device_0/sensor_0/Depth_0/image/metadata           685 msgs    : diagnostic_msgs/KeyValue
              /device_0/sensor_0/Depth_0/info                                     1 msg     : realsense_msgs/StreamInfo
              /device_0/sensor_0/Depth_0/info/camera_info                 1 msg     : sensor_msgs/CameraInfo
              /device_0/sensor_0/Depth_0/tf/0                                     1 msg     : geometry_msgs/Transform
              /device_0/sensor_0/Infrared_1/image/data                       97 msgs    : sensor_msgs/Image
              /device_0/sensor_0/Infrared_1/image/metadata                485 msgs    : diagnostic_msgs/KeyValue
              /device_0/sensor_0/Infrared_1/info                                  1 msg     : realsense_msgs/StreamInfo
              /device_0/sensor_0/Infrared_1/info/camera_info                    1 msg     : sensor_msgs/CameraInfo
              /device_0/sensor_0/Infrared_1/tf/0                                  1 msg     : geometry_msgs/Transform
              /device_0/sensor_0/info                                             1 msg     : diagnostic_msgs/KeyValue
              /device_0/sensor_0/option/Asic Temperature/description              1 msg     : std_msgs/String
              /device_0/sensor_0/option/Asic Temperature/value                    1 msg     : std_msgs/Float32
              /device_0/sensor_0/option/Depth Units/description                   1 msg     : std_msgs/String
              /device_0/sensor_0/option/Depth Units/value                         1 msg     : std_msgs/Float32
              /device_0/sensor_0/option/Emitter Enabled/description               1 msg     : std_msgs/String
              /device_0/sensor_0/option/Emitter Enabled/value                     1 msg     : std_msgs/Float32
              /device_0/sensor_0/option/Enable Auto Exposure/description          1 msg     : std_msgs/String
              /device_0/sensor_0/option/Enable Auto Exposure/value                1 msg     : std_msgs/Float32
              /device_0/sensor_0/option/Enable Auto White Balance/description     1 msg     : std_msgs/String
              /device_0/sensor_0/option/Enable Auto White Balance/value           1 msg     : std_msgs/Float32
              /device_0/sensor_0/option/Error Polling Enabled/description         1 msg     : std_msgs/String
              /device_0/sensor_0/option/Error Polling Enabled/value               1 msg     : std_msgs/Float32
              /device_0/sensor_0/option/Exposure/description                      1 msg     : std_msgs/String
              /device_0/sensor_0/option/Exposure/value                            1 msg     : std_msgs/Float32
              /device_0/sensor_0/option/Frames Queue Size/description             1 msg     : std_msgs/String
              /device_0/sensor_0/option/Frames Queue Size/value                   1 msg     : std_msgs/Float32
              /device_0/sensor_0/option/Gain/description                          1 msg     : std_msgs/String
              /device_0/sensor_0/option/Gain/value                                1 msg     : std_msgs/Float32
              /device_0/sensor_0/option/Laser Power/description                   1 msg     : std_msgs/String
              /device_0/sensor_0/option/Laser Power/value                         1 msg     : std_msgs/Float32
              /device_0/sensor_0/option/Output Trigger Enabled/description        1 msg     : std_msgs/String
              /device_0/sensor_0/option/Output Trigger Enabled/value              1 ...
(more)
edit retag flag offensive close merge delete

Comments

Can you give us some more information so we can help you. The actual rosrun command you're using and the output of rosbag info <your bag="" file="">

PeteBlackerThe3rd gravatar image PeteBlackerThe3rd  ( 2018-08-25 14:01:54 -0600 )edit

Thanks PeteBlackerThe3rd for your reply, I'm using Ubuntu 16 on windows 10, and I've edited the question to include the output of rosbag info.

gamesmechanic gravatar image gamesmechanic  ( 2018-08-26 06:47:44 -0600 )edit

1 Answer

Sort by ยป oldest newest most voted
2

answered 2018-08-26 12:21:02 -0600

The pcl_ros bag_to_pcd you're using converts all the points cloud messages in a bad file into pcd files. The problem is the bag file you're using doesn't contain any point cloud messages hence why no pcd files are being created.

The bag file does contain depth images, RBG images and infrared images as well as their associated camera_info messages. This is enough to generate the point cloud messages using the depth_image_proc nodelet though. You'll have to start this nodelet with the right topics setup and then play the bag file to generate the point cloud messages you need.

Hope this helps.

edit flag offensive delete link more

Comments

Thanks PeteBlackerThe3rd, I'll give it a try and get back with the results to help others who might have the same problem. thanks again:-)

gamesmechanic gravatar image gamesmechanic  ( 2018-08-26 14:02:56 -0600 )edit

Question Tools

2 followers

Stats

Asked: 2018-08-24 11:35:15 -0600

Seen: 1,611 times

Last updated: Aug 26 '18