Teaching Eric to stop banging his head off the waste paper bin.
The main problem with IR sensors is their dislike of dark or non reflective surfaces, such as a waste paper bin or computer monitor. Using these sensors we can only work in a controlled environment with white surfaces for walls and floors. If Eric is to explore we can not be expected to run ahead of him painting the walls white. I’t time to get out the laser!
Now, if we had loads of money we could use a 360 degree laser scanner but we don’t. We do have a laser range finder and we can just mount it pointing forward and rotate the robot. As the sensor is mounted on the pan and tilt head we can use that to scan the area.
The first thing to remember about the servos is that they are digital not analogue, so you are not going to be positioning these in whole degrees, this will need to be in radians. Don’t ask me why we use radians, something to do with the internal workings, but 360 degrees equals 2*PI radians so from that you can convert back to get something that is human readable.