Raycasting (also referred to as Raytracing) is the mathematical process the robot uses to clear away dynamic obstacles from its memory when they are no longer there. dIt is the mechanism that prevents "ghost obstacles" from locking up your navigation system.

  • What it is: The math Nav2 uses to clear out stale/moving obstacles from the Obstacle Layer
  • How it works: It draws an imaginary line from the sensor origin to the detected object. Every grid cell along that line is declared empty (Cost = 0)
  • Why it matters: Prevents "ghost obstacles" from permanently trapping the robot when people or dynamic objects move away