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

add basic implementation for Shoulder code #23

Merged
merged 11 commits into from
Nov 23, 2023
Merged

Conversation

dejabot
Copy link

@dejabot dejabot commented Nov 23, 2023

Description

Basic implementation of Shoulder code.
Also cleans up some existing comments.
Next PR will integrate Shoulder with OI, to add PIDless nudges so we can test and calibrate.

How Has This Been Tested?

Not yet. Writing this in advance of having access to robot and new shoulder.

double rotations = EncoderUtils.shoulderDegreesToRotations(angle);

// set the reference point for the wrist
pidController.setReference(rotations, ControlType.kPosition, 0, ff);
Copy link
Member

Choose a reason for hiding this comment

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

here the ControlType should be kSmartMotion I believe if you want to use the other fancy things

Copy link
Author

Choose a reason for hiding this comment

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

thanks Max! agreed - we'll switch to that if/when we use it, tho keeping it at position since we're just setting P, I, D, and FF for now. we don't need the rest yet, at least for the initial version. (we ended up not needing it (at least in the time we had before CC) for the other mechanisms.)

Copy link
Author

Choose a reason for hiding this comment

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

see aa8bd25 for the history with the other mechanisms if you're curious.

Copy link
Member

Choose a reason for hiding this comment

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

I see. All looks good then, have fun fighting Jay('s linter).

Copy link
Author

Choose a reason for hiding this comment

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

Thank you!

Yeah, it's the various whitespace checks. I'll adhere to them for now, tho I actually disagree with some of them (they make code a bit harder to read), so I might make some edits to our checkstyle.xml.

When I get a chance, I'll also see if we can switch to a client-side linter (with github side checks as well), so we can check/automatically reformat code as part of the authoring process, vs the submission process. eg https://docs.wpilib.org/en/stable/docs/software/advanced-gradlerio/code-formatting.html.

@maxspier maxspier self-requested a review November 23, 2023 03:17
Copy link
Member

@maxspier maxspier left a comment

Choose a reason for hiding this comment

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

let me know when you need me to re-review after making Jay happy

@dejabot
Copy link
Author

dejabot commented Nov 23, 2023

PTAL

@dejabot dejabot merged commit 7685177 into main Nov 23, 2023
6 checks passed
@dejabot dejabot deleted the feature-add-shoulder-code branch November 23, 2023 04:22
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.

2 participants