This is FRC Team 971's main code repository. There are README*
files throughout the source tree documenting specifics for their respective folders.
The main central location for our code is our Gerrit server at https://robotics.mvla.net/gerrit. To get a copy of the code on your computer to work with, follow these steps:
- Contact Michael Schuh to get an SVN account.
- Go to Gerrit and create an account.
- Contact Brian Silverman with your SVN username to get access to the code in Gerrit.
- Go to the 971-Robot-Code project in Gerrit and run the command.
Running the
clone with commit-msg hook
command will save you trouble later.
To learn more about git, see git(1) (man git
or git(1) (especially the NOTES section).
We want all code to at least have a second person look over it before it gets merged into the master
branch. Gerrit has extensive documentation on starting reviews. TL;DR: git push origin HEAD:refs/for/master
and then click on the link to add reviewers.
If you just upload a change without adding any reviewers, it might sit around for a long time before anybody else notices it.
git-review can make the upload process simpler.
The currently supported operating system for building the code is amd64 Debian Jessie. It is likely to work on any x86_64 GNU/Linux system, but that's not at all well-tested.
We use Bazel to build the code. Bazel has extensive docs and does a nice job with fast, correct increment rebuilds.
- Set up the required APT repositories:
Download
frc971.list
and
llvm.org.list
and put them in
/etc/apt/sources.list.d/
. - Install the required packages:
apt-get install python libpython-dev bazel ruby clang-format-3.5 clang-3.6 gfortran libblas-dev liblapack-dev python-scipy python-matplotlib
- Allow Bazel's sandboxing to work:
Follow the direction in
doc/frc971.conf
.
- Build and test everything (on the host system):
bazel test //...
bazel build --cpu=roborio //...
- Build the code for a specific robot:
bazel build --cpu=roborio --compilation_mode=opt //y2015/...
- Download code to a robot:
bazel run --cpu=roborio --compilation_mode=opt //y2015:download roboRIO-971.local