2
$\begingroup$

Has anyone tried to map environments using Sonars or 1D ToF sensors? Since it's very difficult to implement such an algorithm from the scratch, I'm planning to use an existing ROS packages such as GMapping. For that we need to convert the readings of our sensors to a laser scan file.

I have a differential drive robot and 8 sonar sensors mounted on top of the robot in N, NE, E, SE, S, SW, W, NW directions. Using the odometry data I have implemented a Kalman filter to estimate the position of the robot. But as the robot moves the error of the position estimation accumulates.The same applies to when I'm trying to make a map of the environment incorporating the position estimation with the Sonar data. Therefore I need a pose correction method to increase the accuracy of the map. ROS GMapping is a very good package for this, but it is built only for LIDARs

If I can convert my Sonar readings and position estimation to a LIDAR scan file it can be passed to the GMapping package directly. So I'm asking for a method to do that.

Here is what I have done so far. Buffer poses and range measurements for 50 time steps, transform measured points to the world coordinate frame, calculate the mean position for the buffered positions and calculate the distance and angles for the points(I assume this is what LIDAR gives). The goal is to use this data with a existing SLAM packages in order to create a map with less errors.

$\endgroup$
2
  • 1
    $\begingroup$ I understand what you're asking for, but I'm not familiar with the "LIDAR scan file" you're mentioning. I work with LIDAR data on a daily basis, but not in the scope of ROS, GMapping, etc. I would guess the scan file is just comprised of a look angle and a distance, but I don't know if it's expecting the scan data to be indexed to the vehicle position. Please post an example of the scan file format you're trying to target and we can help you understand how to package your data appropriately. $\endgroup$
    – Chuck
    Commented Jan 4, 2019 at 15:11
  • $\begingroup$ If the scan file format isn't a problem, then I'm not sure what your question is. The scan file should state whether the data should be in local or world coordinates - I would imagine it should be in local coordinates because a LIDAR unit only reports local measurements. If it doesn't make a distinction then it's probably local measurements. I don't know if the file is expecting an explicit scan angle or if you're supposed to provide a min/max angle and the number of measurements, or a start angle and a resolution, etc. $\endgroup$
    – Chuck
    Commented Jan 4, 2019 at 16:32

1 Answer 1

1
$\begingroup$

Assuming you mean a LaserScan ROS message. It's possible to use the geometry of your robot and laser positions to create one ray per sensor in the laser scan. This is basically going to be a manual process to do this. You can see someone else working out the math here

There's a lot of questions on this already: https://answers.ros.org/question/348155/slam-with-ultrasonic/

There's also people doing scanning ultrasonics instead of fixed arrays: http://cobecoballes-robotics.blogspot.com/2018/08/laserscan-ros-arduino.html

I'd also like to qualify that the noise model and discritization of the ultrasonic responses are very different than laser based returns and most of the SLAM algorithms will not give you good performance. There are several warnings to this effect

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.