The Navigation stack can avoid a random obstacle in the path. The following is a scenario where we have placed a dynamic obstacle in the planned path of the robot.
The first figure shows a path planning without any obstacle on the path. When we place a dynamic obstacle on the robot path, we can see it planning a path by avoiding the obstacle.
Figure 21: Visualizing obstacle avoidance capabilities in RViz