-
Notifications
You must be signed in to change notification settings - Fork 0
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
swerve drive docstrings #5
Changes from all commits
e10337d
4c386b8
bc73b16
3cf7123
92bd17f
9dc17b5
158e8e3
e0149f8
48a3de6
27d1b1a
75ef8a0
f52582a
bc25888
2c6d296
d0e2973
1863fe0
4d96b74
3b5012c
576e0b8
35dfa30
b657c91
c9e8847
0ba5dc8
efa7327
71a47d3
5586e6a
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,8 +2,6 @@ | |
|
||
package frc.robot.commands.drive; | ||
|
||
import static edu.wpi.first.units.Units.*; | ||
|
||
import edu.wpi.first.wpilibj.Timer; | ||
import edu.wpi.first.wpilibj2.command.Command; | ||
import frc.robot.extras.interpolators.MultiLinearInterpolator; | ||
|
@@ -21,7 +19,7 @@ | |
private final Vision vision; | ||
private final SwerveDrive swerveDrive; | ||
|
||
private double lastTimeStampSeconds = 0; | ||
Check warning on line 22 in src/main/java/frc/robot/commands/drive/DriveCommandBase.java GitHub Actions / LintAvoid using redundant field initializer for 'lastTimeStampSeconds'
Check warning on line 22 in src/main/java/frc/robot/commands/drive/DriveCommandBase.java GitHub Actions / LintAvoid using redundant field initializer for 'lastTimeStampSeconds'
|
||
|
||
/** | ||
* An abstract class that handles pose estimation while driving. | ||
|
@@ -34,6 +32,7 @@ | |
this.vision = vision; | ||
// It is important that you do addRequirements(driveSubsystem, vision) in whatever | ||
// command extends this | ||
// DO NOT do addRequirements here, it will break things | ||
} | ||
|
||
@Override | ||
|
@@ -55,6 +54,12 @@ | |
|
||
double distanceFromClosestAprilTag = vision.getLimelightAprilTagDistance(limelightNumber); | ||
|
||
// Depending on how many april tags we see, we change our confidence as more april tags | ||
// results in a much more accurate pose estimate | ||
// TODO: check if this is necessary anymore with MT2, also we might want to set the limelight | ||
// so it only uses 1 april tag, if they set up the field wrong (they can set april tags +-1 | ||
// inch I believe) | ||
// using multiple *could* really mess things up. | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. nope. see image |
||
if (vision.getNumberOfAprilTags(limelightNumber) == 1) { | ||
double[] standardDeviations = | ||
oneAprilTagLookupTable.getLookupValue(distanceFromClosestAprilTag); | ||
|
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.
check if what is necessary?
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.
@JacksonElia