[wpimath] Remove unused #includes (#8549)

This is based on a filtered list of #includes clangd reported were
unused.
This commit is contained in:
Tyler Veness
2026-01-12 19:08:21 -08:00
committed by GitHub
parent 1724e59f8d
commit 89d0759ef2
41 changed files with 15 additions and 84 deletions

View File

@@ -4,8 +4,6 @@
#pragma once
#include <cstdlib>
#include "wpi/math/util/MathShared.hpp"
#include "wpi/units/angle.hpp"
#include "wpi/units/angular_velocity.hpp"

View File

@@ -4,7 +4,6 @@
#pragma once
#include <array>
#include <functional>
#include <Eigen/QR>

View File

@@ -8,7 +8,6 @@
#include "wpi/math/linalg/EigenCore.hpp"
#include "wpi/math/system/LinearSystem.hpp"
#include "wpi/units/time.hpp"
namespace wpi::math {

View File

@@ -4,9 +4,6 @@
#pragma once
#include <array>
#include <functional>
#include <Eigen/QR>
#include "wpi/math/linalg/EigenCore.hpp"

View File

@@ -5,7 +5,6 @@
#pragma once
#include <algorithm>
#include <cmath>
#include <limits>
#include <type_traits>

View File

@@ -4,7 +4,6 @@
#pragma once
#include <cmath>
#include <limits>
#include <type_traits>

View File

@@ -5,8 +5,8 @@
#pragma once
#include "wpi/math/estimator/PoseEstimator3d.hpp"
#include "wpi/math/geometry/Pose2d.hpp"
#include "wpi/math/geometry/Rotation2d.hpp"
#include "wpi/math/geometry/Pose3d.hpp"
#include "wpi/math/geometry/Rotation3d.hpp"
#include "wpi/math/kinematics/DifferentialDriveKinematics.hpp"
#include "wpi/math/kinematics/DifferentialDriveOdometry3d.hpp"
#include "wpi/units/time.hpp"

View File

@@ -4,7 +4,6 @@
#pragma once
#include <cmath>
#include <stdexcept>
#include <string>

View File

@@ -5,7 +5,6 @@
#pragma once
#include <algorithm>
#include <array>
#include <functional>
#include <utility>
#include <vector>

View File

@@ -4,15 +4,11 @@
#pragma once
#include <functional>
#include "wpi/math/estimator/PoseEstimator.hpp"
#include "wpi/math/geometry/Pose2d.hpp"
#include "wpi/math/geometry/Rotation2d.hpp"
#include "wpi/math/interpolation/TimeInterpolatableBuffer.hpp"
#include "wpi/math/kinematics/MecanumDriveKinematics.hpp"
#include "wpi/math/kinematics/MecanumDriveOdometry.hpp"
#include "wpi/units/time.hpp"
#include "wpi/util/SymbolExports.hpp"
#include "wpi/util/array.hpp"

View File

@@ -4,15 +4,11 @@
#pragma once
#include <functional>
#include "wpi/math/estimator/PoseEstimator3d.hpp"
#include "wpi/math/geometry/Pose2d.hpp"
#include "wpi/math/geometry/Rotation2d.hpp"
#include "wpi/math/interpolation/TimeInterpolatableBuffer.hpp"
#include "wpi/math/geometry/Pose3d.hpp"
#include "wpi/math/geometry/Rotation3d.hpp"
#include "wpi/math/kinematics/MecanumDriveKinematics.hpp"
#include "wpi/math/kinematics/MecanumDriveOdometry3d.hpp"
#include "wpi/units/time.hpp"
#include "wpi/util/SymbolExports.hpp"
#include "wpi/util/array.hpp"

View File

@@ -4,6 +4,7 @@
#pragma once
#include <cmath>
#include <map>
#include <optional>
#include <vector>

View File

@@ -4,17 +4,17 @@
#pragma once
#include <cmath>
#include <map>
#include <optional>
#include <utility>
#include <vector>
#include <Eigen/Core>
#include "wpi/math/geometry/Pose2d.hpp"
#include "wpi/math/geometry/Rotation2d.hpp"
#include "wpi/math/geometry/Pose3d.hpp"
#include "wpi/math/geometry/Rotation3d.hpp"
#include "wpi/math/geometry/Transform3d.hpp"
#include "wpi/math/geometry/Translation2d.hpp"
#include "wpi/math/geometry/Translation3d.hpp"
#include "wpi/math/interpolation/TimeInterpolatableBuffer.hpp"
#include "wpi/math/kinematics/Kinematics.hpp"
#include "wpi/math/kinematics/Odometry3d.hpp"

View File

@@ -4,7 +4,6 @@
#pragma once
#include "wpi/math/estimator/SigmaPoints.hpp"
#include "wpi/math/linalg/EigenCore.hpp"
#include "wpi/util/array.hpp"

View File

@@ -4,7 +4,6 @@
#pragma once
#include <cmath>
#include <stdexcept>
#include <string>

View File

@@ -4,14 +4,11 @@
#pragma once
#include <cmath>
#include "wpi/math/estimator/PoseEstimator.hpp"
#include "wpi/math/geometry/Pose2d.hpp"
#include "wpi/math/geometry/Rotation2d.hpp"
#include "wpi/math/kinematics/SwerveDriveKinematics.hpp"
#include "wpi/math/kinematics/SwerveDriveOdometry.hpp"
#include "wpi/units/time.hpp"
#include "wpi/util/SymbolExports.hpp"
#include "wpi/util/array.hpp"

View File

@@ -4,14 +4,11 @@
#pragma once
#include <cmath>
#include "wpi/math/estimator/PoseEstimator3d.hpp"
#include "wpi/math/geometry/Pose2d.hpp"
#include "wpi/math/geometry/Rotation2d.hpp"
#include "wpi/math/geometry/Pose3d.hpp"
#include "wpi/math/geometry/Rotation3d.hpp"
#include "wpi/math/kinematics/SwerveDriveKinematics.hpp"
#include "wpi/math/kinematics/SwerveDriveOdometry3d.hpp"
#include "wpi/units/time.hpp"
#include "wpi/util/SymbolExports.hpp"
#include "wpi/util/array.hpp"

View File

@@ -17,7 +17,6 @@
#include "wpi/math/system/NumericalJacobian.hpp"
#include "wpi/math/util/StateSpaceUtil.hpp"
#include "wpi/units/time.hpp"
#include "wpi/util/SymbolExports.hpp"
#include "wpi/util/array.hpp"
namespace wpi::math {

View File

@@ -6,7 +6,6 @@
#include "wpi/units/time.hpp"
#include "wpi/util/SymbolExports.hpp"
#include "wpi/util/timestamp.h"
namespace wpi::math {
/**

View File

@@ -8,7 +8,6 @@
#include "wpi/math/util/MathShared.hpp"
#include "wpi/units/time.hpp"
#include "wpi/util/timestamp.h"
namespace wpi::math {
/**

View File

@@ -7,8 +7,6 @@
#include <Eigen/Core>
#include <gcem.hpp>
#include "wpi/math/geometry/Pose3d.hpp"
#include "wpi/math/geometry/Rotation3d.hpp"
#include "wpi/util/SymbolExports.hpp"
namespace wpi::math {

View File

@@ -8,7 +8,6 @@
#include <initializer_list>
#include <span>
#include <stdexcept>
#include <type_traits>
#include <utility>
#include <Eigen/Core>
@@ -16,7 +15,6 @@
#include "wpi/math/geometry/Pose2d.hpp"
#include "wpi/math/geometry/Rotation3d.hpp"
#include "wpi/math/geometry/Translation3d.hpp"
#include "wpi/math/linalg/ct_matrix.hpp"
#include "wpi/util/SymbolExports.hpp"
#include "wpi/util/json_fwd.hpp"

View File

@@ -4,18 +4,14 @@
#pragma once
#include <string>
#include <type_traits>
#include <Eigen/Core>
#include <fmt/format.h>
#include <gcem.hpp>
#include "wpi/math/fmt/Eigen.hpp"
#include "wpi/math/geometry/Quaternion.hpp"
#include "wpi/math/geometry/Rotation2d.hpp"
#include "wpi/math/linalg/ct_matrix.hpp"
#include "wpi/math/util/MathShared.hpp"
#include "wpi/units/angle.hpp"
#include "wpi/units/math.hpp"
#include "wpi/util/SymbolExports.hpp"

View File

@@ -13,7 +13,6 @@
#include "wpi/math/geometry/Pose2d.hpp"
#include "wpi/units/time.hpp"
#include "wpi/util/MathExtras.hpp"
#include "wpi/util/SymbolExports.hpp"
namespace wpi::math {

View File

@@ -6,7 +6,6 @@
#include "wpi/math/geometry/Rotation2d.hpp"
#include "wpi/math/geometry/Translation2d.hpp"
#include "wpi/math/util/MathUtil.hpp"
#include "wpi/units/acceleration.hpp"
#include "wpi/units/angular_acceleration.hpp"
#include "wpi/util/SymbolExports.hpp"

View File

@@ -4,7 +4,7 @@
#pragma once
#include "wpi/math/geometry/Pose2d.hpp"
#include "wpi/math/geometry/Pose3d.hpp"
#include "wpi/math/kinematics/DifferentialDriveKinematics.hpp"
#include "wpi/math/kinematics/DifferentialDriveWheelPositions.hpp"
#include "wpi/math/kinematics/DifferentialDriveWheelSpeeds.hpp"

View File

@@ -5,7 +5,6 @@
#pragma once
#include "wpi/units/acceleration.hpp"
#include "wpi/units/math.hpp"
#include "wpi/util/SymbolExports.hpp"
namespace wpi::math {

View File

@@ -9,9 +9,7 @@
#include "wpi/math/kinematics/MecanumDriveWheelPositions.hpp"
#include "wpi/math/kinematics/MecanumDriveWheelSpeeds.hpp"
#include "wpi/math/kinematics/Odometry.hpp"
#include "wpi/units/time.hpp"
#include "wpi/util/SymbolExports.hpp"
#include "wpi/util/timestamp.h"
namespace wpi::math {

View File

@@ -4,14 +4,12 @@
#pragma once
#include "wpi/math/geometry/Pose2d.hpp"
#include "wpi/math/geometry/Pose3d.hpp"
#include "wpi/math/kinematics/MecanumDriveKinematics.hpp"
#include "wpi/math/kinematics/MecanumDriveWheelPositions.hpp"
#include "wpi/math/kinematics/MecanumDriveWheelSpeeds.hpp"
#include "wpi/math/kinematics/Odometry3d.hpp"
#include "wpi/units/time.hpp"
#include "wpi/util/SymbolExports.hpp"
#include "wpi/util/timestamp.h"
namespace wpi::math {

View File

@@ -4,12 +4,7 @@
#pragma once
#include <algorithm>
#include <array>
#include <cmath>
#include "wpi/units/acceleration.hpp"
#include "wpi/units/math.hpp"
#include "wpi/util/SymbolExports.hpp"
namespace wpi::math {

View File

@@ -6,7 +6,6 @@
#include <algorithm>
#include <array>
#include <cmath>
#include "wpi/units/math.hpp"
#include "wpi/units/velocity.hpp"

View File

@@ -4,11 +4,8 @@
#pragma once
#include "wpi/math/geometry/Pose2d.hpp"
#include "wpi/math/geometry/Pose3d.hpp"
#include "wpi/math/geometry/Rotation2d.hpp"
#include "wpi/math/geometry/Rotation3d.hpp"
#include "wpi/math/geometry/Translation2d.hpp"
#include "wpi/math/geometry/Translation3d.hpp"
#include "wpi/math/kinematics/Kinematics.hpp"
#include "wpi/util/SymbolExports.hpp"

View File

@@ -5,7 +5,6 @@
#pragma once
#include <cstddef>
#include <ctime>
#include "wpi/math/geometry/Pose2d.hpp"
#include "wpi/math/kinematics/Odometry.hpp"
@@ -14,7 +13,6 @@
#include "wpi/math/kinematics/SwerveModuleState.hpp"
#include "wpi/math/util/MathShared.hpp"
#include "wpi/util/SymbolExports.hpp"
#include "wpi/util/timestamp.h"
namespace wpi::math {

View File

@@ -4,18 +4,14 @@
#pragma once
#include <chrono>
#include <cstddef>
#include <ctime>
#include "wpi/math/geometry/Pose2d.hpp"
#include "wpi/math/geometry/Pose3d.hpp"
#include "wpi/math/kinematics/Odometry3d.hpp"
#include "wpi/math/kinematics/SwerveDriveKinematics.hpp"
#include "wpi/math/kinematics/SwerveModulePosition.hpp"
#include "wpi/math/kinematics/SwerveModuleState.hpp"
#include "wpi/units/time.hpp"
#include "wpi/util/SymbolExports.hpp"
#include "wpi/util/timestamp.h"
namespace wpi::math {

View File

@@ -4,7 +4,7 @@
#pragma once
#include <cmath>
#include <algorithm>
#include <functional>
#include <random>
#include <utility>

View File

@@ -29,7 +29,6 @@
#pragma once
#include <stack>
#include <string>
#include <utility>
#include <vector>

View File

@@ -40,7 +40,6 @@ auto NumericalJacobian(F&& f, const Vectord<Cols>& x) {
* @param f Vector-valued function from which to compute Jacobian.
* @param x Vector argument.
*/
template <typename F>
Eigen::MatrixXd NumericalJacobian(F&& f, const Eigen::VectorXd& x) {
constexpr double kEpsilon = 1e-5;

View File

@@ -6,7 +6,6 @@
#include <concepts>
#include <memory>
#include <utility>
#include <vector>
#include "wpi/math/kinematics/DifferentialDriveKinematics.hpp"

View File

@@ -5,15 +5,12 @@
#pragma once
#include <functional>
#include <memory>
#include <utility>
#include <vector>
#include "wpi/math/spline/SplineParameterizer.hpp"
#include "wpi/math/trajectory/Trajectory.hpp"
#include "wpi/math/trajectory/TrajectoryConfig.hpp"
#include "wpi/math/trajectory/constraint/DifferentialDriveKinematicsConstraint.hpp"
#include "wpi/math/trajectory/constraint/TrajectoryConstraint.hpp"
#include "wpi/util/SymbolExports.hpp"
namespace wpi::math {

View File

@@ -4,8 +4,6 @@
#pragma once
#include <cmath>
#include "wpi/math/kinematics/MecanumDriveKinematics.hpp"
#include "wpi/math/trajectory/constraint/TrajectoryConstraint.hpp"
#include "wpi/units/math.hpp"

View File

@@ -4,8 +4,6 @@
#pragma once
#include <cmath>
#include "wpi/math/kinematics/SwerveDriveKinematics.hpp"
#include "wpi/math/trajectory/constraint/TrajectoryConstraint.hpp"
#include "wpi/units/math.hpp"