Skip to content

Add Max Angular Acceleration constraint - #1533

Closed
JathinBMAVS wants to merge 1 commit into
SleipnirGroup:mainfrom
JathinBMAVS:max-angular-acceleration-constraint
Closed

JathinBMAVS wants to merge 1 commit into
SleipnirGroup:mainfrom
JathinBMAVS:max-angular-acceleration-constraint

Conversation

@JathinBMAVS

Copy link
Copy Markdown

Adds a Max Angular Acceleration constraint (waypoint and segment scope, swerve and differential), the angular counterpart to the existing Max Acceleration constraint. It bounds the chassis angular acceleration to [-max, max], which is useful for limiting how hard the robot whips its heading around (e.g. to keep game pieces seated or to keep a turret/shooter stable).

Changes

  • trajoptlib: new AngularAccelerationMaxMagnitudeConstraint (mirrors AngularVelocityMaxMagnitudeConstraint but bounds angular_acceleration), added to the Constraint variant, plus wpt_/sgmt_angular_acceleration_max_magnitude on PathBuilder and through the Rust FFI for both generators.
  • src-core: new ConstraintData::MaxAngularAcceleration { max } and generation wiring for swerve and differential.
  • UI: constraint definition (AngAcc dimension, default 0 rad/s^2 to match the other Max constraints) and an empty field overlay entry.
  • Docs: added to the constraint list in docs/usage/editing-paths.md.

Notes

  • Like Max Acceleration, this constraint can noticeably increase solve time on long segments.
  • No schema version bump: this only adds a new constraint variant.
  • The constraint navbar screenshot (docs/media/constraint_navbar.png) doesn't include the new icon yet.

Testing

  • cargo clippy -- -D warnings, cargo fmt, wpiformat, tsc, eslint, prettier pass
  • Used on a real robot: FRC team 6773 ran autos built with this constraint on its competition robot throughout the 2026 REBUILT season, and it behaved as expected
  • Generated test-jsons/trajectory/3/swerve.traj with choreo-cli, adding Max Angular Acceleration = 2 rad/s² over the whole path: peak |α| went from 21.1 rad/s² (without the constraint) to 1.9997 rad/s², and the duration went from 1.20 s to 2.50 s, which matches the bang-bang minimum time for its 180° heading change (2·√(π/2) ≈ 2.51 s)

Adds a constraint that bounds the chassis angular acceleration to
[-max, max], the angular counterpart to Max Acceleration. It supports
waypoint and segment scope for both swerve and differential drivetrains.
@github-actions github-actions Bot added component: documentation Improvements or additions to documentation component: ui UI frontend component: backend Rust/Tauri backend component: trajoptlib TrajoptLib labels Oct 17, 2026
@JathinBMAVS

Copy link
Copy Markdown
Author

Closing in favor of #1537, which is the same change opened from my personal account.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

component: backend Rust/Tauri backend component: documentation Improvements or additions to documentation component: trajoptlib TrajoptLib component: ui UI frontend

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant