A Complete framework for ambush avoidance in realistic environments