# local costmap is always empty [closed]

I am running ROS Melodic and I have a working configuration of the navigation stack, one for a single robot and one for multiple ones. I'm gonna call them based on the launch files, respectively being single_nav.launch and multi_nav.launch .

The two configurations share all the parameters for AMCL and move_base, except the parameters of the multirobot navigation that, for example, require to specify the odom or the scan topic. These have been set in the multi_nav.launch file so that I could use the \$(arg namespace)/topic syntax, unavailable in the .yaml files.
I'm using a Turtlebot3, so the parameters that I use for move_base (costmaps, planners ecc.) are nothing but the defaults provided by ROBOTIS.

The issue I have in multi_nav is that my local costmap is always empty: in fact, it doesn't get rendered on Rviz nor running rostopic echo /move_base/local_costmap/costmap shows any value that is different from 0, although it is correctely published. Navigation goals never fail. This issue doesn't happen in single_nav and I don't know what could be the cause.

I thought the problem could be the costmap_common_params.yaml property:

observation_sources: scan
scan: {sensor_frame: base_scan, data_type: LaserScan, topic: scan, marking: true, clearing: true}


I tried to hardcode a robot namespace before scan and base_scan, but launching a single robot then logs this error:

Client [/robot_1/move_base] wants topic /robot_1/scan to have datatype/md5sum [sensor_msgs/PointCloud/d8e9c3f5afbdd8a130fd1d2763945fca], but our version has [sensor_msgs/LaserScan/90c7ef2dc6895d81024acba2ac42f369]. Dropping connection.


That never happened and it's very strange because the scan topic always accepted LaserScan messages without problems, and I think it should. I don't know if this is the cause of my errors, but I thought it was worth pointing out.

I attach two parameter dumps: one is from single_nav.launch and the other is from multi_nav.launch without the aforementioned edit.
single_nav params
multi_nav params <- the one where the error occurs

edit retag reopen merge delete