mirror of
https://github.com/wpilibsuite/allwpilib
synced 2026-06-27 02:01:42 +00:00
Merge branch 'main' into 2027
This commit is contained in:
@@ -404,7 +404,7 @@ constexpr Twist3d Pose3d::Log(const Pose3d& end) const {
|
||||
|
||||
Vector3d u{
|
||||
{transform.X().value(), transform.Y().value(), transform.Z().value()}};
|
||||
Vector3d rvec = transform.Rotation().GetQuaternion().ToRotationVector();
|
||||
Vector3d rvec = transform.Rotation().ToVector();
|
||||
Matrix3d omega = detail::RotationVectorToMatrix(rvec);
|
||||
Matrix3d omegaSq = omega * omega;
|
||||
double theta = rvec.norm();
|
||||
|
||||
@@ -421,6 +421,13 @@ class WPILIB_DLLEXPORT Rotation3d {
|
||||
1.0 - 2.0 * (x * x + y * y)}};
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns rotation vector representation of this rotation.
|
||||
*
|
||||
* @return Rotation vector representation of this rotation.
|
||||
*/
|
||||
constexpr Eigen::Vector3d ToVector() const { return m_q.ToRotationVector(); }
|
||||
|
||||
/**
|
||||
* Returns a Rotation2d representing this Rotation3d projected into the X-Y
|
||||
* plane.
|
||||
|
||||
Reference in New Issue
Block a user