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.
![](http://imgdetail.ebookreading.net/hardware/2/9781788627436/9781788627436__ros-programming-building__9781788627436__assets__c3432226-5dc0-4390-8f95-2c56c3ad5bb0.png)
Figure 21: Visualizing obstacle avoidance capabilities in RViz