-
Notifications
You must be signed in to change notification settings - Fork 31
Software Tutorial 02: Building the Code
The robotics code uses some custom patches to some open source projects. These dependencies are installed into /opt/ram/local to keep them separated from other installed software on the computer. These are available to compile and install manually from the robotics-at-maryland page (at the current moment this is incomplete), but on certain Ubuntu platforms these have been precompiled and can be downloaded with the bootstrap.py script.
Before running bootstrap.py, you need to make the directory in /opt/ram/local and change the permissions so your current user can write to that directory.
sudo mkdir -p /opt/ram/local
sudo chown -R (your username):(your username) /opt/ram/local
Change your directory to where you cloned the tortuga repository and run the bootstrap script.
python bootstrap.py --download
Note: The bootstrap will prompt you if you would like to install opencv-2.4.6.1. This will download and install to /opt/ram/local/opencv-2.4.6.1/build (where the config cmake file is located) If you plan to manually install opencv yourself remember to modify the path in FindOpenCV.cmake located in /buildfiles/cmake/modules in your tortuga repo to point to where opencv has its config cmake file.
This will also try to run an apt-get command to download any dependencies in the Ubuntu package manager. Afterwards, run the following command.
. scripts/setenv
You'll need to run this in any terminal where you're developing code. It sets up the environment for compiling/running the robotics code.
mkdir build
cd build
cmake ..
make -j4
(-j# is optional this tells make how many processes it can use. Usually you do not want to exceed the number of cores you have)
You can change the number of cores make uses by changing the number with the -j command.
Software Tutorial 03: Setting Up Your Development Environment