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

Issues related to navfn and global_planner plugin

asked 2015-01-25 13:56:31 -0500

RB gravatar image

updated 2015-01-27 12:32:50 -0500

Hi, I am using ROS fuerte. I have gone through the navfn . I want a ROS plugin for my own global planner I have Visited this page.

I have following doubts:

  • I want to my own global path planner to make two/three of different plans. All these plans will require to remove the inbuilt Dijkstra's algorithm, implemented inside navfn.cpp and used inside navfn_ros.cpp. Will a single plugin serve my purpose or I have to make different plugins and make them switchable to decide the proper plan?

  • Why two makePlan() methods are used (see here)?

  • In the link ( http://www.iroboapp.org/index.php?tit... ); they have not told anything about modification about navfn.cpp. .

  • Finally, where the should I place the code specific to this plugin? Should I create a separate library containing all the files similar to navfn?


Updated based on Comment

As mentioned in the link, pluginlib is a C++ library for loading and unloading plugins from within a ROS package. Plugins are dynamically loadable classes that are loaded from a runtime library. So, in the

tutorial, a static makePlan() method is used. I observe that the Dijkstra's algorithm has to be modified and it is defined as calcNavFnDijkstra(true). Again, calcNavFnDijkstra(true) is defined inside navfn.cpp. So, I want to know, if I write my own navfn.cpp which is the only source file in my plugin, can the other part of navfn_ros.cpp (defined inside navfn package) can relate to the new navfn.cpp dynamically?

I hope somebody has enough insight into the code to help me with these doubts.

Thanks in advance

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
1

answered 2015-01-26 10:15:46 -0500

David Lu gravatar image

I want to my own global path planner to make two/three of different plans. All these plans will require to remove the inbuilt Dijkstra's algorithm, implemented inside navfn.cpp and used inside navfn_ros.cpp. Will a single plugin serve my purpose or I have to make different plugins and make them switchable to decide the proper plan?

The global planner interface is defined so that you only return one plan. In order to use the navigation frame work as is, a global planner can only return one plan. That said, you could make several plans and then only return the best one.

Why two makePlan() methods are used (see here)?

The one with the tolerance parameter allows for a plan that does not find the exact goal position, but instead has some tolerance.

In the link ( http://www.iroboapp.org/index.php?tit.. . ); they have not told anything about modification about navfn.cpp. .

I'm not familiar with that tutorial.

Finally, where the should I place the code specific to this plugin? Should I create a separate library containing all the files similar to navfn?

Yes.

edit flag offensive delete link more

Comments

Thank you @David

RB gravatar image RB  ( 2015-01-26 10:59:26 -0500 )edit

If this is satisfactory, please click the check mark to mark the question as answered.

David Lu gravatar image David Lu  ( 2015-01-26 11:51:01 -0500 )edit

I have a doubt related to your last answer. In tutorial, only global_planner.cpp is used specific to plugin. global_planner.cpp is similar to navfn_ros.cpp. calcNavFnDijkstra(true) is used inside makePlan() method and computePotential() uses calcNavFnDijkstra(). calcNavFnDijkstra(true) is 2b changed

RB gravatar image RB  ( 2015-01-27 05:35:41 -0500 )edit

I'm really not sure what you're asking. If you're writing a new planner, you should make a new package. If you're modifying files from navfn, you should copy them over. If you're not modifying files from navfn, you should dynamically link to them.

David Lu gravatar image David Lu  ( 2015-01-27 09:42:17 -0500 )edit

Sorry for not explaining my doubt @David. I have updated the question to incorporate the doubt.

RB gravatar image RB  ( 2015-01-27 12:34:37 -0500 )edit

Question Tools

1 follower

Stats

Asked: 2015-01-25 13:56:31 -0500

Seen: 1,042 times

Last updated: Jan 27 '15