-
Notifications
You must be signed in to change notification settings - Fork 0
Linux Setup
If you need to install Ubuntu first, start with Installing Linux to see how you can dual boot Ubuntu or check out virtual solutions such as Parallels to get Ubuntu running under your current OS. Make sure you have at least version 11.10.
NOTE: We do not support 64-bit Linux! The setup process described below will only set up a 32-bit machine. (It is possible to run our code on a 64-bit machine, but you're on your own. Good luck!)
$> sudo apt-get install git-core gitk
The following script will take care of the name/email section of configuring git, but if you want further customization (and you do) see: Configuring Git.
$> git clone <your-github-remote>
Where is git://github.com//nbites.git if you've forked this repository; see Configuring Git to get this all set up.
Once you HAVE THE CODE DOWNLOADED, CD into nbites/util/scripts and run, with [naoqi version] being the latest version of Naoqi (as of June 2013, 1.14.3)
$> ./linux_setup.sh [naoqi version]
This script sets up a Linux machine with all necessary software and files. Make sure to keep an eye out for the script running or else it might time out on parts where user input is required! Also follow the instructions shown at the end of running the script.
Once the script has run, you can attempt to compile our robot code and offline tools. Do the following:
$> cd <path-to-nbites-folder>/nbites/src/man
$> make cross
Navigate to the BUILD_PROTOBUF option and hit enter to turn it ON.
$> make
This will build the Google protobuf dependency of our code base (for cross compilation). The next time you build, you can either turn this option off or
$> make clean
before building so that you don't have to rebuild this library every time. The same thing has to be done for the tool the first time you build it:
$> cd <path-to-nbites-folder>/nbites/src/tool
$> make config
Turn on the BUILD_PROTOBUF option here, then
$> make
You should now have folders named protobuf_cross and protobuf_native in your nbites/lib folder, and you can turn off the BUILD_PROTOBUF option.
We wrote the linux_setup script to make the rather complicated setup process automated. The steps below describe what it actually does to your computer. You can also check out the code itself.
Our software has a bunch of dependencies that you can get through apt-get, Ubuntu's package manager. These are...
-
build-essential : Compilation tools. This gets gcc and related stuff.
-
cmake : We use this for our build system. It should be version 2.8.
-
cmake-curses-gui, ccacche : A terminal GUI for editing build options, and cache for these options.
-
git-core, gitk : Our version control system (and a gui for it).
-
python2.7-dev : This is the version of python on the robots. Not actually necessary until we start running python offline one day... But you do need python for our autowrapping script.
-
emacs : Our favorite editor. Not necessary, but people on the team can help you use it.
-
aptitude : Alternative package manager interface.
-
qt-4-dev-tools : Our offline tool is written using Qt.
-
python-pyparsing : Used for automatically boost-wrapping protobuffers.
-
libboost-dev : The boost libraries. Several parts of our code base depend on them.
The script installs all of these en masse, but you can get any of them individually by running:
$> sudo apt-get install <package-name>
Download the latest SDK from the server, link here. It will be in a folder by version number, and you want the file named naoqi-sdk-...-tar.gz.
Extract this file and move it to a suitable place, usually nbites/lib/naoqi-sdk-[version]-linux. This location may change based on personal preference. In other words, run, in the directory where you downloaded the file
$> tar -xvzf [filename].tar.gz
Then move the file using
$> mv [extracted file] <path-to-nbites-dir>/lib/naoqi-sdk-[version]-linux
Download the latest toochain from the server, link here. It will be in a folder by version number, and you want the file named nbites-atom-toolchain-...-tar.gz.
Extract this file and move it to nbites/lib/atomtoolchain. In other words, run, in the directory where you downloaded the file
$> tar -xvzf [filename].tar.gz
Then move the file using
$> mv [extracted file] <path-to-nbites-dir>/lib/atomtoolchain
It must be exactly in this place with the correct name for the build system to find it!
Now that we have the dependencies, your computer needs to know how to find them. Add the following line to ~/.bashrc:
source /home/ecat/nbites/lib/nbites.bash
In other words, run
$> pico ~/.bashrc
Then paste the line above into the file. You can add a comment, prefaced with a #, to remind yourself that that line is for RoboCup. It creates a link to the file we're about to create...
So create a file in nbites/lib called "nbites.bash" which should contain the following lines:
export NBITES_DIR=<path-to-nbites-dir>
export AL_DIR=<path-to-naoqi-sdk>
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:<path-to-nbites-dir>/ext/lib
export PATH=$nbites_dir/ext/bin:$PATH