Note: unless you are going to be modifying the openag_brain code, you probably want to use the Docker installer instead of this script.
If you've been following the install tutorial, you should already have Raspbian Jesse (Raspberry Pi's operating system]] installed. If you don't, head over to installing_the_os, install the OS, then come back here.
With the OS installed, we'll want to log on to the pi over ssh. If you've never used ssh before, raspberrypi.org has a great tutorial page.
We'll want to ssh into your Raspberry Pi as user
pi. By default, Raspberry Pi sets up a hostname called
raspberrypi, so you can log in like this:
This should prompt you for your password. The default password for Raspberry Pi is “raspberry”. Type the password and hit “enter”.
Next, we'll want to clone a copy of the git repository.
git clone https://github.com/OpenAgInitiative/openag_brain.git ~/catkin_ws/src/openag_brain
(We want to clone the code into `~/catkin_ws/src/openag_brain` for reasons that will become clear in a bit).
Since the Raspberry Pi is a small computer, we'll need to give it some extra swap space so it doesn't run out of memory when installing.
To do this, open
/etc/dphys-swapfile in your editor. Here, we'll use the Nano editor to do this.
sudo nano /etc/dphys-swapfile
You should see a line that says:
100 means 100MB. This is the default swap size for Raspberry Pi. Let's increase it to 1024:
Save the file and exit. Now, we'll restart the swapfile service:
sudo /etc/init.d/dphys-swapfile stop && sudo /etc/init.d/dphys-swapfile start
Time to run the install script.
cd ~/catkin_ws/src/openag_brain ./scripts/install_dev
Note: this will take a looooooong time. Probably an hour or more. The Raspberry Pi is a tiny little computer and has to work very hard to compile things. Be nice to it. It's trying as hard as it can!
You made it! Time to head over to running openag_brain.