0
$\begingroup$

Rosanswers logo

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!


Originally posted by Fabio Signorini on ROS Answers with karma: 1 on 2012-10-09

Post score: 0

$\endgroup$

1 Answer 1

0
$\begingroup$

Rosanswers logo

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.


Originally posted by KruseT with karma: 7848 on 2012-10-10

This answer was ACCEPTED on the original site

Post score: 3

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.