LaserScan gives nan data to close round or sharp cornered objects
Quite new to this was toying with Turtlebot GMapping on ROS Kinetic when I encountered this error.
According to the topic description, any distance above 10 m will be referred to as nan. But while simulating, the msg.ranges[300], which refers to the front , gives nan value, especially if the object is round or has cylindrical surface.
I changed the logic, so that on such occurrence, it keeps rotating. But the RViz map gets severely distorted, as it estimates the value at infinity or very far. How do I fix that?
RViz map distortion: https://imgur.com/TXFw3qV Node: https://imgur.com/mpQvbtY
On http://wiki.ros.org/gmapping I see parameters
~maxRange
and~maxUrange
. Have you set them to reasonable values?Also, could you please clarify if this is an issue with
gmapping
or if those are the actual values that get reported by your laserscanner? If yes, which laserscanner are you using (model, simulated)?@Mike Scheutzow, I'm using the gmapping_demo provided by the turtlebot tutorial, which has a max range set to 80 m by default. But the issue is with LaserScan which gives the distance of very close round objects as nan (>10 m). Even if I'm not using the turtlebot_gazebo gmapping_demo.launch file, the LaserScan alone gives faulty results
@mgruhler, I see no issue with GMapping, the LaserScan is providing faulty nan values. As for the laserscanner sensor used by the model is "360 Laser Distance Sensor LDS-01", according to https://emanual.robotis.com/docs/en/p...
I'm confused. Are you running in simulation (gazebo) or a real robot with a real sensor?
@mgruhler , sorry for not understanding earlier. It is a simulation.
I have not run this particular simulation, but why are you surprised that a
nan
clears out the map up to 80 meters? You have told gmapping that the laser data is reliable out to that distance. Also, be aware that you can getnan
in the real world because not every surface cleanly reflects the laser beam back to the lidar.@Mike Scheutzow , I have no issues with nan clearing out the map. My issue is that the laserscan gives nan data for objects as close as 1 m from the robot, which is incorrect. This happens especially if the object is cylindrical. Maybe I failed to clarify my question. Sorry for that.
You can find the snap shot here : https://imgur.com/TXFw3qV