Practical engineering guide
What you can build with Nav2 and where problems start
Nav2 is a ROS 2 navigation stack for mobile robots. It provides planners, controllers, behavior trees and costmaps but expects valid localization, odometry, transforms and velocity-control interfaces from the robot.
A first test you can reproduce
- 01.Publish a consistent map -> odom -> base_link transform chain and a valid robot footprint.
- 02.Verify wheel odometry and laser/depth observations with real timestamps in RViz.
- 03.Start Nav2 lifecycle nodes and confirm planners, controllers and costmaps reach the active state.
- 04.Send a short navigation goal in an open space and inspect local/global paths, command output and recovery behavior.
Questions that come up during real implementation
Why does Nav2 refuse to move although a map appears in RViz?
Check TF transforms and frame names, the localization pose, lifecycle states, costmap clearing and whether the controller receives a valid path. Confirm that /cmd_vel reaches the base driver and is accepted. A visible occupancy grid does not prove that the robot knows its location.
Why does a robot oscillate or stop near a doorway?
Verify footprint and inflation radius, velocity and acceleration limits, controller lookahead and localization covariance. A doorway that is geometrically wide enough may be blocked in the inflated costmap. Replay the same route after changing one parameter at a time.
Do I need SLAM Toolbox or RTAB-Map with Nav2?
Not always. A map plus an appropriate localization method can be enough. SLAM builds or updates maps; Nav2 plans and controls navigation. Choose SLAM only when map creation or updating is part of the task.
Checks before using it on a robot
- Measure stopped distance, clearance and recovery from a blocked path.
- Test restart localization after physically moving the robot while navigation is paused.
Official technical reference
https://docs.nav2.org/rolling/configuration_and_development/first_time_robot_setup_guide/Compatibility and installation
- Developer
- Open Navigation project
- License
- Open source
- Operating systems
- Linux
- ROS support
- ROS 2
- Languages
- C++, Python
- Installation method
- ROS packages and source builds