User Tools

Site Tools


openag_brain:installing:installing_globally

Installing openag_brain Globally, From Source

  • Audience: makers, developers
  • Skill Level: beginner

Code:

These install instructions cover how to install openag_brain from source. You probably want to do this if you want to do development work on openag_brain or modify the core system.

Note: unless you are going to be modifying the openag_brain code, you probably want to use the Docker installer instead of this script.

Installing

1. Log in to Raspberry Pi

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:

ssh pi@raspberrypi.local

This should prompt you for your password. The default password for Raspberry Pi is “raspberry”. Type the password and hit “enter”.

2. Clone openag_brain Source Code

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).

3. Increase Swap Space

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:

CONF_SWAPSIZE=100

100 means 100MB. This is the default swap size for Raspberry Pi. Let's increase it to 1024:

CONF_SWAPSIZE=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

4. Install and Compile

Time to run the install script.

cd ~/catkin_ws/src/openag_brain
./scripts/install_dev

This will install and compile openag_brain and of its dependencies, as well as creating a build workspace.

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!

5. Congratulations!

You made it! Time to head over to running openag_brain.

Development

If you're interested in contributing to openag_brain see our handy Contributor's guidebook. You might also want to check out development for useful resources. We welcome contribution from anyone, and we're excited to have you as part of the community!

openag_brain/installing/installing_globally.txt · Last modified: 2017/06/14 20:31 by bob.davis