Hi there. I am trying to mapping our small water pool in ROS by point cloud data published by Ping 360, but I get some trouble.
First, I download the code from ping360_sonar/src/ping360_sonar at develop · CentraleNantesRobotics/ping360_sonar · GitHub, and run it in ros as a driver for Ping360. It works well and I can get the data including angle and distance from topic in every frame.
Then I just transform the angle and distance data to point cloud data in ROS program, which will be published in rviz, and we can see the result below.
It preforms good but far away from real world. As comparison, I provide the real pool image and point cloud result scanning by lidar.
I thought the difference was caused by the inaccuracy of the sonar, but soon I notice it achieves a really good result in ping viewer, which shows sonar can mapping the edge of pool specificlly.
Therefore, I realized that the difference may be caused by incorrect processing on the point cloud data.
So I wonder:
- How to calculated the point cloud position from the distance and angle data published by sonar. You can see my code below.
- The max angle of Ping360 is 400 or 360? I set the max angle is 360 but the default setting is 400, it may influence the final point cloud position.
- Where is the start angle (0 degree) in Ping360, does it begin at 0 degree everytime I start it?
Also, I have provided the code, please see if there are any errors. Thank you for your patient answers!
Launch file to set the max angle and other parameters:
Sonar mapping program to publish point cloud data:
Topic from Ping360:














