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

How to get information from the navfn planner execution

asked 2012-10-09 06:01:29 -0500

Fabio Signorini gravatar image

updated 2014-01-28 17:13:53 -0500

ngrennan gravatar image

Hi everybody! I'm working on a A.I. project and I need to know how to obtain information from the navfn global planner during execution. In more details, what should I do in order to call the methods listed in the navfn::NavFn class reference (http://www.ros.org/doc/api/navfn/html/classnavfn_1_1NavFn.html#a991e667731691eb111cddc786e2d02d0) to retrieve run-time informations and can later work with them? The information I need is the one returned by getLastPathCost().

Any suggestion would help. Thanks!

edit retag flag offensive close merge delete

2 Answers

Sort by ยป oldest newest most voted
3

answered 2012-10-10 02:12:46 -0500

KruseT gravatar image

NavFn can be used standalone just to generate plans, or as a plugin to move_base. I assume you mean in the latter case. What I would do in your place is replace navfn_node with a custom global planner, that additionally sends all information you need to a topic.

Basically you would copy the whole navfn ROS package, then remove all c++ source file except src/navfn_node.cpp. Then add a topic publisher and change makePlanService() service to also publish on your custom topic.

Then you need to adapt filenames, the package manifest, plugin file etc. Create a launchfile for move_base (by copying the one you used so far), and declare your custom global planner as a replacement to navfn. Use this launchfile instead of the one you used so far, and move_base should use your custom global planner, and every time move_base calls the makePlan Service, you would get a message on your topic telling you what you need to know.

edit flag offensive delete link more
-1

answered 2012-10-11 05:32:04 -0500

Fabio Signorini gravatar image

Hi KruseT, thanks for your answer! you're right, my idea is to use navfn as a plugin for move_base. I'm not interested in changing it's normal behaviour, I need only to know the cost that it assigns to every path it generates for the robot to reach a goal position from a start position (not only the minimum cost path that it found at the end of each computation but the cost of every plan it generates).

Could you please give me more details about what you wrote in your second paragraph? In particular what I have to do to 'add a topic publisher and change makePlanService() service to also publish on your custom topic'? Do I need to modify existing files or create new ones?

Thanks in advance.

edit flag offensive delete link more

Comments

Please do not create answers for comments, subsequent questions or discussions. This is not a forum. Instead, please either use the comment functionality or edit your original post.

Lorenz gravatar image Lorenz  ( 2012-10-11 05:34:42 -0500 )edit

Question Tools

Stats

Asked: 2012-10-09 06:01:29 -0500

Seen: 537 times

Last updated: Oct 11 '12