Skip to content

Commit

Permalink
Change TimeTest to only print
Browse files Browse the repository at this point in the history
  • Loading branch information
KangarooKoala committed Oct 10, 2024
1 parent 6250d50 commit 48aa875
Showing 1 changed file with 1 addition and 62 deletions.
63 changes: 1 addition & 62 deletions wpimath/src/test/native/cpp/TimeTest.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -136,66 +136,5 @@ void TimeSuite(
}

TEST(TimeTest, Time) {
{
wpi::print("Initializing odometry\n");
frc::DifferentialDriveOdometry odometry{frc::Rotation2d{}, 0_m, 0_m,
frc::Pose2d{}};
wpi::print("Initializing other values\n");
frc::Rotation2d gyroAngle{};
auto leftDistance = 0_m;
auto rightDistance = 0_m;
wpi::print("Running time suite\n");
TimeSuite(
"Odometry update (2d)",
[&] { odometry.Update(gyroAngle, leftDistance, rightDistance); },
[&] {
odometry.ResetPosition(frc::Rotation2d{}, 0_m, 0_m, frc::Pose2d{});
});
}

{
frc::DifferentialDriveOdometry3d odometry{frc::Rotation3d{}, 0_m, 0_m,
frc::Pose3d{}};
frc::Rotation3d gyroAngle{};
auto leftDistance = 0_m;
auto rightDistance = 0_m;
TimeSuite(
"Odometry update (3d)",
[&] { odometry.Update(gyroAngle, leftDistance, rightDistance); },
[&] {
odometry.ResetPosition(frc::Rotation3d{}, 0_m, 0_m, frc::Pose3d{});
});
}

{
frc::DifferentialDriveKinematics kinematics{1_m};
frc::DifferentialDrivePoseEstimator poseEstimator{
kinematics, frc::Rotation2d{}, 0_m, 0_m, frc::Pose2d{}};
frc::Rotation2d gyroAngle{};
auto leftDistance = 0_m;
auto rightDistance = 0_m;
TimeSuite(
"Pose estimator update (2d)",
[&] { poseEstimator.Update(gyroAngle, leftDistance, rightDistance); },
[&] {
poseEstimator.ResetPosition(frc::Rotation2d{}, 0_m, 0_m,
frc::Pose2d{});
});
}

{
frc::DifferentialDriveKinematics kinematics{1_m};
frc::DifferentialDrivePoseEstimator3d poseEstimator{
kinematics, frc::Rotation3d{}, 0_m, 0_m, frc::Pose3d{}};
frc::Rotation3d gyroAngle{};
auto leftDistance = 0_m;
auto rightDistance = 0_m;
TimeSuite(
"Pose estimator update (3d)",
[&] { poseEstimator.Update(gyroAngle, leftDistance, rightDistance); },
[&] {
poseEstimator.ResetPosition(frc::Rotation3d{}, 0_m, 0_m,
frc::Pose3d{});
});
}
wpi::print("Hello?\n");
}

0 comments on commit 48aa875

Please sign in to comment.