Sonar usually isnt used with amcl. amcl is made for 360° 2d laserscans and a map. For this approach sonar has much to little datapoints and sonar is noisy. In the navigation stack its just used for move_base to detect obstacles in the local_costmap. I have seen the obstacle layer given to global_costmap as well though, but I dont see a good reason for this, and it still only relates to move_base. amcl doesnt see the costmaps but only the mapservers /map (might be updateable though) and "compares" to /laserscan.
You should see obstacles in the local_costmap visualization in rviz, thats where the interpreted sonar data is published.
↧