Closed arslogavitabrevis closed 1 year ago
Did you move around to collect data to generate probablistic values, see errors in the terminal? There's no reason why laser scans containing any arbitrary thing would have any different outcome. There's no analysis of the content of the scans other than 0
s, Inf
s or NaN
s. Are you sure the scans are actually even getting to the package?
Hi,
I just tried it with turtlebot3 and it seem to be there also. Here is how I tested it: Modified slam_toolbox default parameter file to use scan from the topic /scan_out: scan_topic: /scan_out modified_mapper_params_online_sync.yaml.txt
Use a python script to modify the data from the scan topic and publish them in /scan_out test_lidar_all_same_range.py.txt
Run turtlebot from nav2_bringup: ros2 launch nav2_bringup tb3_simulation_launch.py headless:=False slam:=True x_pose:=-1.75 slam_params_file:=./modified_mapper_params_online_sync.yaml
I checked the /scan_out topic to see when the data become valid. ros2 topic echo /scan_out
I checked to be sure it is connected to /scan_out ros2 node info /slam_toolbox
When the data become valid, the data in the /map topic is still empty. ros2 topic echo /map
Be sure to restart the python script before restarting turtlebot.
Thanks you for following up with me on this.
Please ask on or search ROS Answers. I don’t have the cycles to debug custom scripts
Hi Steeve,
Sorry for being unclear, the python script is only there to replicate easily the condition where I encontered the issue. It's purpose is only to send some LaserScan msg with all range to range_max +1 for 10 second then pass the LaserScan message as they are produced by the Gazebo plugin after that.
If you prefer you can use another way to produce the reproduction conditions.
I did not encountered the issue on turtlebot at first. I just replicated it on turtlebot to make it easier for debuging.
If you make the laser scan messages contain things that are larger than max range away, of course no map would be generated, because all of the scan beams are invalid as being too far away to be considered in the occupancy grid.
I agree that if the laser scan message contain large range values there won't be a published map.
But, if some scan message containing larger than max range values have been received before, when the scan message goes back to containing valid data, there is still no map generated.
Required Info:
Operating System: -Ubuntu 22.04
Installation type: binaries 2.6.3-1jammy.20221207.075748
ROS Version -ROS2 humble
Laser unit:
Gazebo plugin or UAM-05-LP
Steps to reproduce issue
Send some LaserScan message to SlamToolbox with ranges values all to the same value (like if the laser scaner was in a perfect circle). The data field from the /map topic is empty. (At this point this is not really an issue because there is few chance that the scanner is place in the center of a perfect circular space.) Then send some normal LaserScan messages. The /map message stay empty untill you restart slamtoolbox.
Expected behavior
Slamtoolbox should be able to output map even if it has been exposed to invalid data previously.
Actual behavior
Slamtoolbox doesn't restart sending map when clean data is received after some invalid data were received.