Repository navigation
Add Max Angular Acceleration constraint - #1533
Closed
JathinBMAVS wants to merge 1 commit into
Closed
JathinBMAVS wants to merge 1 commit into
JathinBMAVS wants to merge 1 commit into
Conversation
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.
Author
|
Closing in favor of #1537, which is the same change opened from my personal account. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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
AngularAccelerationMaxMagnitudeConstraint(mirrorsAngularVelocityMaxMagnitudeConstraintbut boundsangular_acceleration), added to theConstraintvariant, pluswpt_/sgmt_angular_acceleration_max_magnitudeonPathBuilderand through the Rust FFI for both generators.ConstraintData::MaxAngularAcceleration { max }and generation wiring for swerve and differential.AngAccdimension, default0 rad/s^2to match the other Max constraints) and an empty field overlay entry.docs/usage/editing-paths.md.Notes
docs/media/constraint_navbar.png) doesn't include the new icon yet.Testing
cargo clippy -- -D warnings,cargo fmt, wpiformat, tsc, eslint, prettier passtest-jsons/trajectory/3/swerve.trajwithchoreo-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)