SysId has moved into the allwpilib monorepo.
SysId: System Identification for Robot Mechanisms
This is the C++ version of frc-characterization. It uses the wpimath backend for generating feedforward and feedback gains.
Supported Vendor Hardware
This is a list of the vendors that are currently supported by SysId for 2023:
Vendors
- CTRE: TalonSRX, TalonFX, VictorSPX, CANCoder, and Pigeon IMU
- NavX Gyro (No integration tests)
- Playing With Fusion Venom
- REV: SparkMax Motor Controller
Hardware Supported by WPILib
- ADIS16448 IMU
- ADIS16470 IMU
- ADXRS450 Gyro
- Analog Gyro
- Encoders plugged into the roboRIO
- PWM Motor Controllers
Downloading and Running Development Versions of SysId (Analysis Only)
The SysId GitHub repository uses GitHub Actions to build and test each commit.
To download development version of SysId from the main branch (most stable):
- Click here.
- Select the run of your choosing (the top most run is the latest).
- Scroll down to the artifacts section, and select the appropriate build for your operating system.
To download development version of SysId from all branches:
- Click here.
- Select the run of your choosing (the top most run is the latest).
- Scroll down to artifacts section, and select the appropriate build for your operating system.
To run development versions of SysId
- Extract the files from the downloaded zip file.
- Extract the files from the zip file located in the root of the extracted folder.
- Open the folder named after your operating system (ex: Linux, Windows, macOS).
- Open the folder named for your architecture.
- Run the executable named
sysid
.
Downloading and Running Full Development Versions of SysId (Generation, Logging, Analysis)
Clone the SysId Github repository to get all the necessary code.
Go to the directory that the repository is cloned in and run ./gradlew run
to start the executable.
Generating And Running SysId Robot Code
- Add sysid vendordep to your robot code and call the logging function.
- Deploy your robot code.
- Connect the logger to your robot and perform the required tests.
Building and Running SysId
SysId uses Gradle to build. To build debug and release versions of the main executable and run tests, run ./gradlew build
. During development, you can use ./gradlew run
to build and run the debug executable.
Requirements
- JDK 11
- Note that the JRE is insufficient; the full JDK is required
- On Ubuntu, run
sudo apt install openjdk-11-jdk
- On Windows, install the JDK 11 .msi from the link above
- On macOS, install the JDK 11 .pkg from the link above
- C++ compiler
- On Linux, install GCC 11 or greater
- On Windows, install Visual Studio Community 2022 and select the C++ programming language during installation (Gradle can't use the build tools for Visual Studio)
- On macOS, install the Xcode command-line build tools via
xcode-select --install
. Xcode 13 or later is required.
- roboRIO C++ compiler
- Run the latest WPILib installer from here
Logging Projects
Time Plotting Script
There is a python script in the scripts
directory that will plot sysid data with respect to time. This is mainly intended for developers in the case that a dataset breaks sysid.
In order to run it, pandas and matplotlib must be installed via pip.
Then run python3 scripts/time_plots.py "file path"
to get the time plots for your desired datasets.
Matplotlib windows will appear containing the different plots.