Error while loading costmap_2d [closed]

asked 2011-12-07 11:11:02 -0500

this post is marked as community wiki

This post is a wiki. Anyone with karma >75 is welcome to improve it.


I am trying to use SBPL lattice planner for a 2D path planning problem. I understand that I need to load a costmap, which reads a static map and then pass it to a base global planner plugin. I am having some problem loading the costmap.

This is what my launch file looks like,

   <master auto="start"/>

   <node name="map_node" pkg="map_server" type="map_server" args="$(find monpal_planner)/map/425lab.yaml" respawn="false" output="screen"/>

   <node pkg="monpal_planner" type="monpal_planner" respawn="false" name="monpal_node" output="screen">
      <param name="base_global_planner" value="SBPLLatticePlanner" />
      <param name="SBPLLatticePlanner/primitive_filename" value="$(find sbpl)/matlab/mprim/unicycle_noturninplace.mprim" />
      <rosparam file="$(find monpal_planner)/config/global_costmap_params.yaml" command="load" />

This is what my code snippet looks like,

int main(int argc, char **argv)
    ros::init(argc, argv, "monpal_planner");

    tf::TransformListener tf(ros::Duration(10));
    costmap_2d::Costmap2DROS* planner_costmap_ros_ = NULL;

    planner_costmap_ros_ = new costmap_2d::Costmap2DROS("global_costmap", tf);


And this is what the global_costmap_params.yaml looks like,

#Independent settings for the planner's costmap
  publish_voxel_map: true
  global_frame: map
  update_frequency: 3.0
  publish_frequency: 0.0
  static_map: true
  rolling_window: false

However when I run the launch file, it loads the map (i can see it published on /map) but I get the error message,

[ INFO] [1323305068.340346026]: Loading map from image "/opt/ros/diamondback/ros/monpal_planner/map/425lab.png"
[ INFO] [1323305068.341387986]: Read a 79 X 200 map @ 0.100 m/cell
[ INFO] [1323305068.604819694]: Subscribed to Topics: 
[ INFO] [1323305068.815323975]: Requesting the map...
[ INFO] [1323305068.832663041]: Still waiting on map...

Could you point out where I am going wrong ?

Thanks, Sagnik

edit retag flag offensive reopen merge delete

Closed for the following reason question is not relevant or outdated by tfoote
close date 2013-01-02 12:51:32


What is the error that you get?
DimitriProsser gravatar image DimitriProsser  ( 2011-12-08 01:11:23 -0500 )edit
Opps, sorry for not checking the post before publishing. I edited the original mesg with the output I get. Actually, its not an error message, but the Costmap is not able to read /map though it is being published. I would like to know where I am going wrong. Thanks.
Sagnik gravatar image Sagnik  ( 2011-12-08 03:32:38 -0500 )edit