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

Superstructure #2

Merged
merged 22 commits into from
Feb 29, 2024
Merged

Superstructure #2

merged 22 commits into from
Feb 29, 2024

Conversation

suhaank077
Copy link
Member

@suhaank077 suhaank077 commented Feb 15, 2024

superstructure v1 edits (intake code)

yashgupta-17 and others added 6 commits February 10, 2024 15:26
We worked on this. This is our first version. We think that we included all the necessary functions (looked at 2022 for reference).

- Suhaan and Jake
Copy link
Member

Choose a reason for hiding this comment

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

follower_.restoreFactoryDefaults();
follower_.setInverted(false);
follower_.setIdleMode(CANSparkMax.IdleMode.kCoast);

Copy link
Member

Choose a reason for hiding this comment

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

Add follower_.follow(leader_);

Suggested change
follower_.follow(leader_);

io_.current = follower_.getOutputCurrent();

if (io_.wants_zero) {
io_.wants_zero = false;
Copy link
Member

Choose a reason for hiding this comment

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

fix indentation


// Constants
private static final class Constants {
public static final double kTolerance = 0; // NEED TO UPDATE
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
public static final double kTolerance = 0; // NEED TO UPDATE
public static final double kTolerance = 0.5; // NEED TO UPDATE

Copy link
Member

Choose a reason for hiding this comment

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

I don't think we need a Position way to do the climber set percent should work just fine and maybe we can use PID with trapezoidal to ensure smooth acceleration and movement

}

//get, set % output on intake. parameter is percent output [-1, 1]
public void setIntakePercent(double value) {
Copy link
Member

Choose a reason for hiding this comment

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

getter methods should be before the setter

}

//get, set % output on intake. parameter is percent output [-1, 1]
public void setIntakePercent(double value) {
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
public void setIntakePercent(double value) {
public void setPercent(double value) {

Simplify method names (for get method as well) because when we call it in superstructure.java we're gonna have the intake object already. intake_.setPercent(value);

Copy link
Member

@AyushSagar16 AyushSagar16 left a comment

Choose a reason for hiding this comment

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

Overall good progress, I have left some comments. I did not get time to test the simulation but I will take a look soon.

Some overarching things: make sure to format the file well (low importance).

@AyushSagar16
Copy link
Member

LGTM

@AyushSagar16 AyushSagar16 merged commit 0df5905 into main Feb 29, 2024
2 checks passed
@AyushSagar16 AyushSagar16 deleted the superstructure branch March 10, 2024 15:47
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