The motion of a robot inside a rectangular grid is simulated using Isotonic Array P System (IAPS)defined by Sureshkumar and Rama in 2015. A polynomial time algorithm has been proposed using this grammatical model to find the shortest path with and/or without obstacles. The obstacles are usually assumed be of polygonal shape in the rectangular grid. © 2017 [International Journal of Imaging and Robotics].