The 2017 robot code is available for current team members to access and create during the season and then posted at the end of the season. See the robot code notes below for details on how team members can access the current code.
Here is the final 2017 snapshot of our robot source code. (this link will work after 1/5/18) Expand it with "tar -xJvf 2017_frc971_software_final.tar.xz". Here is a snapshot of our 2017 offseason vision code development work. Part of this software was run on the 9971 robot at the MadTown ThrowDown competition (we had huge fun there). These have been tested on a Debian 64bit Linux system. Here is a summer 2017 snapshot of our robot source code. Expand it with "tar -xJvf 2017_frc971_software_summer.tar.xz". This has been tested on a Debian 64bit Linux system.
FRC Software Notes
Teams need to install and run software from FIRST to set up their robots and driver stations. This section has notes on how to do this.
The WPI Getting Started page had a link to the Programming your radio for home use page which said to download the FRC Radio Configuration utility from the TeamForge FRC Radio Configuration Utility page. I was getting an error related to my Ethernet card on my Samsung laptop that said:
Bridge firmware load failed: Error finding NPF device name for adapter: <name of adapter>
Please reset the bridge and try again
This FIRST Forums page suggested disabling all other network devices other than the one being used. I was able to download the radio firmware and configure the radio fine once I disabled the wireless device driver. I was able to flash the firmware and configure the 2017 radio with the Firewall enabled.
Getting Started Building Code from a Bare Debian Installation
On 7/1/2017, Neil, Campbell and Adam used this series of terminal commands to get a new member's Debian Jessie VM started building code.
- cd ~
- su root
- apt-get install sudo git vim
- vim /etc/sudoers
- Add "[USERNAME] ALL=(ALL) ALL" under "# Allow members of group sudo to execute any command"
- wget http://frc971.org/files/frc971/packages/frc971.list
- wget http://frc971.org/files/frc971/packages/llvm.org.list
- sudo mv frc971.list /etc/apt/sources.list.d/frc971.list
- sudo mv llvm.org.list /etc/apt/sources.list.d/llvm.org.list
- sudo apt-get install -t jessie-backports openjdk-8-jdk
- sudo apt-get install python libpython-dev bazel ruby clang-format-3.5 clang-3.6 gfortran libblas-dev liblapack-dev python-scipy python-matplotlib
- git clone https://frc971.org/gerrit/971-Robot-Code
Used to Test Run Bazel
- cd 971-Robot-Code/y2017; bazel test //...
I don't have any detailed notes on how to download and run this year's robot's source code. If you are interested in doing this, check out the 2016 Software page and try following those directions.
Vision Code and Tools
Parker and Ben are leading the development of this year's vision code.
On Feb 25, 2017, Michael checked out the CL (Change List) from the Gerit repository and compliled it with these commands:
- mkdir ~/src_frc971
- cd ~/src_frc971
- git init
- git fetch https://firstname.lastname@example.org/gerrit/a/971-Robot-Code refs/changes/83/1283/31 && git checkout FETCH_HEAD
- vim tools/build_rules/gtk_dependent.bzl
- This file needs to be updated to enable building the gtk binaries. Do this by changing the "disable_gtk_binaries = True" to "diable_gtk_binaries = False".
- Do not check in this change.
- git status
- bazel build //y2017/vision:debug-viewer_example # It took about 5 minute on my HP xw4600 Debian computer.
- # Help output
- bazel build //y2017/vision:debug-viewer_example && bazel-bin/y2017/vision/debug-viewer_example help
Usage bazel-bin/y2017/vision/debug-viewer_example image_format
If this option is used then the provided file will contain a path to a jpeg image on each line.
If this option is used then the provided file will path camera device (/dev/video0).
format_spec is filename of the camera device.
format_spec is the name of a file in blob list format.
format_spec is in ipaddr:port format.
format_spec is the name of a file with each jpeg filename on a new line.
- # Run the code with a bunch of Jpeg images listed in a file
- bazel build //y2017/vision:debug-viewer_example && bazel-bin/y2017/vision/debug-viewer_example jpeg_list:/home/michael/Downloads/test_images/all_imgs.img_list
- # Here is what the image list looks like
- head ~/Downloads/test_images/all_imgs.img_list
March 13, 2017 notes on building the log_displayer and vision debug_viewer.
Checking out the latest code
Ask Brian or Austin what code you should be using. They will give you a link like
Browse to that link and click on the "Download" tab in the upper right hand corner of the page. Then copy the downlaod checkout command by clicking on the copy to clipboard icon on the right. Paste that into your linux terminal. This will "fetch" the version you want and checkout the code.
The outstanding changes can be viewed on Gerrit here. I went to this link and clicked on the Vision2017: - Parker got almost everything checked in. - Added more ... link, clicked on the "Download" in the upper right hand corner of the page, and copy and pasted the "Checkout" text "git fetch https://email@example.com/gerrit/a/971-Robot-Code refs/changes/83/1283/49 && git checkout FETCH_HEAD" to an xterm and ran it. This checked out the version that Parker has been working on. I did this because I want to compile and run his vision code.
Compiling the log_displayer
From ~/src_frc971, with Brian's help, I ran:
- bazel build //y2017:download_stripped.start_list.dir/start_list.txt && cp bazel-bin/y2017/download_stripped.start_list.dir/start_list.txt .
- bazel build -c opt //aos/common/logging:log_displayer
- cp bazel-bin/aos/common/logging/log_displayer ~/bin
- Then I copied ./start_list.txt to ~/bin
Compiling the vision debug_viewer with
- bazel build //y2017/vision:debug_viewer
Notes about finding versions to compile
If you type a bazel command like "bazel build //y2017/vision:" and enter two "tab" commands, you will get a list of targets to build. I was able to run "bazel build //y2017/vision:all" but I don't know if this really compiles everything or not.