The perceive-plan-act loop
Autonomous navigation on a mobile robot is a closed loop, not a one-shot computation:
- Perceive — laser scan or depth image update the costmap; wheel odometry and IMU feed a state estimator; AMCL fuses them to produce a pose estimate .
- Plan — given and the goal , the global planner computes a reference path through the static map; the local planner computes velocity commands to follow it while avoiding dynamic obstacles.
- Act — velocity commands go to the motor controllers; encoders report back wheel speeds; the loop repeats at 10–50 Hz.
This loop never fully stops: the robot replans the local trajectory on every cycle, so a pedestrian stepping into the path triggers an immediate response without global replanning. The architectural split between a slow global planner (1 Hz) and a fast local planner (10–50 Hz) is the central design decision of the ROS navigation stack.
