Skip to content
This repository was archived by the owner on Jan 17, 2026. It is now read-only.

Conversation

@spacey-sooty
Copy link
Member

Resolves #95
Resolves #96
Resolves #94

@spacey-sooty spacey-sooty requested a review from a team as a code owner May 26, 2025 13:00
@spacey-sooty spacey-sooty force-pushed the jade/implement-motion-magic branch 4 times, most recently from 3a59457 to 1aec0ef Compare May 27, 2025 02:00
@spacey-sooty spacey-sooty requested a review from Copilot May 28, 2025 02:59
Copy link

Copilot AI left a 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));

@spacey-sooty spacey-sooty force-pushed the jade/implement-motion-magic branch 2 times, most recently from 28e96ba to 97b38f6 Compare May 28, 2025 03:50
@spacey-sooty spacey-sooty force-pushed the jade/implement-motion-magic branch 2 times, most recently from c5bfbba to 35d5aa1 Compare June 22, 2025 14:58
@spacey-sooty spacey-sooty force-pushed the jade/implement-motion-magic branch from 35d5aa1 to 816a7d4 Compare July 11, 2025 07:28
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Move elevator to handle controls in IO layer Switch elevator units to use seconds Switch elevator to motion magic

2 participants