Merged
Conversation
…rely well, but that's more a matter for feat/swerve-drive-tuning or something)
Closed
Collaborator
Author
|
Also note we fixed the cosine error limit thing (although I'm not really sure how well it works) and temporarily disabled inverting the wheels whenever error >100 degrees for testing, need to add that back in |
jkleiber
reviewed
Mar 20, 2023
Contributor
jkleiber
left a comment
There was a problem hiding this comment.
comments about deadbands
Comment on lines
153
to
156
| // if strafe is very small | ||
| if (abs(final_strafe) < 0.15) { | ||
| final_strafe = 0.0; // then zero it | ||
| if (abs(strafe) < 0.15) { | ||
| strafe_ = 0.0; // then zero it | ||
| } |
Contributor
There was a problem hiding this comment.
Why don't we have a similar deadband for drive power?
Contributor
There was a problem hiding this comment.
Consider this link as well for an "outer deadband" (also linked in that swerve doc): http://blog.hypersect.com/interpreting-analog-sticks/
Comment on lines
+192
to
+195
| OKC_CALL(TeamOKC::WrapAngle(&left_front_turn)); | ||
| OKC_CALL(TeamOKC::WrapAngle(&left_back_turn)); | ||
| OKC_CALL(TeamOKC::WrapAngle(&right_front_turn)); | ||
| OKC_CALL(TeamOKC::WrapAngle(&right_back_turn)); |
Contributor
There was a problem hiding this comment.
Why are we duplicating the lines above this?
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Makes the teleop swerve drive code be field-oriented for a better driving experience. First driver has tested it and says it is a definite improvement. I've tested it and it works, although we haven't taken any hits yet. Could use some tuning