mirror of
https://github.com/wpilibsuite/allwpilib
synced 2026-06-19 00:41:43 +00:00
[hal,wpilib] Rename FPGA clock to monotonic clock (#8672)
- Remove status return from HAL level (clock getting should never fail) - Remove 32-bit timestamp expand function - Make monotonic_clock.hpp (formerly fpga_clock.hpp) header-only and move to root hal include directory
This commit is contained in:
@@ -272,9 +272,9 @@ public class PoseEstimator<T> {
|
||||
* @param timestamp The timestamp of the vision measurement in seconds. Note that if you don't use
|
||||
* your own time source by calling {@link
|
||||
* PoseEstimator#updateWithTime(double,Rotation2d,Object)} then you must use a timestamp with
|
||||
* an epoch since FPGA startup (i.e., the epoch of this timestamp is the same epoch as {@link
|
||||
* org.wpilib.system.Timer#getFPGATimestamp()}.) This means that you should use {@link
|
||||
* org.wpilib.system.Timer#getFPGATimestamp()} as your time source or sync the epochs.
|
||||
* the same epoch as {@link org.wpilib.system.Timer#getMonotonicTimestamp()}.) This means that
|
||||
* you should use {@link org.wpilib.system.Timer#getMonotonicTimestamp()} as your time source
|
||||
* or sync the epochs.
|
||||
*/
|
||||
public void addVisionMeasurement(Pose2d visionRobotPose, double timestamp) {
|
||||
// Step 0: If this measurement is old enough to be outside the pose buffer's timespan, skip.
|
||||
@@ -344,9 +344,9 @@ public class PoseEstimator<T> {
|
||||
* @param visionRobotPose The pose of the robot as measured by the vision camera.
|
||||
* @param timestamp The timestamp of the vision measurement in seconds. Note that if you don't use
|
||||
* your own time source by calling {@link #updateWithTime}, then you must use a timestamp with
|
||||
* an epoch since FPGA startup (i.e., the epoch of this timestamp is the same epoch as {@link
|
||||
* org.wpilib.system.Timer#getFPGATimestamp()}). This means that you should use {@link
|
||||
* org.wpilib.system.Timer#getFPGATimestamp()} as your time source in this case.
|
||||
* the same epoch as {@link org.wpilib.system.Timer#getMonotonicTimestamp()}). This means that
|
||||
* you should use {@link org.wpilib.system.Timer#getMonotonicTimestamp()} as your time source
|
||||
* in this case.
|
||||
* @param visionMeasurementStdDevs Standard deviations of the vision pose measurement (x position
|
||||
* in meters, y position in meters, and heading in radians). Increase these numbers to trust
|
||||
* the vision pose measurement less.
|
||||
|
||||
@@ -283,9 +283,9 @@ public class PoseEstimator3d<T> {
|
||||
* @param timestamp The timestamp of the vision measurement in seconds. Note that if you don't use
|
||||
* your own time source by calling {@link
|
||||
* PoseEstimator3d#updateWithTime(double,Rotation3d,Object)} then you must use a timestamp
|
||||
* with an epoch since FPGA startup (i.e., the epoch of this timestamp is the same epoch as
|
||||
* {@link org.wpilib.system.Timer#getFPGATimestamp()}.) This means that you should use {@link
|
||||
* org.wpilib.system.Timer#getFPGATimestamp()} as your time source or sync the epochs.
|
||||
* with the same epoch as {@link org.wpilib.system.Timer#getMonotonicTimestamp()}.) This means
|
||||
* that you should use {@link org.wpilib.system.Timer#getMonotonicTimestamp()} as your time
|
||||
* source or sync the epochs.
|
||||
*/
|
||||
public void addVisionMeasurement(Pose3d visionRobotPose, double timestamp) {
|
||||
// Step 0: If this measurement is old enough to be outside the pose buffer's timespan, skip.
|
||||
@@ -359,9 +359,9 @@ public class PoseEstimator3d<T> {
|
||||
* @param visionRobotPose The pose of the robot as measured by the vision camera.
|
||||
* @param timestamp The timestamp of the vision measurement in seconds. Note that if you don't use
|
||||
* your own time source by calling {@link #updateWithTime}, then you must use a timestamp with
|
||||
* an epoch since FPGA startup (i.e., the epoch of this timestamp is the same epoch as {@link
|
||||
* org.wpilib.system.Timer#getFPGATimestamp()}). This means that you should use {@link
|
||||
* org.wpilib.system.Timer#getFPGATimestamp()} as your time source in this case.
|
||||
* the same epoch as {@link org.wpilib.system.Timer#getMonotonicTimestamp()}). This means that
|
||||
* you should use {@link org.wpilib.system.Timer#getMonotonicTimestamp()} as your time source
|
||||
* in this case.
|
||||
* @param visionMeasurementStdDevs Standard deviations of the vision pose measurement (x position
|
||||
* in meters, y position in meters, z position in meters, and angle in radians). Increase
|
||||
* these numbers to trust the vision pose measurement less.
|
||||
|
||||
@@ -280,10 +280,9 @@ class WPILIB_DLLEXPORT PoseEstimator {
|
||||
* camera.
|
||||
* @param timestamp The timestamp of the vision measurement in seconds. Note
|
||||
* that if you don't use your own time source by calling UpdateWithTime(),
|
||||
* then you must use a timestamp with an epoch since FPGA startup (i.e.,
|
||||
* the epoch of this timestamp is the same epoch as
|
||||
* wpi::math::Timer::GetTimestamp(). This means that you should use
|
||||
* wpi::math::Timer::GetTimestamp() as your time source in this case.
|
||||
* then you must use a timestamp with the same epoch as
|
||||
* wpi::Timer::GetMonotonicTimestamp(). This means that you should use
|
||||
* wpi::Timer::GetMonotonicTimestamp() as your time source in this case.
|
||||
*/
|
||||
void AddVisionMeasurement(const Pose2d& visionRobotPose,
|
||||
wpi::units::second_t timestamp) {
|
||||
@@ -365,10 +364,9 @@ class WPILIB_DLLEXPORT PoseEstimator {
|
||||
* camera.
|
||||
* @param timestamp The timestamp of the vision measurement in seconds. Note
|
||||
* that if you don't use your own time source by calling UpdateWithTime(),
|
||||
* then you must use a timestamp with an epoch since FPGA startup (i.e.,
|
||||
* the epoch of this timestamp is the same epoch as
|
||||
* wpi::math::Timer::GetTimestamp(). This means that you should use
|
||||
* wpi::math::Timer::GetTimestamp() as your time source in this case.
|
||||
* then you must use a timestamp with the same epoch as
|
||||
* wpi::Timer::GetMonotonicTimestamp(). This means that you should use
|
||||
* wpi::Timer::GetMonotonicTimestamp() as your time source in this case.
|
||||
* @param visionMeasurementStdDevs Standard deviations of the vision pose
|
||||
* measurement (x position in meters, y position in meters, and heading in
|
||||
* radians). Increase these numbers to trust the vision pose measurement
|
||||
|
||||
@@ -288,10 +288,9 @@ class WPILIB_DLLEXPORT PoseEstimator3d {
|
||||
* camera.
|
||||
* @param timestamp The timestamp of the vision measurement in seconds. Note
|
||||
* that if you don't use your own time source by calling UpdateWithTime(),
|
||||
* then you must use a timestamp with an epoch since FPGA startup (i.e.,
|
||||
* the epoch of this timestamp is the same epoch as
|
||||
* wpi::math::Timer::GetFPGATimestamp(). This means that you should use
|
||||
* wpi::math::Timer::GetFPGATimestamp() as your time source in this case.
|
||||
* then you must use a timestamp with the same epoch as
|
||||
* wpi::Timer::GetMonotonicTimestamp(). This means that you should use
|
||||
* wpi::Timer::GetMonotonicTimestamp() as your time source in this case.
|
||||
*/
|
||||
void AddVisionMeasurement(const Pose3d& visionRobotPose,
|
||||
wpi::units::second_t timestamp) {
|
||||
@@ -379,10 +378,9 @@ class WPILIB_DLLEXPORT PoseEstimator3d {
|
||||
* camera.
|
||||
* @param timestamp The timestamp of the vision measurement in seconds. Note
|
||||
* that if you don't use your own time source by calling UpdateWithTime(),
|
||||
* then you must use a timestamp with an epoch since FPGA startup (i.e.,
|
||||
* the epoch of this timestamp is the same epoch as
|
||||
* wpi::math::Timer::GetFPGATimestamp(). This means that you should use
|
||||
* wpi::math::Timer::GetFPGATimestamp() as your time source in this case.
|
||||
* then you must use a timestamp with the same epoch as
|
||||
* wpi::Timer::GetMonotonicTimestamp(). This means that you should use
|
||||
* wpi::Timer::GetMonotonicTimestamp() as your time source in this case.
|
||||
* @param visionMeasurementStdDevs Standard deviations of the vision pose
|
||||
* measurement (x position in meters, y position in meters, and heading in
|
||||
* radians). Increase these numbers to trust the vision pose measurement
|
||||
|
||||
Reference in New Issue
Block a user