bag file to pcd with intensity

asked 2019-08-14 14:35:25 -0500

Ish_Hamie gravatar image

updated 2019-08-17 05:16:16 -0500

gvdhoorn gravatar image

i tried converting a bagfile to pcd and i lose intensity. I used the following command:

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

but the problem that i see that the pcd doesnt include any intensity! Also, my bag doesnt have its own intensity topic and it should be part of velodyne_points!

Thank you guys for the help! Ish


Edit: hi Peter, Yes, i tried my bag file on riviz and i have differrent intensity levels! BTW, this is a sample of what i see when i try to extract XYZ and Intensity:

-2.82807 -1.4466 15.9328 5
1.72946 -1.44844 16.0425 5
2.00508 -1.44379 15.9531 5
21.9425 -2.4291 16.1014 5
-1.42274 -1.45596 16.2038 5
-1.1376 -1.46018 16.2702 5
0.594295 -1.45904 16.261 5
0.878254 -1.45543 16.2028 5
1.16948 -1.45949 16.2271 5
1.44643 -1.451 16.1035 5
-3.52649 -1.50416 16.4772 5
-3.21789 -1.49722 16.4544 5
-0.850416 -1.46422 16.3297 5
-0.563342 -1.46565 16.3542 5
-0.275618 -1.46709 16.3738 5
0.0184521 -1.46435 16.3406 5
0.305599 -1.46195 16.3063 5
-5.29426 -1.60113 17.1892 5
-4.72884 -1.61665 17.5269 5
-8.7076 -1.8025 18.3791 5
-8.31028 -1.95556 20.4501 5
14.0158 -2.25649 -40.7173 6
13.8927 -2.17166 -39.0455 6
13.1812 -1.69881 -29.6215 6
8.38311 -1.5031 -27.4282 6
12.9421 -1.54708 -26.5399 6
12.8191 -1.4799 -25.1694 6
12.6505 -1.36753 -22.8321 6
-15.0315 -1.33794 -20.7 6

the intensity coordinates (last coordinate) increment in an orderly fashion. I dont believe this is correct!

Thanks,

edit retag flag offensive close merge delete

Comments

If the intensity data exists in the bag file it will be within the PointCloud2 type topic not its own topic. Have you tried viewing the PointCloud2 topic from the bag in RVIZ to confirm it has intensity information or not?

PeteBlackerThe3rd gravatar image PeteBlackerThe3rd  ( 2019-08-15 06:57:55 -0500 )edit

If those values are incrementing in a regular pattern then I suspect they are velodyne ring numbers not intensity values. How many channels of extra information do you see in RVIZ when you view the pointclouds there? It's likely that a non-standard point format is being used that is not compatible with pcl_ros bag_to_pcd

PeteBlackerThe3rd gravatar image PeteBlackerThe3rd  ( 2019-08-15 08:57:44 -0500 )edit