Updated documentation. Added swerve measurement function

This commit is contained in:
thenetworkgrinch
2023-02-14 22:37:45 -06:00
parent 9a7ba52cee
commit 54f7e442f7
92 changed files with 206 additions and 166 deletions

View File

@@ -461,4 +461,17 @@ public class SwerveDrive
module.synchronizeEncoders();
}
}
/**
* Add a vision measurement to the {@link SwerveDrivePoseEstimator} with the given timestamp of the vision
* measurement. <b>THIS WILL BREAK IF UPDATED TOO OFTEN.</b>
*
* @param robotPose Robot {@link Pose2d} as measured by vision.
* @param timestamp Timestamp the measurement was taken as time since FPGATimestamp, could be taken from
* {@link Timer#getFPGATimestamp()}.
*/
public void addVisionMeasurement(Pose2d robotPose, double timestamp)
{
swerveDrivePoseEstimator.addVisionMeasurement(robotPose, timestamp);
}
}