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
mypy
type checking to our CI setup to catch further issues.
Java
- Changed
isAutonomousEnabled
checks 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 toatTime
but 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