- Raspberry Pi 2. You can probably use the newer Raspberry Pi 3 as well, but I haven't tried it.
- GoPiGo, which turns your Raspberry Pi into a basic robot platform.
- Xbox 360 Kinect, if you want depth information. Alternatively, you can use any OpenCV-compatible (= most) USB web cam for vision.
- A decent USB Wifi dongle. I wouldn't get one of the tiny ones since I had bandwidth trouble, presumably due to the tiny antenna.
- A 3D printed holder for the Xbox Kinect. You can use my model (under
assets/kinect_gopigo.stl), if you want. It contains holes so that you can easily attach it to your GoPiGo body. Alternatively, you can just attach it using tape or whatever.
- A battery pack of your choice. I use 10 AA rechargeable batteries since the Kinect requires at least 12V or it will just randomly shut down during operation, especially if the motors are also running. I use eneloop batteries, which are awesome. I get approx. 2 hours of a set of fully charged batteries.
- Some soldering equipment and patience to put it all together.
Installation on Client
Simply run the following command to install all dependencies:
pip install -r requirements.txt
Installation on Raspberry Pi
sudo apt-get update sudo apt-get upgrade sudo apt-get install build-essential git
Next, generate keys for Github: https://help.github.com/articles/generating-ssh-keys/
PiBot and Dependencies
sudo apt-get install python python-dev python-numpy python-scipy python-setuptools libopencv-dev python-opencv git clone email@example.com:matthiasplappert/pibot.git ~/pibot cd ~/pibot git submodule update --init --recursive sudo pip install pip --upgrade sudo pip install -r requirements.txt
cd vendor/gopigo/Setup chmod +x install.sh sudo ./install.sh
cd /tmp sudo apt-get install libudev-dev sudo wget http://sourceforge.net/projects/libusb/files/libusb-1.0/libusb-1.0.19/libusb-1.0.19.tar.bz2/download tar xvjf download cd libusb-1.0.19 ./configure make sudo make install cd ~/pibot/vendor/libfreenect sudo apt-get install cmake freeglut3-dev libxmu-dev libxi-dev mkdir build cmake -DBUILD_EXAMPLES=OFF -DLIBUSB_1_INCLUDE_DIR=/usr/local/include/libusb-1.0 -DLIBUSB_1_LIBRARY=/usr/local/lib/libusb-1.0.so -L .. make sudo make install cd ../wrappers/python sudo python setup.py install
TODO: Describe udev rule stuff
Running the Robot
First, connect to the robot over SSH and start it:
ssh pi@<ip_of_your_raspberry> cd pibot/src sudo python run_robot.py
Next, you can try out the robot locally by using one of the
test_ files. You always need to specify
the robot's name, which is printed once you start the robot, and probably also the host of the robot depending on
your network configuration. A simple example would be:
python test_motors.py pibot --host <ip_of_your_raspberry>