Running Data Viewer Log Server on Windows
Background
On (one of) the co-processor(s) on the robot we run a log recorder/server.
This server is contained in the robot code, typically called CoProcessorMain
and is deployed using ./gradlew raspiDeploy
.
As the robot code runs, data is streamed to the recorder using UDP and logged to binary files on the co-processor.
When the robot comes back from a match, we can then open the web interface on the co-processor (10.1.76.19:8001
in 2024) to view historical logs.
This guide will tell you how to run the log server locally on your Windows machine so that you can store/view robot logs without needing to be connected to the robot.
Software pre-requisites
- Node.js (v22.1.0 at time of writing)
- Eclipse Temurin (17 LTS at time of writing)
- Intellij (optional, but is used to run
CoProcessorMain
in the robot code) - Yarn (
npm install -g yarn
)- Allow
yarn
to be run: Start Menu > Powershell, Right click > “Run as Administrator”. Then run the following command:
- Allow
Set-ExecutionPolicy -ExecutionPolicy Bypass
Setup
Clone repositories
Run the frontend
In Aces-Web-Data-Viewer
:
yarn install
yarn start
This will take a minute - your web browser should open and show the data viewer.
If not, navigate manually to localhost:3000
.
Run the log server
- In IntelliJ, open
2024-Robot-Code
. - Open
java/org/aceshigh176/frc2024/coprocessor/CoProcessorMain.java
. - Change the
logsBaseDir
string to a valid directory in Windows
final String logsBaseDir = "C:/nvme/frc/robotLogs/";
- Copy the logs from the co-processor into
C:\nvme\frc\robotLogs
- Run
CoProcessorMain
Connecting
On the data viewer (localhost:3000
), enter the "historical" view.
For Cloud Server IP/Host
, enter "localhost:8001"
At this point, you should see logs on the left side. If you don't, check the network logs and the logs for CoProcessorMain to see what's going on.
Fetching new logs from the co-processor
- On the co-processor's data viewer ui (
http://10.1.76.19:8001
in 2024), navigate to the "historical" view. - On the left side, determine what recording you want to fetch, and hover over the "info" icon. It will give you a UUID.
- In a powershell window, execute the following:
# Navigate to logs directory
cd C:\nvme\frc\robotLogs
# Fetch the logs from the co-processor - swap out the UUID prefix to the one you got in the previous step
scp "[email protected]:/nvme/frc/robotLogs/930e4f0b-1c8c*" .