I once red that the listing of layers can mess the costmap up. You could try 1. obstacle_layer 2. sonar_layer 3. inflation_layer. You might also check rostopic for spelling errors in the topics and/or namespaces. Maybe costmap is looking for a /sonar in his own namespace or something like that (/local_costmap/sonar?). And of course the sonar might be timing out, ultrasonics are usually working at low update frequency, rviz is more flexible. Checked the logs?
↧