This paper proposes a coverage path planner for the autonomous vehicle used in inspection operation. The proposed coverage path planner is developed based on a back and forth pattern (equivalent to boustrophedon pattern), producing the output path for the inspection operation with the least trajectory length and number of turns covering the entire workspace. Implementing a back and forth pattern on an arbitrary polygon (extracted from workspace boundaries) is not always viable due to the existence of concave vertices in the polygon. So, this work proposes the tree search model based on the polygon width and back and forth pattern’s sweep line, which decomposes the input polygon in numerous ways. The Dijkstra algorithm solves this tree model to obtain back and forth pattern viable polygons with the least number of turns. Later, the vehicle visits these polygons one by one during the inspection operation. The order in which polygon visits are made by the vehicle affects the overall trajectory length. So, this work proposes the ant colony optimisation based trajectory length optimiser, which finds the polygon visiting order that yields minimum trajectory length. The developed coverage path planner is versatile, and it applies to any autonomous vehicle that operates in the planar region.