Let's say I have a robot, located in a box. The robot can move in the x and y and rotate.

The robot has 4 rangefinders, mounted 90 degrees apart, that measure the distance to the walls of the box (I think it would be possible with just 3 but let's use 4 as an example). The robot also has an "approximate" +-10 degree estimate of its heading, so it knows in general which quadrant its bearing should be in.

Given this information, how can I calculate the "exact" position and bearing of the robot?

Intuitively I know this should easily be possible as there are three degrees of freedom for the system (x,y, and the angle), but I can't think of a way to actually calculate the position.


Suppose your coord axis is at the center of the box and the axes parallel to the walls o the box. Distance to the min-y-wall tells you y. Distance to the min-x wall gives you x, with the obvious offsets added in. Crazy-easy unless I misunderstood.

New contributor
robotno is a new contributor to this site. Take care in asking for clarification, commenting, and answering. Check out our Code of Conduct.

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Not the answer you're looking for? Browse other questions tagged or ask your own question.