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

Revision history [back]

Hi,friend. l meet this problem, too. accidently l tried this and it worked. Firstly, l written a launch file (just contain the map_server and <rosparm> group [!!!without costmap_node])

<launch>
<node name="static_tf0" pkg="tf" type="static_transform_publisher" args="2 0 0 0 0 0 /map_static /robot0 100"/>
<node name="map_server" pkg="map_server" type="map_server" args="$(find turtle_lab)/map/testmap.yaml"/>
<rosparam file="$(find my_costmap)/launch/minimal.yaml" command="load" ns="/costmap_node/costmap" />
</launch>

Then, roslaunch the xxx.launch l created.

roslaunch my_costmap cost2d.launch

Finally, The key is that then l just continue rosrun the "costmap_node" in other terminal. the screen output the map loading, and rviz show the costmap choose.

rosrun costmap_2d costmap_2d_node

l think it's caused by the "namespace". l find may be it's hard to correctly apply the params into the costmap_node