mirror of
https://github.com/wpilibsuite/allwpilib
synced 2026-06-21 01:01:43 +00:00
[wpimath] Replace frc/EigenCore.h typedefs with Eigen's where possible (#5597)
This commit is contained in:
@@ -6,16 +6,16 @@
|
||||
|
||||
namespace frc {
|
||||
|
||||
Vectord<3> PoseTo3dVector(const Pose2d& pose) {
|
||||
return Vectord<3>{pose.Translation().X().value(),
|
||||
pose.Translation().Y().value(),
|
||||
pose.Rotation().Radians().value()};
|
||||
Eigen::Vector3d PoseTo3dVector(const Pose2d& pose) {
|
||||
return Eigen::Vector3d{pose.Translation().X().value(),
|
||||
pose.Translation().Y().value(),
|
||||
pose.Rotation().Radians().value()};
|
||||
}
|
||||
|
||||
Vectord<4> PoseTo4dVector(const Pose2d& pose) {
|
||||
return Vectord<4>{pose.Translation().X().value(),
|
||||
pose.Translation().Y().value(), pose.Rotation().Cos(),
|
||||
pose.Rotation().Sin()};
|
||||
Eigen::Vector4d PoseTo4dVector(const Pose2d& pose) {
|
||||
return Eigen::Vector4d{pose.Translation().X().value(),
|
||||
pose.Translation().Y().value(), pose.Rotation().Cos(),
|
||||
pose.Rotation().Sin()};
|
||||
}
|
||||
|
||||
template <>
|
||||
@@ -34,9 +34,9 @@ bool IsStabilizable<Eigen::Dynamic, Eigen::Dynamic>(const Eigen::MatrixXd& A,
|
||||
return detail::IsStabilizableImpl<Eigen::Dynamic, Eigen::Dynamic>(A, B);
|
||||
}
|
||||
|
||||
Vectord<3> PoseToVector(const Pose2d& pose) {
|
||||
return Vectord<3>{pose.X().value(), pose.Y().value(),
|
||||
pose.Rotation().Radians().value()};
|
||||
Eigen::Vector3d PoseToVector(const Pose2d& pose) {
|
||||
return Eigen::Vector3d{pose.X().value(), pose.Y().value(),
|
||||
pose.Rotation().Radians().value()};
|
||||
}
|
||||
|
||||
} // namespace frc
|
||||
|
||||
Reference in New Issue
Block a user