Thank you for the respond. I do appreciate. My question is that are we going to use the parametric equation to solve for the euclidean distance from the robot to the line segment, using the euclidean formula D = sqrt[(x2-x1)^2+(y2-y1)^2]. If so then how can we determine the value of x1,x2,y1,y2 ??