QwerkBot attempts to navigate my hallway using some basic roaming code. It continually takes sensor readings at five different angles, using an IR rangefinder to establish the distance to the nearest object. If the current heading doesn't have the lowest reading, it'll stop and adjust the direction to the one with most space in front of it. In this way, it should avoid obstacles- specifically, the walls.
There's also a backup plan: if the sensor reading in the centre position is high enough to suggest that we've hit an obstacle anyway, it reverses and spins approximately 180 degrees to seek new adventures. There's also a panic mode which triggers a complete shutdown if it seems to be completely hemmed in by barriers, but this is rarely triggered.
Link to this comment:
All Comments (0)