-
Notifications
You must be signed in to change notification settings - Fork 0
Create arm subsystem #1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
gcschmit
left a comment
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.
Please ask questions about any of this. Referring to IO classes from this past year may be helpful as well.
|
|
||
| public default void setAngle(double angleDeg){} | ||
|
|
||
| public default double getAngle(){ |
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.
IO interfaces don't generally have accessor method (see above comment about the IOInputs class).
|
|
||
| import edu.wpi.first.wpilibj.xrp.XRPServo; | ||
|
|
||
| public interface ArmIO { |
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.
IO classes define an inner class for its IO inputs (e.g., ArmIOInputs). This class has properties for each value that is retrieved from the device. In this case, probably only the position (e.g, positionDeg).
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.
IO classes also have an updateInputs method to update the specified inputs object.
| } | ||
|
|
||
| @Override | ||
| public void zeroPosition() { |
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.
Refer to the above comments about zeroing the position of a servo.
| } | ||
|
|
||
| @Override | ||
| public double getAngle() { |
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.
Refer to above comments about accessor methods in IO classes.
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 implements a new arm subsystem using an abstraction layer with the ArmIO interface and its ArmIOMotor implementation, replacing the legacy Arm class.
- Introduces the ArmIOMotor class as a concrete implementation of ArmIO
- Creates the new arm subsystem class (Arm) that uses the ArmIO interface
- Updates RobotContainer to integrate the new arm subsystem and adjusts joystick button bindings
Reviewed Changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| src/main/java/frc/robot/subsystems/arm/ArmIOMotor.java | New motor implementation for the arm I/O |
| src/main/java/frc/robot/subsystems/arm/ArmIO.java | New interface with default methods for arm control |
| src/main/java/frc/robot/subsystems/arm/Arm.java | New subsystem class that wraps the ArmIO interface |
| src/main/java/frc/robot/subsystems/Arm.java | Removal of legacy arm implementation |
| src/main/java/frc/robot/RobotContainer.java | Updated integration with the new arm subsystem |
No description provided.