Ask Your Question
0

Architecture of the Navigaton2 stack

asked 2019-11-19 06:29:53 -0600

ninamwa gravatar image

Hi, I am working on a report in school where i am describing the navigation2 stack briefly, and i would like to add a picture of the high-level architecture. This picture would been perfect, except the fact that i am writing about ros2 and navigation2.

image description

I have not been able to find an updated picture of the architecture (does anyone know if it exist?), but i found this one: image descriptionon this page: https://github.com/ros-planning/navig... It also state that:

In addition, move_base itself has been split into multiple components:
 - nav2_bt_navigator (replaces move_base)
 - nav2_navfn_planner (replaces global_planner)
 - nav2_dwb_controller (replaces local_planner)

As i have not been able to find a picture, i was thinking to create my own, but i need to be sure about the changes before i do so. Is local planner (now: nav2_dwb_controller) and global planner (nav2_navfn_planner) now moved outside the square box (now: nav2_bt_navigator), and the box consists of only global costmap, local costmap and recovery behaviour? or is the architecture changed completely?

I am just briefly explaining the navigation stack and what information is required for this to work, so this is why i have not too much knowledge of how the different components work.

Thank you for any answers! :)

edit retag flag offensive close merge delete

1 Answer

Sort by » oldest newest most voted
2

answered 2019-11-19 10:05:21 -0600

updated 2019-11-19 23:24:48 -0600

Hi, developer/maintainer on Nav2 here.

Yeah, sorry about that. On the grand scheme of things a block diagram has been low priority. Also things have been changing and still subject to changes so we didn’t want to produce misinformation. Comments below represent the current state of things but also are subject to change.

The ins and outs of the move base diagram are the same. We need some map (from map server, slam, etc), some sort of positioning (TF) and various sensor data streams.

Now rather then a FSM move base, we use behavior trees (BT). Look more into BTs if you’re not familiar but they’re what you’d think. Trees of “stuff” to do rather than a loop with finite states. The BT navigator is the package containing the navigation implementation of a BT. This calls the nav2_{recoveries, planner, controller} servers. These servers host a map of plugins which have some algorithm implemented.

For the simplest case, the servers will have a single plugin like DWB or NavFn that will do control or planning. For more complex applications you can have different plugins for contextual needs.

The lifecycle manager just runs all the nodes through the managed nodes lifecycle. That’s subject to near term removal in favor of the launch system.

Costmaps exist in their respective servers, though again long term that may not be true. Moreover the concepts of a costmap are likely to be depreciated in the next year.

Edit: also, simple navigator is already dead.

Edit thrice: you asked and brought my laziness to an end. See attached diagram that either this or a derivative of this will be placed in documentation for Navigation2 whenever another burst of non-laziness occurs. Don't say I never did a favor for ya ;-)

C:\fakepath\diagram.png

edit flag offensive delete link more

Comments

you asked and brought my laziness to an end

hah ;)

gvdhoorn gravatar imagegvdhoorn ( 2019-11-20 02:11:14 -0600 )edit

Wow, thank you very much! This was exactly what i was looking for! I will look a bit more into behaviour trees, but i get the concept! I guess the odometry is going into the planner, the same way the sensor data does?

ninamwa gravatar imageninamwa ( 2019-11-20 08:23:01 -0600 )edit

We pull odometry usually from TF, not the raw topic.

stevemacenski gravatar imagestevemacenski ( 2019-11-20 12:11:47 -0600 )edit

Thanks Steve for taking the time to explain the architecture. In addition to that, Matt Hansen in this video also gives an overview of navigation2, comparison with ROS navigation and explanation of the use of BTs. I guess he gave the same presentation on this year's ROSCon but I am not sure if the slides/video of it are out yet.

pavel92 gravatar imagepavel92 ( 2019-11-21 09:01:51 -0600 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

3 followers

Stats

Asked: 2019-11-19 06:29:53 -0600

Seen: 35 times

Last updated: Nov 19