Skip to content

Added wristcontroller subsystem#25

Merged
Amber-leaf merged 10 commits intomainfrom
WristController
Jan 28, 2026
Merged

Added wristcontroller subsystem#25
Amber-leaf merged 10 commits intomainfrom
WristController

Conversation

@Iprobablydontknowwhatimdoing
Copy link
Contributor

No description provided.

a-mishmash
a-mishmash previously approved these changes Jan 27, 2026
Copy link
Member

@a-mishmash a-mishmash left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

probbly fine

richunger
richunger previously approved these changes Jan 28, 2026
Amber-leaf

This comment was marked as resolved.

Amber-leaf

This comment was marked as resolved.

Amber-leaf

This comment was marked as resolved.

@Iprobablydontknowwhatimdoing
Copy link
Contributor Author

Iprobablydontknowwhatimdoing commented Jan 28, 2026

wristMotor.setVoltage() should be wristMotor.set()

The docs say setVoltage is preferred:

Since feedforward voltages are physically meaningful, it is best to use the setVoltage() (Java, C++, Python) method when applying them to motors to compensate for “voltage sag” from the battery.

And in their doc on combining FeedForward with PID controls, WPILib uses setVoltage in their example:

public void tankDriveWithFeedforwardPID(double leftVelocitySetpoint, double rightVelocitySetpoint) {
  leftMotor.setVoltage(feedforward.calculate(leftVelocitySetpoint)
      + leftPID.calculate(leftEncoder.getRate(), leftVelocitySetpoint));
  rightMotor.setVoltage(feedForward.calculate(rightVelocitySetpoint)
      + rightPID.calculate(rightEncoder.getRate(), rightVelocitySetpoint));
}

https://docs.wpilib.org/en/stable/docs/software/advanced-controls/controllers/feedforward.html

@Amber-leaf
Copy link
Contributor

Amber-leaf commented Jan 28, 2026 via email

@Amber-leaf
Copy link
Contributor

Amber-leaf commented Jan 28, 2026 via email

@Amber-leaf
Copy link
Contributor

I like the new constant names though!

@Amber-leaf Amber-leaf self-requested a review January 28, 2026 23:02
@Amber-leaf Amber-leaf self-requested a review January 28, 2026 23:28
Copy link
Contributor

@Amber-leaf Amber-leaf left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

pona

@Amber-leaf Amber-leaf merged commit aea8a49 into main Jan 28, 2026
1 check passed
@Amber-leaf Amber-leaf deleted the WristController branch January 30, 2026 02:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants