Point data slope occurs during creation of PointCloud2 Topic
Hello, I am creating a Topic(PointCloud2) through driving simulation of an ego vehicle equipped with a LiDAR sensor in a virtual environment. However, as shown in the picture below, I found that the Point Data is not flat like the Source Data and has a slope.
Picture link - https://www.dropbox.com/s/jzz9s8bo45y...
I am thinking of two reasons.
1) Problem of conversion formula that converts Azimuth, Altitude, Distance values from Virtual LiDAR sensor to x,y,z
2) Sensor_msgs/PointCloud2 data type is float32, it cannot express Double type Source Data?
PointCloud2 Topic Publish process
1) Create LiDAR Data using Driving Simulator (IPG CarMaker) on Windows PC
2) LiDAR Data UDP transmission
3) Receive UDP on Linux PC
4) Azimuth, Altitude, Distance to x,y,z
x = Distance * cos(Altitude) * cos(Azimuth)
y = Distance * cos(Altitude) * sin(Azimuth)
z = Distance * sin(Altitude)
5) pcl::PointXYZI push back Point Data
6) PointCloud2 publish using pcl_conversions
Does anyone know what I missed in the process of publishing a topic or why something like this occurs?