Blog

From ROS 1 to ROS 2: What Changed for Mobile Robot Navigation

Tom Cosgrove,

Reading Room: The Fictionlab Blog

TL;DR: ROS 2 navigation is not a port of the ROS 1 stack but a redesign. Nav2 replaces a single monolithic navigation node with separate servers coordinated by behavior trees, uses managed lifecycle nodes for controlled startup, and runs on DDS-based middleware without a central master. With ROS 1 at end of life, these changes matter for every team that maintains a mobile robot or plans a new one.

For more than a decade, mobile robot navigation in the ROS world meant one familiar architecture. Many labs still have robots, theses and course materials built on it. Moving to ROS 2 is therefore not only a software update, it is a change in how navigation is structured, started, monitored and extended. This article explains those changes at a conceptual level, without code, so that engineering leads and researchers can judge what a migration involves.

What changed in ROS 2 navigation compared with ROS 1?

In ROS 1, navigation was organized around one central node that loaded a global planner, a local planner and recovery behaviors as plugins. The sequence of what happened when, such as planning, following the path and recovering from failure, was largely fixed inside that node. In ROS 2 navigation, the Nav2 framework splits these responsibilities into independent servers and orchestrates them with an explicit, editable logic layer.

The most important conceptual changes are:

  • Modular servers for planning, path following, recovery and related tasks, each running as its own component.
  • Behavior trees that define the navigation logic instead of a hard-coded state machine.
  • Lifecycle management that brings components up and down in a defined order.
  • DDS-based communication with configurable quality of service, and no single master process.
  • A plugin-oriented design that makes it easier to swap planners, controllers and behaviors.
  • Broader robot support, with attention to different kinematics and footprints rather than mainly round, differential-drive bases.

Why do behavior trees matter for ROS 2 navigation?

Behavior trees describe what a robot should do as a tree of actions, conditions and control nodes. In ROS 2 navigation they decide when to compute a new path, when to keep following the current one, when to try a recovery action and when to give up. Because the tree is described separately from the code, teams can change behavior without modifying the navigation stack itself.

This has practical consequences for research and deployment:

  • new behaviors such as waiting for a door, pausing for people or re-planning at a fixed rate can be composed from existing building blocks,
  • experiments can compare different navigation strategies by swapping trees rather than rewriting software,
  • logic becomes easier to read and review, which helps when explaining robot behavior to colleagues or reviewers,
  • project-specific actions can be added as plugins and placed in the tree.

A deeper discussion of this topic is available in the article on customizing Nav2 behavior trees without forking the stack.

How do lifecycle nodes change startup and reliability?

In ROS 1, nodes started and began working as soon as they were launched. If a sensor driver came up late or a map was not yet available, other components could start in an undefined state. ROS 2 introduced managed lifecycle nodes, which move through defined states such as unconfigured, inactive and active.

For ROS 2 navigation this brings several benefits:

  • components are configured and activated in a predictable order,
  • the system can check that dependencies are ready before navigation begins,
  • parts of the stack can be paused or restarted without tearing everything down,
  • failures during startup are visible and easier to handle.

The same mechanism is useful well beyond navigation, for example for sensors and drivers. The article on ROS 2 lifecycle nodes for controlled startup and shutdown explains the concept in more detail.

What does DDS mean for ROS 2 navigation on real robots?

ROS 1 relied on a central master process to connect publishers and subscribers. If the master stopped, new connections could not be made. ROS 2 replaced this with middleware based on DDS, where nodes discover each other directly. Alternative middleware options have also appeared, so teams can choose the communication layer that fits their network.

For ROS 2 navigation, the main effects are:

  • No single point of failure for discovery, which suits distributed and multi-robot systems.
  • Quality of service settings that let sensor data, maps and commands be delivered with different reliability and history policies.
  • Network sensitivity: discovery and data flow over Wi-Fi need more attention, especially with large messages such as point clouds or images.
  • Better support for real-time and embedded use, including microcontrollers that join the ROS 2 graph.

Mismatched quality of service between publishers and subscribers is a common source of confusion for teams coming from ROS 1, because data can silently fail to arrive. Understanding these settings at a conceptual level saves time during migration.

Why does ROS 1 end of life matter for navigation projects?

The last ROS 1 distribution has reached end of life. Existing robots keep working, but they no longer receive official updates or security fixes, and fewer new drivers and algorithms target ROS 1. Operating systems that ROS 1 depended on are also ageing.

For teams that rely on navigation, this creates several pressures:

  • new sensors increasingly ship with ROS 2 drivers only,
  • current research code and benchmarks are more often published for ROS 2 navigation,
  • students and new hires learn ROS 2 first,
  • long-running projects face growing maintenance risk on an unsupported stack.

A legacy robot can stay on ROS 1 for a stable, finished experiment. For new projects or long-term deployments, ROS 2 is the realistic choice.

What should teams consider when migrating navigation to ROS 2?

Migrating to ROS 2 navigation is rarely a line-by-line translation. It is closer to rebuilding the navigation layer on a new foundation while reusing robot models, maps and domain knowledge. At a high level, teams usually work through these considerations:

  1. Inventory: list drivers, custom planners, recovery logic and tools that the current robot depends on, and check which have ROS 2 equivalents.
  2. Robot description and transforms: confirm that the robot model and coordinate frames follow common conventions, since navigation depends on them.
  3. Behavior mapping: translate custom state-machine logic into behavior tree terms instead of porting it literally.
  4. Simulation first: validate the new stack in simulation before field tests.
  5. Network and middleware: plan for discovery and quality of service on the real network.
  6. Distribution choice: pick a long-term support ROS 2 distribution that matches the operating system and the drivers in use.
  7. Re-tuning: expect to tune planners and costmaps again, since behavior will not be identical.

Starting from a platform that is already ROS 2 native removes much of this work. The Leo Rover runs LeoOS with native ROS 2 support, with Jazzy as the default distribution and Humble also supported, and its software is open source under the MIT license. More on how research teams use such platforms is available on the research applications page.

FAQ: ROS 2 navigation and migrating from ROS 1

Is Nav2 simply the ROS 1 navigation stack ported to ROS 2?

No. Nav2 keeps familiar ideas such as global planning, local control and costmaps, but it reorganizes them into separate servers coordinated by behavior trees and managed through lifecycle states.

Can ROS 1 and ROS 2 run together during a migration?

Bridging tools exist that pass messages between the two, which can help during a transition. Long-term, running a single ROS 2 system is simpler to maintain.

Do I need to learn behavior trees to use ROS 2 navigation?

Not to get started, since default trees are provided. Understanding them becomes important as soon as a project needs custom behavior or recovery logic.

Is ROS 2 navigation suitable for outdoor robots?

Yes. The framework is used indoors and outdoors, but outdoor robots usually need extra work on localization, terrain-aware costmaps and robust communication.

Which ROS 2 distribution should a new navigation project use?

Usually a current long-term support release that matches the operating system and the drivers for the chosen sensors. Checking driver support early avoids surprises later.

Will my ROS 1 navigation tuning carry over to ROS 2?

Partially. Concepts and experience transfer well, but planners, controllers and costmaps typically need to be tuned again on the new stack.

If you are planning a new ROS 2 navigation project or moving a lab away from ROS 1, take a closer look at the Leo Rover as a ROS 2 native starting platform.


Read more