Ask Your Question
1

How to navigate to unknown space in costmap?

asked 2013-06-19 20:48:05 -0600

barrybear gravatar image

updated 2014-01-28 17:16:59 -0600

ngrennan gravatar image

Hello all,

I've followed the tutorial here http://www.ros.org/wiki/navigation/Tutorials/RobotSetup and also checked the website for similar questions but I am still quite confused and unable to produce the result I need.

I'm hooking up GMapping to the Costmap by setting static_map: true for global_costmap_params.yaml and static_map: falase for local_cost_map_params. However I wish to allow the robot, Pionneer3-AT to auto navigate itself in that environment. I thought of pointing the 2D Nav Goal to the unknown space from local_costmap but I've received errors and there's no reaction from the robot whatsoever.

Error from Costmap launch

[ERROR] [1371710574.377069274]: Client [/rostopic_25335_1371710566077] wants topic /move_base/local_costmap/unknown_space to have datatype/md5sum [geometry_msgs/PoseStamped/d3812c3cbc69362b77dc0b19b345f8f5], but our version has [nav_msgs/GridCells/b9e4f5df6d28e272ebde00a3994830f5]. Dropping connection.

Error from RVIZ

[ERROR] [1371710524.998325539]: md5sum mismatch making local subscription to topic /move_base/local_costmap/unknown_space. [ERROR] [1371710524.998429812]: Subscriber expects type nav_msgs/GridCells, md5sum b9e4f5df6d28e272ebde00a3994830f5 [ERROR] [1371710524.998484870]: Publisher provides type geometry_msgs/PoseStamped, md5sum d3812c3cbc69362b77dc0b19b345f8f5

rostopic echo /move_base/local_costmap/unknown_space would also most of the time not return anything.

I also applied unknown_cost_value: 255 and track_unknown_space: true to the costmap_common_params

It'll be great to get some help to achieve autonavigation in an unknown environment.

** EDIT 1 The errors were eliminated by setting static_map: false for global_costmap. However, there doesn't seem to be any path planning occuring. No errors were found in rxgraph and roswtf too.

** EDIT 2 The global_costmap_params.yaml has settings of static_map: false and rolling_window:true.

I've created a simple publisher and subscriber to subscribe to nav_msgs/GridCells on topic move_base/local_costmap/unknown_space and publish geometry_msgs/PoseStamped on topic /move_base_simple/goal. Since there are a bunch of coordinates of unknown space, a random coordinate is chosen.

The basic ROS tutorial for writing a subscriber/publisher should be referred to as an example.

edit retag flag offensive close merge delete

2 Answers

Sort by ยป oldest newest most voted
2

answered 2013-06-26 07:48:56 -0600

David Lu gravatar image

To say what Felix said a slightly different way...

As input, move_base takes a PoseStamped, which specifies a particular pose (location and orientation)

The published topic unknown_space is of type GridCells. This is a visualization message that specifies an area of the map.

To get the behavior you want, you'll have to write a node that takes in the GridCells message and pick a (random?) point and send that as a PoseStamped to move_base.

edit flag offensive delete link more

Comments

Ohhhhh! That makes sense! So, the random point, should I make any changes to it? Or just simply sending it to the move_base?

barrybear gravatar imagebarrybear ( 2013-06-26 07:58:48 -0600 )edit

What do you mean, any changes?

David Lu gravatar imageDavid Lu ( 2013-06-26 08:43:13 -0600 )edit

If there's any necessary to add/subtract the values depending/relative to the map

barrybear gravatar imagebarrybear ( 2013-06-26 08:49:39 -0600 )edit

That's what the Stamped portion refers to. If there's a header stamp on the Pose which specifies the correct reference frame, then move_base will translate it accordingly.

David Lu gravatar imageDavid Lu ( 2013-06-26 09:09:11 -0600 )edit

Hey guess what David! It works! Thanks for clarifying on the problem! :D Now to work on sending a goal only if the previous goal has succeeded. Thanks for your time man!

barrybear gravatar imagebarrybear ( 2013-06-26 23:42:04 -0600 )edit

sorry.... I don't get it....... @barrybear, how did you solve your problem? do you mind re-edit your question to include your current setting?????

Gazer gravatar imageGazer ( 2013-06-27 13:13:18 -0600 )edit

@Gazer editted :) hopefully the explanation's clear enough. sorry I can't post the codes here..still a work in progress!

barrybear gravatar imagebarrybear ( 2013-06-28 04:57:50 -0600 )edit
1

answered 2013-06-19 23:19:00 -0600

felix k gravatar image

To your errors:

The costmap2d wiki states unknown_space to be of type GridCells, so the rostopic node you started is wrong.

If you remove that, and don't make roscore and everything believe that this topic is a PoseStamped, which it's not, the second error will vanish.

edit flag offensive delete link more

Comments

Hey I'm a little unsure, what do I remove? the 2D Nav Goal? If I remove it, what do I replace it with?

barrybear gravatar imagebarrybear ( 2013-06-19 23:28:49 -0600 )edit

The error states a /rostopic node that's running. Don't do that/remove it from your launch file. Don't start it in publishing mode, and the safe is to start it only after a working node on that topic.

felix k gravatar imagefelix k ( 2013-06-20 03:26:16 -0600 )edit

Oh.. I only use three launch files. One to launch p2os driver. Second to launch laser driver & GMapping. The third is to launch costmap and the base_local_planner..i do them in order and usually wait for each launch to succesfully load completely. After all that I run rviz.

barrybear gravatar imagebarrybear ( 2013-06-20 03:31:46 -0600 )edit

Hey! I'm still experiencing the same error..and totally unsure of how to fix it :(

barrybear gravatar imagebarrybear ( 2013-06-20 17:20:49 -0600 )edit

Hello! I'm still facing this problem :( Even more so when I switch the 2D Nav Goal to /move_base/goal. Any help please?

barrybear gravatar imagebarrybear ( 2013-06-24 03:07:47 -0600 )edit

Please look carefully at the error message you (currently) get. E.g. if theres still some Client [/rostopic_ named, you have some rostopic node running (with wrong msg type). And check that any node you start (maybe indirectly) that accesses the topic named in the error uses the same msg type.

felix k gravatar imagefelix k ( 2013-06-25 00:15:30 -0600 )edit

Maybe running roswtf gives a hint. roswtf wiki

felix k gravatar imagefelix k ( 2013-06-25 00:19:37 -0600 )edit

Hey Felix! I'll try that tomorrow with the robot. Just to make sure again..its not necessary to run roscore right? And launching three launch files as I've stated in that order is okay?

barrybear gravatar imagebarrybear ( 2013-06-25 05:16:25 -0600 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

Stats

Asked: 2013-06-19 20:48:05 -0600

Seen: 1,272 times

Last updated: Jun 28 '13