ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

Thank you, @fergs , @osilva , and @miura for your help. The problem was in costmap common parameter, specifically in

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

I could not work out to remap it from the launch file when it is inside the dictionary. The solution was to add n costmap_common_params.yaml files for n robots with names specific to the namespace of the robot, e.g. costmap_common_params_Bot1.yaml would contain

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

I could then call these in the launch file using:

<rosparam file="$(find deploy)/param/costmap_common_params_$(arg namespace).yaml"
command="load" ns="global_costmap" />

<rosparam file="$(find deploy)/param/costmap_common_params_$(arg namespace).yaml"
command="load" ns="local_costmap" />

Hope this can help anyone else having problems with this.