- Built-in Lua interpreter.
- Smart bot configuration with Lua bindings and negligible overhead.
- Fast code deploys when c++ doesn't need recompiled.
- Ultra low latency performance.
- Design is decoupled from wpilib making it portable to other robotics systems.
git clone --recursive git@github.com:snidercs/bot-2024.git
The c++ code should be formatted before submitting pull requests. Do this with python or gradle.
# Run the python script directly
python3 util/format.py
# or do it wrapped in a gradle task
./gradlew clangFormat
The gradle build
and gradle deploy
tasks both need roboRIO libraries and headers in place. Most of them are handled by wpilib, but some need special attention.
Note: For Windows GitBash and the CMD prompt are both needed.
The build requires LuaJIT, which WPIlib does not provide. It must be compiled manually.
Linux
# multilib support is needed for cross building, install if needed
sudo apt-get install gcc-multilib g++-multilib
# Run the native/roborio build scripts
util/build-luajit-linux64.sh
util/build-luajit-roborio.sh
macOS
The Mac build script can produce arm64
or x86_64
binaries. It will select the system default if not specified.
# Choose one of these...
util/build-luajit-macos.sh # Use system default
util/build-luajit-macos.sh arm64 # force arm64 (M1/M2/..) build
util/build-luajit-macos.sh x86_64 # force an x86_64 (intel) build
# If docker is isntalled and running...
util/docker-run.sh util/build-luajit-roborio.sh
Windows
The build script can be run from a GitBash terminal:
# In a bash emulator
util/build-luajit-msvc.sh
The roboRIO binaries need docker to compile from Windows which requires a regular CMD prompt:
util\docker-run.bat util/build-luajit-roborio.sh
After LuaJIT is compiled, open a terminal and do:
./gradlew build
./dockerbuild.sh
Run all unit tests.
./gradlew check
Run the following command to deploy code to the roboRIO
./gradlew deploy
If it gives problems, cleaning the project could help. The --info
option could give more information too.
./gradlew clean
./gradlew deploy --info