Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

Check that a pose is free in a costmap

Hi everyone,

I'm trying determine if a given (random) pose is free in a costmap.

My launch file looks like this:

<launch>
  <node name="gp" pkg="global_planner" type="planner" output="screen">
  <rosparam>
  costmap:
    footprint: [[0.506, -0.32], [0.506, 0.32], [-0.454, 0.32], [-0.454, -0.32]]
    inflater_layer:
      inflation_radius: 0.7
    plugins:
      - {name: 'static_layer', type: 'costmap_2d::StaticLayer'}
      - {name: inflater_layer, type: "costmap_2d::InflationLayer"}
  </rosparam>
  </node>
  <node name="static_tf" pkg="tf" type="static_transform_publisher" args="0 0 0 0 0 0 /map /base_link 100"/>
  <node name="map_srv" pkg="map_server" type="map_server" args="$(find multirobot_sim)/maps/map_obstacles.yml"/>
  <node name="get_rnd_pose_srv" pkg="multirobot_sim" type="get_random_pose_server.py"/>
  <node name="multirob_sim_node" pkg="multirobot_sim" type="multirobot_sim_node.py" output="screen"/>
  <node name="rviz_" pkg="rviz" type="rviz" args="-d $(find multirobot_sim)/rviz/config_multirobot.rviz"/>
</launch>

I tried to use /gp/make_plan with the same pose for start and goal. But sometimes, a part of the footprint is stuck in an obstacle:

image description

I don't know if I made an error with the parameters or if using the planner for that purpose is simply not possible.

Did I miss something or do have a better idea?

Check that a pose is free in a costmap

Hi everyone,

I'm trying determine if a given (random) pose is free in a costmap.

My launch file looks like this:

<launch>
  <node name="gp" pkg="global_planner" type="planner" output="screen">
  <rosparam>
  costmap:
    footprint: [[0.506, -0.32], [0.506, 0.32], [-0.454, 0.32], [-0.454, -0.32]]
    inflater_layer:
      inflation_radius: 0.7
    plugins:
      - {name: 'static_layer', type: 'costmap_2d::StaticLayer'}
      - {name: inflater_layer, type: "costmap_2d::InflationLayer"}
  </rosparam>
  </node>
  <node name="static_tf" pkg="tf" type="static_transform_publisher" args="0 0 0 0 0 0 /map /base_link 100"/>
  <node name="map_srv" pkg="map_server" type="map_server" args="$(find multirobot_sim)/maps/map_obstacles.yml"/>
  <node name="get_rnd_pose_srv" pkg="multirobot_sim" type="get_random_pose_server.py"/>
  <node name="multirob_sim_node" pkg="multirobot_sim" type="multirobot_sim_node.py" output="screen"/>
  <node name="rviz_" pkg="rviz" type="rviz" args="-d $(find multirobot_sim)/rviz/config_multirobot.rviz"/>
</launch>

I tried to use /gp/make_plan with the same pose for start and goal. But sometimes, a part of the footprint is stuck in an obstacle:

image description

I don't know if I made an error with the parameters or if using the planner for that purpose is simply not possible.

Did I miss something or do have a better idea?

Check that a pose is free in a costmap

Hi everyone,

I'm trying determine if a given (random) pose is free in a costmap.

My launch file looks like this:

<launch>
  <node name="gp" pkg="global_planner" type="planner" output="screen">
  <rosparam>
  costmap:
    footprint: [[0.506, -0.32], [0.506, 0.32], [-0.454, 0.32], [-0.454, -0.32]]
    inflater_layer:
      inflation_radius: 0.7
    plugins:
      - {name: 'static_layer', type: 'costmap_2d::StaticLayer'}
      - {name: inflater_layer, type: "costmap_2d::InflationLayer"}
  </rosparam>
  </node>
  <node name="static_tf" pkg="tf" type="static_transform_publisher" args="0 0 0 0 0 0 /map /base_link 100"/>
  <node name="map_srv" pkg="map_server" type="map_server" args="$(find multirobot_sim)/maps/map_obstacles.yml"/>
  <node name="rviz_" pkg="rviz" type="rviz" args="-d $(find multirobot_sim)/rviz/config_multirobot.rviz"/>
</launch>

I tried to use /gp/make_plan with the same pose for start and goal. But sometimes, a part of the footprint is stuck in an obstacle:

image description

I don't know if I made an error with the parameters or if using the planner for that purpose is simply not possible. possible (for the inflation radius, I just put something slightly superior to the inscribed radius).

Did I miss something or do have a better idea?