# Compute absolute position of obstacle in V-Rep from proximity sensor measurement

all. I am trying to construct the map of the environment by using the measurements from the proximity sensor in V-Rep. I have absolute position of the robot. So, I know the X1, Y1 coordinates of the robot with respect to inertial frame. And I also know the X2 and Y2 coordinates of the obstacle with respect to the sensor frame on the robot. My purpose is to calculate the coordinates of the obstacle with respect to the inertial frame. On my solution, I just sum up two coordinates like, (X1+X2) and (Y1+Y2). However, it didn't work. Isn't it correct?

• What do you mean by it did not work? – hosh0425 Jul 1 '20 at 4:41
• I meant the coordinates I obtain show me the coordinates of the robot again. However, I solved the problem by using rotation matrices. However, it is still interesting for me why this method didn't work appropriately. – BHOS Jul 1 '20 at 8:50