According to one embodiment, a system receives a captured image perceiving an environment of an autonomous driving vehicle (ADV) from an image capturing device of the ADV capturing a plurality of obstacles near the ADV. The system generates a first tunnel based on a width of a road lane for the ADV, where the first tunnel represents a passable lane for the ADV to travel through. The system generates one or more additional tunnels based on locations of the obstacles, where the one or more additional tunnels modify a width of the passable lane according to a level of invasiveness of the obstacles. The system generates a trajectory of the ADV based on the first and the additional tunnels to control the ADV according to the trajectory to navigate around the obstacles without collision.