An Algorithm for the Solution of Trajectory Planning for Non-Holonomic Mobile Robot in Presence of Obstacles