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

How to set unknown pixel as goal in move_base

asked 2011-03-16 22:05:14 -0600

zhiping gravatar image

updated 2011-03-17 21:38:30 -0600

Hi to all,

From my understanding, i believe that the move_base will ignore the unknown pixel from the map during the path finding. Is it possible to set any parameter in move_base to remove this action so that i can set unknown pixel as goal?

Preview of my map

With thanks, Zhiping

edit retag flag offensive close merge delete

Comments

What message does move_base drop when aborting?
Sabrina gravatar image Sabrina  ( 2011-03-17 22:05:54 -0600 )edit

2 Answers

Sort by » oldest newest most voted
3

answered 2011-03-17 00:33:34 -0600

Sabrina gravatar image

updated 2011-03-17 07:42:19 -0600

Hi Zhiping,

you can set the parameter allow_unknow of navfn to true. Then unknown points of the global costmap are possible goal positions (and possible points in the global plan). If you used this tutorial to set up navigation then adding the following line to move_base.launch should do the trick:

<param name="navfn/allow_unknown" value="true"/>

<node pkg="move_base" type="move_base" respawn="false" name="move_base" output="screen">
...
</node>

But make sure that the wanted goal position is within the bounds of your global costmap. If the goal is very close to an obstacle (in range of the inflated obstacle points) navfn will regard it as not reachable - at least in cturtle, may be this has changed in diamondback.

Regards, Sabrina

edit flag offensive delete link more

Comments

Thanks for your help. the move_base seem to take it the unknown as goal but it is unable to compute a path to it
zhiping gravatar image zhiping  ( 2011-03-17 04:08:37 -0600 )edit
You have to distinguish between move_base and the global planner. After setting the goal move_base will use the global planner (navfn by default) to compute a path from the robot to the goal. If global planning fails move_base will abort.
Sabrina gravatar image Sabrina  ( 2011-03-17 07:43:26 -0600 )edit
Sorry i could not upload my map image to this forum. Basically, my robot is located in a region of unknown. I have used rosparam to confirm that /navfn/allow_unknown is true. So am i correct to say that the global planner (navfn) should be able to plan a path and traverse over the unknown region?
zhiping gravatar image zhiping  ( 2011-03-17 14:38:39 -0600 )edit
Yes, if this parameter is true global planning considers unknown space as free. Do you use a static map to initialize the global costmap? Or do you generate the global map online? As move_base clears the space around the robot on start up, placing the robot in unknown space should not be a problem.
Sabrina gravatar image Sabrina  ( 2011-03-17 21:09:12 -0600 )edit
BTW you should be able to add an image of the map when you edit your question. With the "image" button you can upload an image as far as I can see. Also an rviz screen shot showing the robot's and goal position and the map could be useful.
Sabrina gravatar image Sabrina  ( 2011-03-17 21:12:45 -0600 )edit
I don't have enough karma to load file but i solve it using a hyperlink. Yes, i initialed the global costmap using a static map through a yaml file in move_base. I have also tried using the unknown_cost_value in costmap_2d by changing it from 0 -> 1 but there is not change in the path planning.
zhiping gravatar image zhiping  ( 2011-03-17 21:48:08 -0600 )edit
unknown_cost_value should be the corresponding gray value for unknown space in your map. I assume this is 127 in your case.
Sabrina gravatar image Sabrina  ( 2011-03-18 04:18:12 -0600 )edit
Thanks for the assistance. I finally solve the problem with your help. Basically, i think i don't need to set the navfn/allow_unknown because the default value is true and unknown_cost_value but i need to set the static map in the global costmap to false because i'm running on gmapping. Sorry to trouble you for so long.
zhiping gravatar image zhiping  ( 2011-03-19 03:47:19 -0600 )edit
2

answered 2011-03-19 14:50:37 -0600

zhiping gravatar image

This is a suggested solution for my problem. Basically, i think i don't need to set the navfn/allow_unknown because the default value is true and unknown_cost_value but i need to set the static map in the global costmap to false because i'm running on gmapping

edit flag offensive delete link more

Comments

I'm trying to run move_base with Gmapping as well and still have the same problem with you that robot won't go to unknown space(cannot find the path to there). Have you already solved the problem? How did you solve it?
ParNurZeal gravatar image ParNurZeal  ( 2011-12-20 22:31:33 -0600 )edit
I'm sorry. Now, I know I used wrong .yaml file and set the map to static map. That's why it did not work.
ParNurZeal gravatar image ParNurZeal  ( 2011-12-20 23:09:58 -0600 )edit
not using static map means you want use the updated map from Gmapping I think.
ParNurZeal gravatar image ParNurZeal  ( 2012-01-18 16:38:48 -0600 )edit

Hello there! Did you manage to do it? I've set my nav goal to /move_base/local_costmap/unknown_space and set the parameters as described above but there doesn't seem to be any path planning. However it works if i were to use the move_base_simple/goal and clicking on d map in rviz

barrybear gravatar image barrybear  ( 2013-06-25 20:28:14 -0600 )edit

Hello.I've set the "static map:false",but it did not work.How did you solve it?

Lin_TZ gravatar image Lin_TZ  ( 2022-08-08 05:18:00 -0600 )edit

Question Tools

4 followers

Stats

Asked: 2011-03-16 22:05:14 -0600

Seen: 2,741 times

Last updated: Mar 19 '11