mirror of
https://github.com/wpilibsuite/allwpilib
synced 2026-07-01 02:41:48 +00:00
[wpimath] Fix Pose3d exp()/log() and add rotation vector constructor to Rotation3d (#5072)
Co-authored-by: Tyler Veness <calcmogul@gmail.com>
This commit is contained in:
@@ -59,13 +59,22 @@ class WPILIB_DLLEXPORT Rotation3d {
|
||||
*/
|
||||
Rotation3d(const Vectord<3>& axis, units::radian_t angle);
|
||||
|
||||
/**
|
||||
* Constructs a Rotation3d with the given rotation vector representation. This
|
||||
* representation is equivalent to axis-angle, where the normalized axis is
|
||||
* multiplied by the rotation around the axis in radians.
|
||||
*
|
||||
* @param rvec The rotation vector.
|
||||
*/
|
||||
explicit Rotation3d(const Eigen::Vector3d& rvec);
|
||||
|
||||
/**
|
||||
* Constructs a Rotation3d from a rotation matrix.
|
||||
*
|
||||
* @param rotationMatrix The rotation matrix.
|
||||
* @throws std::domain_error if the rotation matrix isn't special orthogonal.
|
||||
*/
|
||||
explicit Rotation3d(const Matrixd<3, 3>& rotationMatrix);
|
||||
explicit Rotation3d(const Eigen::Matrix3d& rotationMatrix);
|
||||
|
||||
/**
|
||||
* Constructs a Rotation3d that rotates the initial vector onto the final
|
||||
|
||||
Reference in New Issue
Block a user