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

Depending on how you're using the inflation layers, you can either spawn two copies of the costmap_2d node, with different node names or in different namespaces, or you can create multiple inflation layers in the plugins parameter list.

You can change the node name in a launch file by changing the name parameter, something like this:

<node pkg="costmap_2d" type="costmap_2d_node" name="costmap_a"/>
<node pkg="costmap_2d" type="costmap_2d_node" name="costmap_b"/>

(Obviously you'll probably want to provide some parameters for these nodes, too)

Or, if you just want to load the same layer twice, in your params yaml file you can do:

plugins:
   - name: inflation_layer_a
     type: "costmap_2d::InflationLayer"
   - name: inflation_layer_b
     type: "costmap_2d::InflationLayer"

Depending on how you're using the inflation layers, you can either spawn two copies of the costmap_2d node, with different node names or in different namespaces, or you can create multiple inflation layers in the plugins parameter list.

You can change the node name in a launch file by changing the name parameter, something like this:

<node pkg="costmap_2d" type="costmap_2d_node" name="costmap_a"/>
<node pkg="costmap_2d" type="costmap_2d_node" name="costmap_b"/>

(Obviously you'll probably want to provide some parameters for these nodes, too)

Or, if you just want to load the same layer twice, in your params yaml file you can do:

plugins:
   - name: inflation_layer_a
     type: "costmap_2d::InflationLayer"
   - name: inflation_layer_b
     type: "costmap_2d::InflationLayer"

inflation_layer_a:
   inflation_radius: 0.3
   enabled: true
inflation_layer_b:
   inflation_radius: 0.6
   enabled: true