This repository was archived by the owner on Jan 17, 2026. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
[elevator] Motion profiling and misc refactoring #117
Open
spacey-sooty
wants to merge
7
commits into
master
Choose a base branch
from
jade/implement-motion-magic
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Conversation
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
3a59457 to
1aec0ef
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR refactors elevator subsystem code and introduces a motion profiling approach using feedback analysis with LQR and trapezoid profile constraints. Key changes include:
- Addition of a new FeedbackAnalysis utility for computing optimal gains.
- Transition from rotation‐based units to metre‐based units for elevator position and velocity.
- Updates to elevator command interfaces and simulation code to support motion profiling.
Reviewed Changes
Copilot reviewed 9 out of 9 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| src/main/java/org/curtinfrc/frc2025/util/FeedbackAnalysis.java | New utility class for LQR-based feedback gain calculations. |
| src/main/java/org/curtinfrc/frc2025/subsystems/elevator/ElevatorIOSim.java | Updated simulation code to use metres and integrate a motion profile. |
| src/main/java/org/curtinfrc/frc2025/subsystems/elevator/ElevatorIOComp.java | Refactored control configuration and unit conversions with new conversion methods. |
| src/main/java/org/curtinfrc/frc2025/subsystems/elevator/ElevatorIO.java | Updated interface to reflect the new unit conventions. |
| src/main/java/org/curtinfrc/frc2025/subsystems/elevator/Elevator.java | Refactored setpoint handling and command generation with improved logging. |
| src/main/java/org/curtinfrc/frc2025/Robot.java, Constants.java, Autos.java | Updated imports and constants to align with the new elevator API and simulation mode. |
Comments suppressed due to low confidence (1)
src/main/java/org/curtinfrc/frc2025/subsystems/elevator/ElevatorIOSim.java:55
- Consider extracting the hard-coded time interval (0.02) into a named constant to ensure consistency across simulation updates and improve maintainability.
var setpoint = profile.calculate(0.02, currentState, new TrapezoidProfile.State(positionMetres, 0));
src/main/java/org/curtinfrc/frc2025/subsystems/elevator/ElevatorIOComp.java
Outdated
Show resolved
Hide resolved
28e96ba to
97b38f6
Compare
c5bfbba to
35d5aa1
Compare
Signed-off-by: Jade Turner <[email protected]>
Signed-off-by: Jade Turner <[email protected]>
Signed-off-by: Jade Turner <[email protected]>
35d5aa1 to
816a7d4
Compare
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
Resolves #95
Resolves #96
Resolves #94