Wall following robot

Hey guys,

Just wondering if I'm on the right path. I have to make a robot tht stays a fixed distance from a wall. I'm thinking of using 2 ultrasonic sensors that would be mounted near the front and rear wheels. So the robot is parallel when the difference between sensor1 and sensor2 is zero.

So I guess use one sensor (say, in the front) to check the distance from wall and both sensors to align it to the wall (PID?). Huh... any tips, hints.

 

Regards.

The searchbox is handy

There are at least 2 well documented nodes on this here

https://www.robotshop.com/letsmakerobots/node/18408?page=2

https://www.robotshop.com/letsmakerobots/node/696