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

How does Dijkstra's algorithms work inside navfn?

asked 2015-02-03 06:49:27 -0500

Mercy gravatar image

updated 2015-02-04 04:53:24 -0500

Hi, I have gone through this and this as well . Can someone explain how the global path planner works in details?

EDIT: According to your suggestion, I have visited NavfnROS and navfn. In navfn_ros.cpp, line number 197 , we have makePlan () method defined which calls calcNavFnDijkstra(true) line 285. This calcNavFnDijkstra(true) is defined here, line number 290. It uses



00303 // path

00304 int len = calcPath(nx*ny/2);


I want to remove only Dijkstra's algorithm; I don't want to change the costmap generation, cell updation, obstacle avoidance

I know what is a potential field, but how it is used here; I have no idea. How does gradient line 989 help us in making the global plan? I am using ROS fuerte.

edit retag flag offensive close merge delete


Hello Dear I also want to remove only Dijkstra's algorithm, pleas can you tell me how you did it or what helped you to understand the code ? Thank you

fh97 gravatar image fh97  ( 2022-01-05 22:05:28 -0500 )edit

2 Answers

Sort by » oldest newest most voted

answered 2015-02-03 07:07:58 -0500

I suggest you have a look at the source code and then ask more specific questions based on what you discover. There are fortunately many people on ROS Answers who are willing to help others, but very few have the time to write a comprehensive answer to a extremely broad questions like yours.

You're much more likely to get answers to a question like "I have looked into package X's code and do not quite understand what is done in function Y, can someone help me?" than to one like "Please explain the internal workings of package X in detail" (such as your current question above).

edit flag offensive delete link more


@Stefan, I have updated the question according to your suggestion. Please have a look.

Mercy gravatar image Mercy  ( 2015-02-03 08:54:51 -0500 )edit

@Martin thanks. But, currently I have to use that one.

Mercy gravatar image Mercy  ( 2015-02-04 05:20:29 -0500 )edit

answered 2015-02-04 04:52:44 -0500

If you're using Hydro or later, you could switch to David Lu's global_planner. It has implementations of several algorithms (A*, Dijkstra) and can also emulate the old navfn behavior, if you wish. Looks like the source code is much easier to digest than navfn.

edit flag offensive delete link more

Question Tools

1 follower


Asked: 2015-02-03 06:49:27 -0500

Seen: 1,004 times

Last updated: Feb 04 '15