Navigation (Nav2)NEORACER DOCS
These docs are public and open source.Edit on GitHub
SOFTWARE / NAVIGATION

AUTONOMOUS NAVIGATION.

With a saved map, turns a click in RViz into a drive. It localizes the car on the map with , plans a path to your goal, and follows it while avoiding obstacles.

Nav2AMCL localizationDWB / TEB planners
01 / BEFORE YOU NAVIGATE

YOU NEED A MAP.

  • A saved map.pgm + map.yaml from Mapping.
  • The driver running on the car (teleop).
  • RC ready as your override: keep the transmitter in reach and flip SWB up (manual) the instant you need to take over.
02 / LAUNCH NAV2

DWB OR TEB.

One launch brings up the whole stack: map server, AMCL, planner, and controller. Pick the local planner with the planner argument.

PlannerHow it drives
dwbDynamic Window. Steady and predictable, a good default.
tebTimed Elastic Band. Smoother curves, better in tight, cluttered space.
//DWB
bash
racecar ws osracer # switch this shell to the vendor workspace ros2 launch osracer_navigation nav2.launch.py planner:=dwb
//TEB
bash
racecar ws osracer # switch this shell to the vendor workspace ros2 launch osracer_navigation nav2.launch.py planner:=teb
03 / IN RVIZ

SET A GOAL.

Nav2 opens RViz with the map loaded and a Navigation 2 panel. First tell it roughly where the car is, then tell it where to go.

01
Set the starting pose.

Use 2D Pose Estimate and drag an arrow where the car actually sits, pointing the way it faces. The AMCL particle cloud tightens around the car as the scan matches the map.

02
Drop a goal.

Use Nav2 Goal and drag an arrow at the destination, with the arrow giving the heading to arrive on. Nav2 plans a path and the car starts driving.

03
Watch the run.

The Navigation 2 panel reports Localization, Distance remaining, Time taken, and Recoveries. Feedback reads reached when it arrives.