Skip to content
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

onboarding #75

Open
wants to merge 14 commits into
base: main
Choose a base branch
from
Open

onboarding #75

wants to merge 14 commits into from

Conversation

dannynotsmart
Copy link
Member

onboarding

currently has rev swerve only, talon onboarding will be added soon

@Yxhej Yxhej self-requested a review May 30, 2024 01:23

@Override
public void setDriveSetpoint(double velocity) {
drivePID.setReference(velocity, ControlType.kVelocity);
Copy link
Member

@Yxhej Yxhej May 30, 2024

Choose a reason for hiding this comment

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

No feedforward is used in closed-loop control currently. It can be added using the overloaded method

    public REVLibError setReference(
      double value, CANSparkBase.ControlType ctrl, int pidSlot, double arbFeedforward)

with the feedforward value being calculated with WPILIB's class.

public void setTurnSetpoint(double angle) {}

@Override
public void updateSetpoint(SwerveModuleState setpoint, ControlMode mode) {
Copy link
Member

Choose a reason for hiding this comment

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

Sim should follow the same logic as the rest of the modules, and we both know that rev's onboarding pid code could never be this complex

src/main/java/org/sciborgs1155/robot/drive/SimModule.java Outdated Show resolved Hide resolved
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