The folder rover
contains the code for the vehicle. It used the inotool build tool. inotool has been unmaintained for quite some time and it doesn't work with the latest versions of the Arduino IDE. There is a more current form called Arturo that I haven't had time to check out yet.
In the meantime, download version 1.0.5 of the Arduino IDE. inotool works fine with it. You may need to delete the RobotControl Arduino library, see this thread, if you get compilation errors.
The rover is based on the Dagu Rover 5 platform with 4 motors and encoders, an Arduino Mega, a Redbear BLE Shield, 3 SR04 sonar sensors and the Polulo MinIMU compass and gyro. See letsmakerobots.com for a full description.
To build the project you need the L3G, LSM303 libraries for the MinIMU and the Bluetooth libraries provided by Redbearlab.
The Arduino is only responsible for collecting sensor data and sending it to a computer. It receives control commands from the computer. The main application consists of two parts:
-
All algorithms have been implemented in C++. See
robot_controller.cpp
for a start. This code requires the boost 1.59 and OpenCV 3.0 libraries. It should be easy to compile it e.g. on a Raspberry Pi or any other single-board computer. It contains no platform-specific input/output or UI code. There is a simple pure C interface inrobot_controller_c.h
.occupancy_grid.cpp
builds a probabilistic occupancy grid map from the sensor data. The implementation is based on the description in Thrun, S., Burgard, W. and Fox, D. (2005). Probabilistic Robotics. Cambridge, Mass: MIT Pressedge_following_strategy.cpp
implements a simple map making strategy: The robot tries to drive past obstacles at a short distance until all obstacles have been visited.
-
I've used the C interface to create a simple Mac application in Swift that both communicates with the robot via Bluetooth and visualizes the received data in a simple UI.