Sphero Robotic Controller Experiments

This project is an experiment in different automatic controllers for the sphero robot.

The API it uses for communication is the bluecove API and a modified version of the nicklasgav Sphero-Desktop-API which includes some additional changes for the sensor streaming api, the changes are located here in the fork of Sphero-Desktop-API.

The following page contains some notes as to the implementation of the RandomController and the BinomialController.

The RandomController is very simple, the method changeDirection is used to change direction using a randomHeading.

Given the RollCommand takes a velocity between $0..1$ and a heading in degrees the new heading is calculated as $$ randDegrees = rand(0,1) \times 2 \pi \frac{180}{\pi} $$ If the changeDirection method is triggered due to a collision in the prior iteration it adds 90 degrees to the last heading. $$ randDegrees = \theta \frac{180}{\pi} + 90 $$


In [ ]: