diff --git a/wpimath/src/main/native/cpp/estimator/SwerveDrivePoseEstimator.cpp b/wpimath/src/main/native/cpp/estimator/SwerveDrivePoseEstimator.cpp new file mode 100644 index 0000000000..f2ed301c2a --- /dev/null +++ b/wpimath/src/main/native/cpp/estimator/SwerveDrivePoseEstimator.cpp @@ -0,0 +1,12 @@ +// Copyright (c) FIRST and other WPILib contributors. +// 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 "frc/estimator/SwerveDrivePoseEstimator.h" + +namespace frc { + +template class EXPORT_TEMPLATE_DEFINE(WPILIB_DLLEXPORT) + SwerveDrivePoseEstimator<4>; + +} // namespace frc diff --git a/wpimath/src/main/native/cpp/estimator/UnscentedKalmanFilter.cpp b/wpimath/src/main/native/cpp/estimator/UnscentedKalmanFilter.cpp new file mode 100644 index 0000000000..d5e869b6cb --- /dev/null +++ b/wpimath/src/main/native/cpp/estimator/UnscentedKalmanFilter.cpp @@ -0,0 +1,14 @@ +// Copyright (c) FIRST and other WPILib contributors. +// 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 "frc/estimator/UnscentedKalmanFilter.h" + +namespace frc { + +template class EXPORT_TEMPLATE_DEFINE(WPILIB_DLLEXPORT) + UnscentedKalmanFilter<3, 3, 1>; +template class EXPORT_TEMPLATE_DEFINE(WPILIB_DLLEXPORT) + UnscentedKalmanFilter<5, 3, 3>; + +} // namespace frc diff --git a/wpimath/src/main/native/cpp/kinematics/SwerveDriveKinematics.cpp b/wpimath/src/main/native/cpp/kinematics/SwerveDriveKinematics.cpp new file mode 100644 index 0000000000..5e6cf287e6 --- /dev/null +++ b/wpimath/src/main/native/cpp/kinematics/SwerveDriveKinematics.cpp @@ -0,0 +1,12 @@ +// Copyright (c) FIRST and other WPILib contributors. +// 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 "frc/kinematics/SwerveDriveKinematics.h" + +namespace frc { + +template class EXPORT_TEMPLATE_DEFINE(WPILIB_DLLEXPORT) + SwerveDriveKinematics<4>; + +} // namespace frc diff --git a/wpimath/src/main/native/cpp/kinematics/SwerveDriveOdometry.cpp b/wpimath/src/main/native/cpp/kinematics/SwerveDriveOdometry.cpp new file mode 100644 index 0000000000..7a9d065702 --- /dev/null +++ b/wpimath/src/main/native/cpp/kinematics/SwerveDriveOdometry.cpp @@ -0,0 +1,11 @@ +// Copyright (c) FIRST and other WPILib contributors. +// 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 "frc/kinematics/SwerveDriveOdometry.h" + +namespace frc { + +template class EXPORT_TEMPLATE_DEFINE(WPILIB_DLLEXPORT) SwerveDriveOdometry<4>; + +} // namespace frc diff --git a/wpimath/src/main/native/include/frc/estimator/SwerveDrivePoseEstimator.h b/wpimath/src/main/native/include/frc/estimator/SwerveDrivePoseEstimator.h index 3fce99406f..16f8439ce8 100644 --- a/wpimath/src/main/native/include/frc/estimator/SwerveDrivePoseEstimator.h +++ b/wpimath/src/main/native/include/frc/estimator/SwerveDrivePoseEstimator.h @@ -6,6 +6,7 @@ #include +#include #include #include @@ -320,4 +321,7 @@ class SwerveDrivePoseEstimator { } }; +extern template class EXPORT_TEMPLATE_DECLARE(WPILIB_DLLEXPORT) + SwerveDrivePoseEstimator<4>; + } // namespace frc diff --git a/wpimath/src/main/native/include/frc/estimator/UnscentedKalmanFilter.h b/wpimath/src/main/native/include/frc/estimator/UnscentedKalmanFilter.h index 1c87b5e7a8..48c94c269a 100644 --- a/wpimath/src/main/native/include/frc/estimator/UnscentedKalmanFilter.h +++ b/wpimath/src/main/native/include/frc/estimator/UnscentedKalmanFilter.h @@ -6,6 +6,7 @@ #include +#include #include #include "Eigen/Cholesky" @@ -425,4 +426,9 @@ class UnscentedKalmanFilter { MerweScaledSigmaPoints m_pts; }; +extern template class EXPORT_TEMPLATE_DECLARE(WPILIB_DLLEXPORT) + UnscentedKalmanFilter<3, 3, 1>; +extern template class EXPORT_TEMPLATE_DECLARE(WPILIB_DLLEXPORT) + UnscentedKalmanFilter<5, 3, 3>; + } // namespace frc diff --git a/wpimath/src/main/native/include/frc/kinematics/SwerveDriveKinematics.h b/wpimath/src/main/native/include/frc/kinematics/SwerveDriveKinematics.h index 980109287a..3e605549e5 100644 --- a/wpimath/src/main/native/include/frc/kinematics/SwerveDriveKinematics.h +++ b/wpimath/src/main/native/include/frc/kinematics/SwerveDriveKinematics.h @@ -6,6 +6,7 @@ #include +#include #include #include "Eigen/Core" @@ -185,6 +186,10 @@ class SwerveDriveKinematics { mutable Translation2d m_previousCoR; }; + +extern template class EXPORT_TEMPLATE_DECLARE(WPILIB_DLLEXPORT) + SwerveDriveKinematics<4>; + } // namespace frc #include "SwerveDriveKinematics.inc" diff --git a/wpimath/src/main/native/include/frc/kinematics/SwerveDriveOdometry.h b/wpimath/src/main/native/include/frc/kinematics/SwerveDriveOdometry.h index d1a49582a2..86a8d0b230 100644 --- a/wpimath/src/main/native/include/frc/kinematics/SwerveDriveOdometry.h +++ b/wpimath/src/main/native/include/frc/kinematics/SwerveDriveOdometry.h @@ -8,6 +8,7 @@ #include #include +#include #include #include "SwerveDriveKinematics.h" @@ -112,6 +113,9 @@ class SwerveDriveOdometry { Rotation2d m_gyroOffset; }; +extern template class EXPORT_TEMPLATE_DECLARE(WPILIB_DLLEXPORT) + SwerveDriveOdometry<4>; + } // namespace frc #include "SwerveDriveOdometry.inc"