mirror of
https://github.com/wpilibsuite/allwpilib
synced 2026-06-21 01:01:43 +00:00
[wpimath] Add static matrix support to DARE solver (#5536)
Using static matrices where possible results in a 2x performance improvement.
This commit is contained in:
@@ -28,6 +28,12 @@ bool IsStabilizable<2, 1>(const Matrixd<2, 2>& A, const Matrixd<2, 1>& B) {
|
||||
return detail::IsStabilizableImpl<2, 1>(A, B);
|
||||
}
|
||||
|
||||
template <>
|
||||
bool IsStabilizable<Eigen::Dynamic, Eigen::Dynamic>(const Eigen::MatrixXd& A,
|
||||
const Eigen::MatrixXd& B) {
|
||||
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()};
|
||||
|
||||
Reference in New Issue
Block a user