Fix clangd #include warnings (#8565)

This commit is contained in:
Tyler Veness
2026-02-11 11:15:02 -08:00
committed by GitHub
parent 1680e676b6
commit 245186cb15
70 changed files with 30 additions and 126 deletions

View File

@@ -4,8 +4,6 @@
#include "wpi/math/linalg/DARE.hpp"
#include <stdexcept>
#include <Eigen/Core>
#include <Eigen/Eigenvalues>
#include <gtest/gtest.h>

View File

@@ -2,12 +2,10 @@
// Open Source Software; you can modify and/or share it under the terms of
// the WPILib BSD license file in the root directory of this project.
#include <cmath>
#include <random>
#include <gtest/gtest.h>
#include "wpi/math/controller/LinearPlantInversionFeedforward.hpp"
#include "wpi/math/controller/LinearQuadraticRegulator.hpp"
#include "wpi/math/estimator/KalmanFilter.hpp"
#include "wpi/math/linalg/EigenCore.hpp"

View File

@@ -5,6 +5,7 @@
#include "wpi/math/controller/LTVDifferentialDriveController.hpp"
#include <cmath>
#include <numbers>
#include <gtest/gtest.h>

View File

@@ -4,6 +4,8 @@
#include "wpi/math/controller/LTVUnicycleController.hpp"
#include <numbers>
#include <gtest/gtest.h>
#include "wpi/math/trajectory/TrajectoryGenerator.hpp"

View File

@@ -8,8 +8,6 @@
#include "../../ProtoTestBase.hpp"
#include "wpi/math/controller/SimpleMotorFeedforward.hpp"
#include "wpi/units/acceleration.hpp"
#include "wpi/units/velocity.hpp"
using namespace wpi::math;

View File

@@ -2,14 +2,10 @@
// Open Source Software; you can modify and/or share it under the terms of
// the WPILib BSD license file in the root directory of this project.
#include "wpi/math/controller/struct/SimpleMotorFeedforwardStruct.hpp"
#include <gtest/gtest.h>
#include "../../StructTestBase.hpp"
#include "wpi/math/controller/SimpleMotorFeedforward.hpp"
#include "wpi/units/acceleration.hpp"
#include "wpi/units/velocity.hpp"
using namespace wpi::math;

View File

@@ -5,6 +5,7 @@
#include "wpi/math/estimator/DifferentialDrivePoseEstimator3d.hpp"
#include <limits>
#include <numbers>
#include <random>
#include <tuple>
#include <utility>

View File

@@ -4,9 +4,6 @@
#include "wpi/math/estimator/KalmanFilter.hpp"
#include <array>
#include <cmath>
#include <Eigen/Core>
#include <gtest/gtest.h>

View File

@@ -5,6 +5,7 @@
#include "wpi/math/estimator/MecanumDrivePoseEstimator3d.hpp"
#include <limits>
#include <numbers>
#include <random>
#include <tuple>
#include <vector>

View File

@@ -5,6 +5,7 @@
#include "wpi/math/estimator/SwerveDrivePoseEstimator3d.hpp"
#include <limits>
#include <numbers>
#include <random>
#include <tuple>
#include <vector>

View File

@@ -8,9 +8,7 @@
#include <cmath>
#include <functional>
#include <memory>
#include <numbers>
#include <random>
#include <gtest/gtest.h>

View File

@@ -5,7 +5,6 @@
#include "wpi/math/geometry/Pose2d.hpp"
#include <cmath>
#include <cstdlib>
#include <gtest/gtest.h>

View File

@@ -4,7 +4,6 @@
#include "wpi/math/geometry/Rotation2d.hpp"
#include <cmath>
#include <numbers>
#include <gtest/gtest.h>

View File

@@ -4,8 +4,6 @@
#include "wpi/math/geometry/Transform2d.hpp"
#include <cmath>
#include <gtest/gtest.h>
#include "wpi/math/geometry/Pose2d.hpp"

View File

@@ -4,8 +4,6 @@
#include "wpi/math/geometry/Transform3d.hpp"
#include <cmath>
#include <gtest/gtest.h>
#include "wpi/math/geometry/Pose3d.hpp"

View File

@@ -4,8 +4,6 @@
#include "wpi/math/kinematics/ChassisAccelerations.hpp"
#include <numbers>
#include <gtest/gtest.h>
#include "wpi/units/acceleration.hpp"

View File

@@ -8,8 +8,6 @@
#include <gtest/gtest.h>
#include "wpi/math/kinematics/DifferentialDriveKinematics.hpp"
static constexpr double kEpsilon = 1E-9;
using namespace wpi::math;

View File

@@ -8,8 +8,6 @@
#include <gtest/gtest.h>
#include "wpi/math/kinematics/DifferentialDriveKinematics.hpp"
static constexpr double kEpsilon = 1E-9;
using namespace wpi::math;

View File

@@ -2,8 +2,6 @@
// Open Source Software; you can modify and/or share it under the terms of
// the WPILib BSD license file in the root directory of this project.
#include <numbers>
#include <gtest/gtest.h>
#include "wpi/math/kinematics/SwerveModuleAcceleration.hpp"

View File

@@ -6,8 +6,6 @@
#include <gtest/gtest.h>
#include "wpi/math/geometry/Rotation2d.hpp"
TEST(SwerveModulePositionTest, Equality) {
wpi::math::SwerveModulePosition position1{2_m, 90_deg};
wpi::math::SwerveModulePosition position2{2_m, 90_deg};

View File

@@ -2,8 +2,6 @@
// Open Source Software; you can modify and/or share it under the terms of
// the WPILib BSD license file in the root directory of this project.
#include "wpi/math/kinematics/struct/SwerveDriveKinematicsStruct.hpp"
#include <gtest/gtest.h>
#include "../../StructTestBase.hpp"

View File

@@ -12,7 +12,6 @@
#include "wpi/math/geometry/Pose2d.hpp"
#include "wpi/math/geometry/Rotation2d.hpp"
#include "wpi/math/linalg/EigenCore.hpp"
#include "wpi/util/array.hpp"
#include "wpi/util/circular_buffer.hpp"

View File

@@ -2,14 +2,12 @@
// Open Source Software; you can modify and/or share it under the terms of
// the WPILib BSD license file in the root directory of this project.
#include <chrono>
#include <vector>
#include <gtest/gtest.h>
#include "wpi/math/geometry/Pose2d.hpp"
#include "wpi/math/geometry/Rotation2d.hpp"
#include "wpi/math/spline/QuinticHermiteSpline.hpp"
#include "wpi/math/spline/SplineHelper.hpp"
#include "wpi/math/spline/SplineParameterizer.hpp"
#include "wpi/units/length.hpp"

View File

@@ -4,8 +4,6 @@
#include "wpi/math/spline/QuinticHermiteSpline.hpp"
#include <chrono>
#include <gtest/gtest.h>
#include "wpi/math/geometry/Pose2d.hpp"

View File

@@ -2,8 +2,6 @@
// Open Source Software; you can modify and/or share it under the terms of
// the WPILib BSD license file in the root directory of this project.
#include "wpi/math/system/struct/LinearSystemStruct.hpp"
#include <gtest/gtest.h>
#include "../../StructTestBase.hpp"

View File

@@ -4,16 +4,11 @@
#include "wpi/math/trajectory/constraint/CentripetalAccelerationConstraint.hpp"
#include <memory>
#include <vector>
#include <gtest/gtest.h>
#include "wpi/math/trajectory/TestTrajectory.hpp"
#include "wpi/math/trajectory/constraint/TrajectoryConstraint.hpp"
#include "wpi/units/acceleration.hpp"
#include "wpi/units/angle.hpp"
#include "wpi/units/math.hpp"
#include "wpi/units/velocity.hpp"
using namespace wpi::math;

View File

@@ -4,9 +4,6 @@
#include "wpi/math/kinematics/DifferentialDriveKinematics.hpp"
#include <memory>
#include <vector>
#include <gtest/gtest.h>
#include "wpi/math/trajectory/TestTrajectory.hpp"

View File

@@ -2,7 +2,6 @@
// Open Source Software; you can modify and/or share it under the terms of
// the WPILib BSD license file in the root directory of this project.
#include <memory>
#include <vector>
#include <gtest/gtest.h>

View File

@@ -4,8 +4,6 @@
#include "wpi/math/trajectory/ExponentialProfile.hpp"
#include <chrono>
#include <cmath>
#include <tuple>
#include <vector>
@@ -13,7 +11,6 @@
#include "wpi/math/controller/SimpleMotorFeedforward.hpp"
#include "wpi/units/acceleration.hpp"
#include "wpi/units/frequency.hpp"
#include "wpi/units/length.hpp"
#include "wpi/units/math.hpp"
#include "wpi/units/velocity.hpp"
@@ -26,13 +23,6 @@ static constexpr auto kA = 0.43277_V / 1_mps_sq;
#define EXPECT_NEAR_UNITS(val1, val2, eps) \
EXPECT_LE(wpi::units::math::abs(val1 - val2), eps)
#define EXPECT_LT_OR_NEAR_UNITS(val1, val2, eps) \
if (val1 <= val2) { \
EXPECT_LE(val1, val2); \
} else { \
EXPECT_NEAR_UNITS(val1, val2, eps); \
}
wpi::math::ExponentialProfile<wpi::units::meter, wpi::units::volts>::State
CheckDynamics(
wpi::math::ExponentialProfile<wpi::units::meter, wpi::units::volts> profile,

View File

@@ -10,8 +10,6 @@
#include "wpi/math/trajectory/TestTrajectory.hpp"
#include "wpi/math/trajectory/Trajectory.hpp"
#include "wpi/math/trajectory/constraint/CentripetalAccelerationConstraint.hpp"
#include "wpi/math/trajectory/constraint/TrajectoryConstraint.hpp"
#include "wpi/units/math.hpp"
using namespace wpi::math;
@@ -34,7 +32,7 @@ TEST(TrajectoryGenerationTest, ObeysConstraints) {
}
}
TEST(TrajectoryGenertionTest, ReturnsEmptyOnMalformed) {
TEST(TrajectoryGenerationTest, ReturnsEmptyOnMalformed) {
const auto t = TrajectoryGenerator::GenerateTrajectory(
std::vector<Pose2d>{Pose2d{0_m, 0_m, 0_deg}, Pose2d{1_m, 0_m, 180_deg}},
TrajectoryConfig(12_fps, 12_fps_sq));

View File

@@ -4,9 +4,6 @@
#include "wpi/math/trajectory/TrapezoidProfile.hpp"
#include <chrono>
#include <cmath>
#include <gtest/gtest.h>
#include "wpi/units/acceleration.hpp"