Conversion of PointCloud2 back to VelodyneScan
Hi friends, I am new for ROS. I am using Ubuntu 14.04 and ROS Indigo (Ubuntu 16.06 + ROS Kinetic as well) for sensor Velodyne VLP16 to modulate and simulate the sensor signal.
Now, I have used the ROS package velodyne_simulator to generate the simulated ideal sensor signal, and the data format is PointCloud2
, with the ROS package pointcloud_to_laserscan the data format could be transformed as LaserScan
.
My aim is to transform the simulated data PointCloud2
to the format of raw sensor signal, namely VelodyneScan
.
I found the package velodyne_driver and velodyne_pointcloud, that could transform the VelodyneScan
to PointCloud2
.
So cloud anyone help to told me that how can I transform or convert the PointCloud2
back to VelodyneScan
? Or is there already any ROS package or codes could do this conversion?
I really appreciate your answers and best wishes for you all.
Can you please explain why it is you want to create such a setup? Are you interested in PointClouds at all, or would you rather work with simulated laserscans?
Thanks for your replay. I would like to work with simulated laserscans and compare them with the real laserscans. So I need to generate simulated laserscans with same format of the raw sensor data. But it seems like a big project and I don´t know how to implement it. Do you have any ideas? Thank you
What is the reason you want to use
velodyne_pointcloud
? There are Gazebo plugins that publishLaserScan
msgs directly, and can "scan" arbitrary objects. If you could clarify why you want to use point clouds specifically, perhaps that could help providing you with alternatives.Yes you are right, I wanted to use
PointCloud2
just because I thought there is already a package for the conversion ofVelodyneScan
toPointCloud2
, maybe it will be possible to convert it back. (but according to the answer of kmhallen below it seems unrealistic)And the reason why I´m not sure I can use
LaserScan
is that firstly I don´t know how to order the data from 16 layers(lasers) together instead of data only from one ring, secondly the angular resolution isn´t enough, and thirdly it contains no info for reflective intensity. Sorry for the questions