mirror of
https://github.com/BroncBotz3481/YAGSL
synced 2026-06-30 07:11:40 +00:00
Updated documentation. Added swerve measurement function
This commit is contained in:
@@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user