Releases: SleipnirGroup/Choreo
Choreo v2026.0.0-beta-1
Choreo v2026.0.0-beta-1
This first 2026 prerelease is mostly non-user-facing build system improvements. The changes highlighted below are not an exhaustive list, and focuses on potentially breaking changes or new workflow features.
ChoreoLib Vendordep URL (Java/C++)
https://choreo.autos/lib/ChoreoLib2026Beta.json
Though we published a Python 2026.0.0 beta 1 ChoreoLib, that still is against the last 2025 RobotPy stable release, since RobotPy has not released 2026 betas yet.
Trajectory Schema Change
The .traj schema version is now 2. This version adds an alpha parameter to the DifferentialSample: the chassis angular acceleration of the state in rad/s².
- This is exported to support better interpolation of differential samples. See the ChoreoLib section.
NOTE: Trajectories of both drive types will need to be regenerated after first being opened in this version.
ChoreoLib
All
-
ChoreoLib Java and C++ are updated to work with WPILib v2026.1.1-beta-1. ChoreoLib Python is still built against the last RobotPy stable release.
-
ChoreoLib is now hosted on the Artifactory instance shared with WPILib.
-
DifferentialSample is updated to reflect the above schema change. This is BREAKING for code that constructs DifferentialSamples directly.
-
For both SwerveSamples and DifferentialSamples, interpolation now integrates the acceleration instead of linearly interpolating all elements of the state.
Java
AutoRoutine- Removed the deprecated function. Use
anyDoneDelayed.
- Removed the deprecated function. Use
@Deprecated(forRemoval = true, since = "2025")
public Trigger anyDone(
int cyclesToDelay, AutoTrajectory trajectory, AutoTrajectory... trajectories)C++
- Removed the deprecated
kTrajSpecVersioninutil/TrajSchemaVersion.h. UsekTrajSchemaVersion.
Python
- Added FMS Usage Reporting for ChoreoTrajectory
Choreo GUI
- Choreo is now using Tauri v2 instead of v1.
- Add timestamp of last project save, in the main menu.
- Added button to save an unsaved project. This is next to the Undo and Redo buttons.
- The sidebar icon next to each path is now clickable to generate the path if it is stale.
- Added Generate All button.
What's Changed
- fix: param order in AutoFactory by @samfreund in #1193
- Fixed Incorrect game name by @SpaceStudios in #1200
- Fix angular velocity typo in C++ sample code by @dkt01 in #1203
- [trajoptlib] Rename append_vector() to append_range() by @calcmogul in #1204
- Fix redundant guard warning from clippy by @calcmogul in #1205
- [choreolib] Comment out flaky timing assertions by @calcmogul in #1206
- Fix Javadoc 21 warning and clean up generated files by @calcmogul in #1207
- [trajoptlib] Upgrade to Catch2 3.8.0 by @calcmogul in #1211
- Update readme link to examples by @calcmogul in #1218
- Fix clippy warnings by @calcmogul in #1226
- [ci] Upgrade to wpiformat 2025.33 by @calcmogul in #1225
- Fix nested if-let indentation by @calcmogul in #1227
- [ci] Upgrade sccache action by @calcmogul in #1228
- [choreo] Upgrade to Tauri v2 by @calcmogul in #489
- [trajoptlib] Use C++23 by @calcmogul in #1224
- [trajoptlib] Upgrade Sleipnir for faster solves by @calcmogul in #1223
- [trajoptlib] Give each sample its own dt by @calcmogul in #1123
- [ci] Upgrade sccache action by @Gold856 in #1231
- [trajoptlib] Rename files to snake case by @calcmogul in #1229
- [trajoptlib] Rename functions and variables to snake case by @calcmogul in #1230
- [ci] Cache cargo test artifacts by @calcmogul in #1232
- File saving overhaul: Write files immediately w/ error passback, loud feedback on saving. by @shueja in #1221
- [docs] Update compiler requirements by @calcmogul in #1234
- Use C++23 preview flag on Windows by @calcmogul in #1236
- Fix spelling of CI initialism in log by @calcmogul in #1237
- [trajoptlib] Make test executables use snake case by @calcmogul in #1238
- [trajoptlib] Fix return docs for generate() by @calcmogul in #1239
- [ci] Make cargo test do release build by @calcmogul in #1240
- Remove libgit2 dependency from build info gathering by @calcmogul in #1235
- [trajoptlib] Run C++ examples in CI by @spacey-sooty in #629
- [trajoptlib] Make more variables use snake case by @calcmogul in #1241
- [docs] Specify Visual Studio version in contributing docs by @calcmogul in #1243
- [choreolib] Integrate sample values by @spacey-sooty in #1142
- Copy WPILib's CubicHermiteSpline as a differential initial guess by @shueja in #1099
- [ci] Remove Xcode select now that new version is default by @calcmogul in #1246
- [ci] Upgrade to Xcode 16.2 for newest Sleipnir by @calcmogul in #1247
- [ci] Upgrade to prettier 3.5.3 by @calcmogul in #1248
- Upgrade mobx-react to 9.2.0 with necessary architectural changes. by @shueja in #1249
- Upgrade all dependencies by @calcmogul in #1244
- [build, ci] Switch to publishing to WPILib artifactory by @spacey-sooty in #1250
- [trajoptlib] Upgrade Sleipnir for refactored diagnostics by @calcmogul in #1251
- [trajoptlib] Upgrade Sleipnir for small_vector dependency upgrade by @calcmogul in #1256
- Add logic to backend postprocess to update event marker timestamps by @shueja in #1255
- Store variables in frontend as a map keyed by uuid by @shueja in #1254
- Upgrade Rust and Node dependencies to latest versions by @calcmogul in #1259
- [trajoptlib] Fix parameter name in Pose2.rotate_by by @spacey-sooty in #1262
- Upgrade Rust and TypeScript dependencies to latest versions by @calcmogul in #1264
- [trajoptlib] Upgrade Sleipnir for bound constraint feasibility check by @calcmogul in #1265
- [choreolib] Use Timer.getTimestamp() by @spacey-sooty in #1263
- [trajoptlib] Update Sleipnir error codes by @calcmogul in #1267
- [choreolib java] Use deferredProxy for selectedCommandScheduler by @spacey-sooty in #1268
- Add SystemCore Alpha vendordep to main for hosting by @shueja in #1276
- Add usage reporting in python by @spacey-sooty in #1278
- [docs] Remove emoji by @calcmogul in #1279
- [choreolib] Add linuxsystemcore to binary platform list by @calcmogul in #1280
- Fix dead code warnings by @calcmogul in #1266
- Fix clippy warnings about uninlined format args by @calcmogul in #1282
- Upgrade pnpm, prettier, and eslint by @calcmogul in #1283
- [trajoptlib] Upgrade to Catch2 3.8.1 by @calcmogul in #1284
- [ci] Use runner.os by @calcmogul in #1285
- [docs] Fix package name in build instructions by @calcmogul in #1286
- [docs] Update link to Tauri dependency installation instructions by @calcmogul in #1287
- [choreo] Add button to generate all trajectories by @spacey-sooty in #1291
- Upgrade to wpiformat 2025.34 by @calcmogul in #1292
- Upgrade all dependencies by @calcmogul in #1288
- [choreolib] Remove jerk from trajectory sample interpolation by @calcmogul in #1296
- [choreolib] Upgrade Gradle and Maven dependencies by @calcmogul in #1297
- Upgrade Tauri and other dependencies by @calcmogul in #1299
- U...
Choreo v2025.0.3
This release brings a few features related to variables, some new ChoreoLib AutoTrajectory Triggers, other ChoreoLib bugfixes, and internal changes.
Pose Assignment Dropdown
The waypoint configuration panel now has a searchable input to assign a pose variable to the waypoint. If you type a name that does not exist, it has an option to use the current waypoint expressions for a new pose variable.
The input does not show the last assigned variable, due to there being no waypoint-wide "assignment" property.
Pose Variable Panel Clarification
The expression fields in the pose variable list are now labeled matching the way they are accessed.
ChoreoLib
C++
- Updated trajectory schema version to be correct
Python
- Fixed several major type safety bugs.
- Switched to dataclasses for SwerveSample, SwerveTrajectory, DifferentialSample, DifferentialTrajectory, and EventMarker
- Added
mypytype checking to our CI setup to catch further issues.
Java
- Changed
isAutonomousEnabledchecks toisEnabled, allowing Choreo usage in teleop.- This does mean AutoRoutines do not automatically end on a transition from auto directly to teleop (a nearly sim-only situation).
- However, if using
RobotModeTriggers.autonomous().whileTrue()or the default templategetAutonomousCommand(), those have mechanisms to end the routine when autonomous ends.
- Added
AutoRoutine.idle(), returning a Trigger that goes false at the start and true at the end of everyroutine.trajectory.cmd()command.idle()can be true when the routine is not being polled. - Deprecated
AutoRoutine.anyDone(...)in favor ifAutoRoutine.anyDoneDelayed(...)with identical usage. - Added
AutoRoutine.allInactive(AutoTrajectory, AutoTrajectory...), returning a Trigger that is true when none of the provided trajectories are running, but the routine is still being polled. AutoTrajectory: New Triggers, which standardize on seconds instead of cycles for delays.- Deprecated
done(int cycles). - Added
doneDelayed(double seconds)which rises to true a given time after the trajectory ends and falls on the next robot cycle. - Added
doneFor(double seconds)which rises to true when the trajectory ends and falls after a given time. - Added
recentlyDone()which rises to true when the trajectory ends and falls when another begins. - Added
atTimeBeforeEnd(double timeBeforeEnd)which is similar toatTimebut offsets from the end of the trajectory.
- Deprecated
AutoTrajectory: Other new features- Added
chain(AutoTrajectory other)which is shorthand for.done().onTrue(other.cmd()) - Added
spawnCmd()which schedules the.cmd()and ends instantly.- This is useful for ending a command group, such as:
- Added
firstTrajectory.done().onTrue(
Commands.sequence(
score(), // Requiring intake
secondTrajectory.spawnCmd() // secondTrajectory triggers an intake command
)
);Without the secondTrajectory being scheduled separately from the sequence, it will be part of the sequence, which has all the requirements of score(), specifically the intake. This would lead to the sequence being cancelled when secondTrajectory triggers another intake command.
What's Changed
- Add scripts to update the trajectory and project schemas across the repository by @shueja in #1179
- [trajoptlib] Use LLVM sanitizers by @calcmogul in #1181
- [trajoptlib] Simplify callback code by @calcmogul in #1180
- [trajoptlib] Upgrade to fmt 11.1.3 by @calcmogul in #1184
- Fix errors found in mypy and add mypy to CI by @shueja in #1185
- [choreolib] Added more triggers by @oh-yes-0-fps in #1159
- [ci] Add pull request labeler by @spacey-sooty in #1189
- [choreolib] Change auto checks to enabled by @oh-yes-0-fps in #1186
- Add a dropdown for assigning a pose variable to a waypoint by @shueja in #1162
- Clarify pose variable accessors in variables panel by @shueja in #1191
- Update version numbers to 2025.0.3 by @shueja in #1182
Full Changelog: v2025.0.2...v2025.0.3
Choreo v2025.0.2
This release brings critical fixes to ChoreoLib in all three languages and usability improvements in the UI. We also now build the UI and CLI for Linux aarch64.
New Tips and Tricks
- Disable or delete the default field border Keep In Rect constraint on any paths that do not need it. Especially on simpler paths, it has been shown to significantly affect generation time. In this update, the constraint is disabled by default.
ChoreoLib Python
BREAKING: .chor files need to be saved in
[project root]/deploy/choreonow. Docs here have been updated to match.
- Fixed a bug with
load_trajectory()requiring absolute paths. After doing the above file move, use the trajectory name alone, such aschoreo.load_trajectory("testPath")to load[project root]/deploy/choreo/testPath.traj.
ChoreoLib C++
- Fixed several compilation errors, so the C++ library is usable now.
ChoreoLib Java
- Fixed behavior of
AutoFactory.trajectoryCmd(...). It is now a command that requires the drivetrain, so can be used in sequence withresetOdometryas intended. - Fixed an issue with the
AutoTrajectory.done()Trigger where it would sometimes not switch true at the end of the trajectory, especially when running the trajectory a second time.
Choreo GUI
- Fixed a bug where a zero-max-angular-velocity constraint between a pose and translation waypoint would fail in a way that required manual correction beyond undoing that setup.
- Fixed an issue with two identical waypoints in sequence, which would cause an error about "nonfinite cost or constraints". Both waypoints now constrain the same sample in the path. This situation is not recommended, but is intended to at least generate if the constraints are compatible.
- Fixed an issue with variables that depend on other variables. This would cause a UI crash if the dependency variable was deleted. Now it shows the depending variable as an invalid input.
- Variables in the variable panel are now visually sorted alphabetically, but still separated between standalone variables and pose variables.
- Fixed an issue with the icons in the path list, where trajectories would be incorrectly shown as out-of-date upon opening a project.
- Added a Generate All Outdated button above of the path list, next to the Add Path and Duplicate Path buttons.
- The Keep In Rect constraint for the field borders is disabled in new paths. For paths that do not get near the wall, the constraint is an unnecessary performance hit.
File Format
No breaking changes. However, the .chor variables section is now always saved in alphabetical order by variable name. Previously it was nondeterministic and changed almost every time a variable was modified. This change should reduce lines changed in source control diffs.
What's Changed
- Upgrade Rust and Node dependencies by @calcmogul in #1137
- [trajoptlib] Upgrade Sleipnir for faster autodiff and less memory usage by @calcmogul in #1136
- [trajoptlib] Upgrade Sleipnir for more efficient sparsity logging by @calcmogul in #1138
- [choreolib] Use getDeployDirectory() prefix in Python by @calcmogul in #1139
- [trajoptlib] Upgrade Sleipnir to shrink the C++20 patch by @calcmogul in #1140
- Update docs for fix to Python choreo directory by @shueja in #1141
- [trajoptlib] Upgrade to fmt 11.1.2 by @calcmogul in #1143
- Fix linear acceleration gradient color by @calcmogul in #1144
- [trajoptlib] Upgrade Sleipnir for second-order correction diagnostics by @calcmogul in #1145
- [choreolib] Fix JDK 21 Javadoc errors by @calcmogul in #1148
- [choreolib] Fix compilation error in Trajectory::GetTotalTime() by @calcmogul in #1149
- [choreo] Fix generation failure for zero angular velocity constraint between pose and translation waypoints by @bruingineer in #1150
- [choreolib] Set default year for sample flip by @calcmogul in #1156
- [choreolib] fix
trajectoryCmdby @oh-yes-0-fps in #1160 - [choreolib] fixes an issue with rerun trajectories not triggering done correctly by @oh-yes-0-fps in #1163
- Expressions referencing missing variables now evaluate to undefined. by @shueja in #1165
- [ui] Add a "Generate All Outdated" button by @shueja in #1151
- Build for Linux aarch64 by @calcmogul in #1158
- Sort variables alphabetically by @shueja in #1154
- [ui] Update staleness indicator when deserializing paths by @shueja in #1152
- Move pose variable panel dropdown to right side to clarify purpose by @shueja in #1166
- [choreo] In-rect-off-by-default by @oh-yes-0-fps in #1168
- [choreo] Sorted-vars by @oh-yes-0-fps in #1167
- [trajoptlib] [choreolib] Fix bugs preventing 0 samples between waypoints by @shueja in #1171
- Update versions to v2025.0.2 by @shueja in #1170
- choreolib/py: Add PEP 561 marker by @auscompgeek in #1172
- choreolib/py: Avoid wpilib import at build time by @auscompgeek in #1173
- Fix artifact names of aarch64 artifacts by @shueja in #1176
New Contributors
- @auscompgeek made their first contribution in #1172
Full Changelog: v2025.0.1...v2025.0.2
Choreo v2025.0.1
These notes will be replaced by a larger announcement post soon. The below is meant for users upgrading from 2025 beta.
ChoreoLib
ChoreoLib is now in the WPILib vendor dependencies panel, which is now the recommended way to install it. The vendordep URL https://lib.choreo.autos/dep/ChoreoLib2025.json.
There are no ChoreoLib changes between 2025.0.0 and 2025.0.1.
Major Changes since Beta 9
- 2025 field
- Thanks to @mjansen4857 for giving us a copy of the PathPlanner field background to adapt for Choreo.
- Trajectories will be rotated around the field center, but retain a blue origin.
- If upgrading paths, note that the default Keep In Rectangle dimensions need to be updated manually. Use a width of
17.548 mand a height of8.052 m
- Unitless values are no longer accepted and autofilled with a default unit in expression inputs.
- Variable names can be used without parentheses; a bugfix corrected this for
.x,.y, and.headinginside pose variables. - In the list of paths, a generate button replaces the normal icon if the path is different than what was last generated.
- This mechanic is why the .traj files include a
snapshotsection.
- This mechanic is why the .traj files include a
- AutoBindings
- Removed from the AutoFactory constructor and made package-private.
- Use
AutoFactory.bind(String eventName, Command command)instead, which now returns theAutoFactoryfor chaining.
AutoTrajectory.resetOdometry()is added, as a replacement toAutoRoutine.resetOdometry(AutoTrajectory), which no longer exists.- AutoChooser
- We intend to ensure that the command creator functions are only run when the alliance is correct. Thus:
- Changing alliance will re-run the creator.
- In simulation only, going directly from Disconnected to Autonomous for the first run will generate the command on
autonomousInit. In real life, the auto will stop with a dashboard alert, since this is an unrealistic scenario.
- Many bugs with the library and the UI have been fixed.
Choreo v2025.0.0
ARCHIVED.
The GUI is broken, but the vendordep is (to our knowledge) usable for building projects against WPILib's stable 2025 release.
These notes will be replaced by a larger announcement post soon. The below is meant for users upgrading from 2025 beta.
Use the vendor dependencies panel in VS Code (recommended) or the URL https://lib.choreo.autos/dep/ChoreoLib2025.json
Major Changes since Beta 9
- 2025 field
- Thanks to @mjansen4857 for giving us a copy of the PathPlanner field background to adapt for Choreo.
- Trajectories will be rotated around the field center, but retain a blue origin.
- If upgrading paths, note that the default Keep In Rectangle dimensions need to be updated manually. Use a width of
17.548 mand a height of8.052 m
- Unitless values are no longer accepted and autofilled with a default unit in expression inputs.
- Variable names can be used without parentheses; a bugfix corrected this for
.x,.y, and.headinginside pose variables. - In the list of paths, a generate button replaces the normal icon if the path is different than what was last generated.
- This mechanic is why the .traj files include a
snapshotsection.
- This mechanic is why the .traj files include a
- AutoBindings
- Removed from the AutoFactory constructor and made package-private.
- Use
AutoFactory.bind(String eventName, Command command)instead, which now returns theAutoFactoryfor chaining.
AutoTrajectory.resetOdometry()is added, as a replacement toAutoRoutine.resetOdometry(AutoTrajectory), which no longer exists.- AutoChooser
- We intend to ensure that the command creator functions are only run when the alliance is correct. Thus:
- Changing alliance will re-run the creator.
- In simulation only, going directly from Disconnected to Autonomous for the first run will generate the command on
autonomousInit. In real life, the auto will stop with a dashboard alert, since this is an unrealistic scenario.
- Many bugs with the library and the UI have been fixed.
What's Changed
- Clear .chor variables list when deserializaing by @shueja in #1055
- [trajoptlib] Reset differential cancellation flag by @calcmogul in #1058
- Rename LocalProgressUpdate::DiffTrajectory to DifferentialTrajectory, fixing mismatch with TS by @shueja in #1059
- Make rounding of trajectory sample fields normalize -0.0 to 0.0 by @shueja in #1062
- [ci] Upgrade to wpiformat 2024.51 by @calcmogul in #1064
- Simplify logic when receiving a successful generation in UI by @shueja in #1065
- [docs] Fix annotations in ChoreoLib Trajectory API documentation by @bryceroethel in #1069
- Add docs build instructions by @DeltaDizzy in #1052
- Remove numbers as valid input for dimensioned exprs by @shueja in #1067
- [docs] Update home page screenshot by @spacey-sooty in #1040
- [docs] Document Settings Improvements by @DeltaDizzy in #1068
- [docs] Fix requirements.txt by @bryceroethel in #1071
- [choreolib] AutoChooser Fixes and Sim behavior changes by @oh-yes-0-fps in #1057
- Fix controllers in getting started docs by @spacey-sooty in #1077
- [Choreolib] cleaned up various parts of the non-user facing code by @oh-yes-0-fps in #1048
- Add Python script for updating field dimensions across the project by @shueja in #1079
- Make AutoBindings package private by @spacey-sooty in #1076
- Clear undo history when opening a project. by @shueja in #1074
- [docs] Fix formatting of Auto Bindings section by @bryceroethel in #1083
- Use autogenerated field dimensions in default keep-in rectangle by @shueja in #1085
- [trajoptlib] Fix keep-out polygon distance by @calcmogul in #1086
- Remove dimension tooltips by @shueja in #1075
- Simpler ExpressionInput internals by always showing the same internal variable. by @shueja in #1073
- Directly depend on global variables store in expression stores by @shueja in #1084
- Add a way to clear the path list that properly sets activePath to default by @shueja in #1082
- [docs] Update saving page by @shueja in #1089
- [docs] Remove broken link to motor calculator docs by @shueja in #1091
- [docs] Update the view options page by @shueja in #1090
- [trajoptlib] Upgrade Sleipnir by @calcmogul in #1094
- Display a different icon if the trajectory is changed since being generated by @shueja in #1093
- Refactor path gradients and make them properly support diff drive by @calcmogul in #1095
- [trajoptlib] Clean up InputModulus() by @calcmogul in #1096
- [trajoptlib] Use direct collocation for diff drive dynamics constraints by @calcmogul in #1097
- [trajoptlib] Upgrade to fmt 11.1.1 by @calcmogul in #1098
- Remove file associations for STL headers by @calcmogul in #1100
- [trajoptlib] Normalize Rotation2d constructor arguments by @calcmogul in #1101
- [choreolib] Fix SwerveSample docs typo by @calcmogul in #1103
- [trajoptlib] Const-qualify solution passed to callback by @calcmogul in #1105
- [trajoptlib] Remove anti-tunneling constraint by @calcmogul in #1109
- Give AutoFactory.trajectoryCmd() an actual routine that runs by @shueja in #1110
- [trajoptlib] Hoist decision variables out of nested loops by @calcmogul in #1113
- [choreolib] Rename Alerts group to Choreo Alerts by @spacey-sooty in #1112
- Restore document from snapshot if project opening fails by @shueja in #1081
- Fix bug preventing "pose.x" from being transformed by @shueja in #1087
- Editing paths docs by @spacey-sooty in #1039
- 2025 Update: field and WPILib by @shueja in #1107
- Alert QoL + Docs updates by @Daniel1464 in #1111
- Update version to v2025.0.0 by @shueja in #1114
Full Changelog: v2025.0.0-beta-9...v2025.0.0
Choreo v2025.0.0-beta-9
This is a fix to the Choreo GUI only. It fixes an issue with Choreo exporting the wrong trajectory schema version.
ChoreoLib 2025.0.0-beta-9 is published, but is identical to beta 8.
Choreo v2025.0.0-beta-8
Choreo v2025.0.0-beta-8
Please read through the post entirely, since many breaking changes have been made.
This release focuses on internal infrastructure and breaking API improvements in ChoreoLib.
v2025.0.0-beta-8 is built for WPILib beta 3. It is likely mostly identical to the first full 2025 release of Choreo, which will be released after the WPILib full 2025 release.
NOTE: This changelog describes changes since beta-6.
https://choreo.autos : New Docs Domain
We recently registered the domain choreo.autos to replace sleipnirgroup.github.io/Choreo. We have set up the latter to redirect to the former. Documentation is still being updated over the coming weeks before kickoff.
Document Schemas and Auto Upgrade
The version control in the .chor and .traj schemas is no longer a semver string. It is now an integer, starting at 1, and is different for .traj and .chor. A string in the version key is interpreted as version 0.
The Choreo app is able to automatically load non-current versions of both files (including existing files from beta-6) and upgrade them to the current schema. Usually, this will require regeneration, depending on the changes in the update.
This is a feature Choreo had in 2024, but it has been completely reimplemented.
For contributors, a guide to defining new schema versions has been added here.
The three ChoreoLib languages will not automatically upgrade old trajectories when reading them.
Removal of C++ AutoFactory API
Unfortunately, we found many severe bugs in our port of the Java AutoFactory API to C++, and decided to delete that attempt. We apologize for the inconvenience.
ChoreoLib Changes (Mostly Breaking)
See below for details on these changes.
General
- Changes to how Choreo handles alliance flipping. See below.
- Many bugs with the sample flipping algorithms have been fixed.
- ChoreoLib no longer reads the .chor file to know what sample type to expect, or what the differential track width is, as needed for
DifferentialSample.getChassisSpeeds(). This information is now in the .traj file. Details below.
Raw API
Trajectory
- [Java]
Trajectory.getInitialSample(),getFinalSample(),getInitialPose(),getFinalPose(),sampleAt()now returnOptional<Pose2d>instead of a potentially nullPose2d. This matches prior behavior of the other two languages (C++ withstd::optionaland Python with returningNone) - [C++]
Trajectory::GetInitialState()is nowGetInitialSample(). - [Java, C++]
Trajectory.getInitialSample()/GetInitialSample()andgetFinalSample()/GetFinalSample()now take abooleanparameter that is true if the sample should be returned flipped. This does not check the current alliance; if the parameter is true, the sample will be flipped. - [Java]
Trajectory.sampleArray()has been removed due to causing runtime crashes and being type-unsafe.
ProjectFile
Removed, since it is no longer needed.
DifferentialSample
A new field omega was added, instead of calculating angular velocity from vl, vr and the trackwidth from the robot config in the .chor file.
Java Auto API
- Driver Station warnings from ChoreoLib have moved to use the new Alerts API.
New Recommended Practices
- The
AutoRoutine.trajectory(String name)has been added and is the new recommended way to loadAutoTrajectories, instead ofAutoFactory.trajectory(String name, AutoRoutine routine). Trigger AutoRoutine.observe(BooleanSupplier condition)has been added. This can be used to create Triggers that are part of theAutoRoutineand will only be polled during the routine. It can also be used to "sanitize" Triggers that are used elsewhere. See below for details on why this is necessary.- To help handle odometry resetting when the start pose depends on alliance, AutoFactory and AutoTrajectory now have
resetOdometrycapability. More details in the changelog just below.
AutoLoop
choreo.auto.AutoLoopis nowchoreo.auto.AutoRoutine.AutoFactory.newLoop()andvoidLoop()were renamed tonewRoutine()andvoidRoutine().
AutoRoutine.cmd()will end immediately with a console warning if alliance flipping is enabled and the alliance is not known on command initialize.AutoLoop.enabled()was replaces withAutoRoutine.active().AutoLoop.poll()will return immediately if the alliance is needed for flipping and not known. This is the same behavior as ifpoll()is called on a killed routine, or not while enabled and in autonomous.Trigger anyDone(AutoTrajectory... trajectories)has been added, which creates a trigger that is true for one cycle when any of the input trajectories finishes. A variant also exists that applies a delay to the rising edge.Trigger anyActive(AutoTrajectory... trajectories)creates a trigger that is true whenever any input trajectory is active.
AutoTrajectory
AutoTrajectory.done()behavior has changed. The trigger will become true for one cycle when the trajectory completes without being interrupted. Previously, interrupted trajectories would still fire thedone()trigger.AutoTrajectory.getInitialPose()andgetFinalPose()will now returnOptional.empty()if alliance flipping is enabled and the alliance is not known.- Removed
AutoTrajectory.atTimeAndPlace(). Usetrajectory.atTime(String eventName).and(trajectory.atPose(String eventName))or similar. AutoTrajectory.atPose(...)did not check the rotation portion of the pose.atPose(...)now takes a rotation tolerance (default 3 degrees).- For the previous behavior of just checking the translation,
AutoTrajectory.atTranslation()has been added, which is similar toatPose()but acceptsTranslation2ds. AutoTrajectory.atPose(...)andatTranslation(..)now properly flip the target pose/translation every time the Trigger is checked, based on the current alliance if alliance flipping is enabled. If the alliance is unknown and flipping is enabled, the Trigger will be false.AutoTrajectory.collectEventPosesnow returns anArrayList<Supplier<Optional<Pose2d>>>of poses that flip based on the current alliance and flipping enabled status.
AutoFactory
- The Choreo controller function now only takes a
SwerveSampleorDifferentialSample, not an additionalPose2dfor the current pose. AutoFactory.clearCache()was replaced withAutoFactory.cache().clear()since the user can now access the trajectory cache.- A new parameter
Consumer<Pose2d> resetOdometryhas been added. This is used withAutoTrajectoryto create aCommandthat calls theresetOdometrycallback with the first pose of trajectoryCommand()has been renamed totrajectoryCmd()trajectoryLoggeris no longer anOptional. It is a no-op if left unspecified.
AutoChooser
-
AutoChoosernow implementsSendable, so can be logged withSmartDashboard.putData()or similar. -
The API to add options has changed.
- One option is to call
addRoutine(String name, Supplier<AutoRoutine> generator). - The other is to call
addCmd(String name, Supplier<Command> generator). - Both versions will call the given function when the option becomes selected.
- One option is to call
-
AutoChooser's options are now functions that consume nothing and return anAutoRoutineor aCommand. It is expected that users will call to theirAutoFactoryinstance like they would a subsystem, instead of having it passed into the function. -
The constructor is now
new AutoChooser(), since the table name is handled by logging it like aSendable, and the chooser does not need to pass a factory into the generator functions. -
AutoChooser.getSelectedAutoRoutine()has been removed. -
To run the selected auto, use
Command selectedCommand()orCommand selectedCommandScheduler().
- The former is the analogue to the
SendableChooserapproach of getting the selected command and directly scheduling it inautonomousInit(). - The latter returns a deferred Command. Use this if binding autonomous commands to run on
autonomousInit()withRobotModeTriggers.autonomous(), since it does not evaluate the selected command as of the time of binding.
AutoChooserwill only update if the DriverStation is connected (so that the alliance is known).
Changes to alliance-based trajectory flipping
Several issues were identified with the way ChoreoLib, especially the Java higher-level API, handled alliance flipping, given that the alliance can change after auto routines are created, and the alliance can be unknown before the call of autonmousInit.
- The higher-level API now uses
Optional<Pose2d>andSupplier<Optional<Pose2d>>instead ofPose2din many places, to better represent poses that depend on the currently selected alliance. AutoFactory/Choreo.createAutoFactoryno longer take aBooleanSupplier mirrorTrajectorythat returns true when trajectories should be flipped. Instead they take aBooleanSupplier useAllianceFlippingto enable alliance-based flipping in general and a separateSupplier<Optional<Alliance>>that defaults toDriverStation::getAlliance(). The BooleanSupplier was moved elsewhere in the parameter list to force a compiler error.
Trigger Sanitization
AutoRoutine.observe was added to help prevent problems where a Trigger on the default CommandScheduler loop is used when creating an AutoRoutine. This is especially easy to mess up when that Trigger is combined with a Trigger on the AutoRoutine event loop, using decorators like .and(), .or(), etc.
Combined Triggers are polled on the first Trigger's loop. Thus if the default-loop Trigger is first in a combination, the combined trigger will be polled every loop, even if the auto routine is not running and has not been run.
Example:
Pose2d shotLocation = ...;
// trajec...Choreo v2025.0.0-beta-6
What's Changed
- Document release process by @calcmogul in #873
- Expand docs for estimating moment of inertia with SysId by @calcmogul in #875
- [choreo] Change default dt to 0.05 s by @calcmogul in #878
- [choreolib] Remove unused libraries and upgrade to 2025 NI libraries by @calcmogul in #879
- [choreolib] Fix swerve module force mirroring by @calcmogul in #877
- [choreolib] Upgrade to GSON 2.11.0 by @calcmogul in #874
- Bump version to v2025.0.0-beta-6 by @calcmogul in #880
Full Changelog: v2025.0.0-beta-5...v2025.0.0-beta-6
Choreo v2025.0.0-beta-5
What's Changed
- Rename macOS standalone executable by @calcmogul in #870
- Bump version to v2025.0.0-beta-5 by @calcmogul in #871
Full Changelog: v2025.0.0-beta-4...v2025.0.0-beta-5
Choreo v2025.0.0-beta-4
This is the first release that requires the WPILib 2025 beta and 2025 roboRIO image.
What's Changed
- Update C++ Autonomous Functionality by @r4stered in #849
- [choreolib] Fix trajectory splitting for C++ by @r4stered in #866
- [ci] Zip standalone executables by @calcmogul in #868
- [choreolib] Upgrade to WPILib 2025 by @calcmogul in #865
- Bump version to v2025.0.0-beta-4 by @spacey-sooty in #869
Full Changelog: v2025.0.0-beta-3...v2025.0.0-beta-4


