The NUClearPort project is an effort to port the NUbots' robocup codebase to use the new NUClear fframework.
The NUbots use Vagrant to manage and version the build environment for the NUClearPort project.
The following is a guide to getting you set up and ready to contribute to the NUClearPort project.
-
Install the following prerequisites on your machine (packages/installers are available for Windows, OSX, and Linux):
- Git
- Virtualbox (or VMware Fusion)
- Vagrant (Note: The version of Vagrant that is available in the Ubuntu 12.04 repositories is an older version that is incompatible with the NUbots' Vagrantfile. If you're using Ubuntu 12.04, please install the latest version of Vagrant via a .deb from the Vagrant download page)
- Packer
-
Clone this git repository onto your machine: e.g.
$ git clone [email protected]:nubots/NUClearPort.git ~/NUClearPort
-
Create a Vagrant base box using Packer:
The build-helper script has a command for this Linux:
$ cd ~/NUClearPort $ ./b create_box virtualbox
Or Windows:
$ python b create_box virtualbox
-
Run
vagrant up
from the NUClearPort directory: e.g.$ cd ~/NUClearPort $ vagrant up
The
vagrant up
command tells Vagrant to create and start a VM for the NUClearPort project based on the project'sVagrantfile
.Note: The very first time
vagrant up
is run on your computer, it will initiate a 282 MB download (the base box for the VM). Vagrant will store the box locally in a special location, and will not need to download it again (see the boxes page of Vagrant's Getting Started guide, or Vagrant's boxes documentation if you want to know more about boxes).When given a choice of network interface, e.g.:
[default] Available bridged network interfaces: 1) en0: Wi-Fi (AirPort) 2) p2p0
Select which adapter the VM will use for its network connection by entering a number (if in doubt, the first option is likely to be the best choice).
(While your VM is being created, you might want to learn a little more about Vagrant by reading the Getting Started Guide or the Command-Line Interface documentation)
-
Just type
$ vagrant ssh
to ssh into your new VM!Vagrant will sync the
~/nubots/NUClearPort
directory on the VM with the root of your NUClearPort repository. This allows for easy editing of code on your machine, and building on the VM.To build NUClearPort, just run the following commands on the VM:
$ mkdir ~/nubots/NUClearPort/build $ cd ~/nubots/NUClearPort/build $ cmake .. $ make -j
-
Make robots do awesome stuff!
Also, read the steps in the NUClearPort Startup Guide about additional Vagrant config.
Important: Make sure to set your git identity correctly before committing to the project.
$ git config --global user.name "Your Name" $ git config --global user.email [email protected] $ git config --global color.ui auto