-
Notifications
You must be signed in to change notification settings - Fork 0
anti tipping function #95
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
|
|
||
| driveTrainPitch = Units.Degrees.of( | ||
| subDrivetrain.pigeon.getPitch().getValueAsDouble()); | ||
| redAllianceMultiplier = constField.isRedAlliance() ? -1 : 1; |
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.
Is this necessary?
| driveTrainPitch = Units.Degrees.of( | ||
| subDrivetrain.pigeon.getPitch().getValueAsDouble()); | ||
| redAllianceMultiplier = constField.isRedAlliance() ? -1 : 1; | ||
| if (driveTrainPitch.gte(constDrivetrain.MAX_DRIVETAIN_PITCH) | ||
| || driveTrainPitch.lte(constDrivetrain.MIN_DRIVETRAIN_PITCH)) { | ||
|
|
||
| globalMotion.setLiftPosition(constDrivetrain.RETRACT_LIFT_PITCH); | ||
|
|
||
| } |
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.
Do we need to have this in both initialize and in execute? why or why not
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.
You need to do it constantly to make sure the robot isn't tilted too far, because its tilt can change at any moment.
| if (driveTrainPitch.gte(constDrivetrain.MAX_DRIVETAIN_PITCH) | ||
| || driveTrainPitch.lte(constDrivetrain.MIN_DRIVETRAIN_PITCH)) { | ||
|
|
||
| globalMotion.setLiftPosition(constDrivetrain.RETRACT_LIFT_PITCH); |
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.
Do set positions with the NONE group as the position
|
How do we deal with our mechanism position no longer matching our state desired position? |
| } | ||
|
|
||
| private void setLiftPosition(Distance height) { | ||
| public void setLiftPosition(Distance height) { |
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.
| public void setLiftPosition(Distance height) { | |
| private void setLiftPosition(Distance height) { |
| } | ||
|
|
||
| private void setLiftPosition(Distance height) { | ||
| public void setLiftPosition(Distance height) { |
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.
| public void setLiftPosition(Distance height) { | |
| private void setLiftPosition(Distance height) { |
|
@Tejshah88 can you address the requested changes when you get the chance? |
|
@BrodyKarr can you pull from main, resolve conflicts, and make sure its applied to both manual drive and pose driving? |
No description provided.