I took part in Hacklab.fi's Robotit Strömbergin Puistossa 2017 robot building competition. The objective was to build an autonomous robot that goes through the race track as fast as possible. I didn't want to program any specific track, so my robot used IR-based distance sensors to navigate the track. The robot has an Arduino-compatible Teensy-LC microcontroller as its brains. The simple logic tries to keep as much distance on both sides and quickly turn to side with more space if there is an obstacle in front of the robot. The body of the robot is 3D printed ABS plastic with Helsinki Hacklab's printer and designed in Autodesk Fusion 360.
The logic worked very well while running the robot indoors, but the competition was outdoors and the sunlight affected distance measurements. This can be seen as stuttering on the race video. The logic doesn't rely on accurate measurements so the robot was able to find its way through the track. I used fully rotational servo motors attached directly to the wheels. These were easy to control, but were quite slow. I didn't optimize for speed since the last year's winning time wasn't too fast. This year the competing robots were faster and my time granted me the 4th place in the race.
To make my robot look more interesting, I used a rotating face from my earlier project. I made the face always look at the direction the robot wanted to rotate to make it appear "smarter". This made my robot feel more human and it appealed to the crowd.
The robot can also be run in remote controlled mode. I built a simple web server with Python that ran on a Raspberry Pi Zero W. The server provides a touch-screen oriented control panel so a smart phone can be used to drive the robot around. Communications between the phone and server are handled with http requests and serial communications are used to pass the control data to the Arduino.
All code written for the robot is available in GitHub.