1 #ifndef ROBOTICS_ROTATION_H 2 #define ROBOTICS_ROTATION_H 4 #include <KrisLibrary/math/matrix.h> 31 void getMomentJacobian(Matrix& J)
const;
33 void getQuaternionJacobian(Matrix& J)
const;
38 static void quaternionJacobian(
const Quaternion& q,Matrix& J);
40 inline Real& a(
int i) {
return operator()(i); }
41 inline Real& b(
int i) {
return operator()(i+3); }
42 inline Real& c(
int i) {
return operator()(i+6); }
44 inline const Real& a(
int i)
const {
return operator()(i); }
45 inline const Real& b(
int i)
const {
return operator()(i+3); }
46 inline const Real& c(
int i)
const {
return operator()(i+6); }
A 3D vector class.
Definition: math3d/primitives.h:136
Real MatrixAngleDerivative(const Matrix3 &R, const Vector3 &z)
Derivative dtheta/dz, the change in the absolute angle of rotation R as it rotates about the axis z...
Definition: Rotation.cpp:458
void CenteredDifferenceAngularVelocity(const Matrix3 &R_1, const Matrix3 &R0, const Matrix3 &R1, Real h, Vector3 &z)
Computes the angular velocity z at time 0, given current rotation, and rotations at previous/next tim...
Definition: Rotation.cpp:511
void NormalizeRotation(Matrix3 &R)
For a not-quite rotation matrix R, replaces it with the closest rotation matrix. I.e., find an orthogonal matrix that minimizes the distance to R.
Definition: Rotation.cpp:547
void ForwardDifferenceAngularVelocity(const Matrix3 &R0, const Matrix3 &R1, Real h, Vector3 &z)
Computes the angular velocity z at time 0, given current rotation and rotation at next time step...
Definition: Rotation.cpp:502
3D rotation representations.
Class declarations for useful 3D math types.
Real MatrixAngleAboutAxis(const Matrix3 &R, const Vector3 &a)
Returns the angle that R makes about the axis a.
Definition: Rotation.cpp:478
"Moment", a.k.a. exponential map, 3D rotation parameterization
Definition: rotation.h:99
void GetMinimalRotation(const Vector3 &x, const Vector3 &y, Matrix3 &R)
Definition: Rotation.cpp:199
void CenteredDifferenceAngularAccel(const Matrix3 &R_1, const Matrix3 &R0, const Matrix3 &R1, Real h, Vector3 &a)
Computes the angular acceleration a at time 0, given current rotation, and rotations at previous/next...
Definition: Rotation.cpp:521
Quaternion, a.k.a. Euler parameter, 3D rotation parameterization.
Definition: rotation.h:131
Contains all the definitions in the Math3D package.
Definition: AnyGeometry.h:13
bool GetRotationCenter(const RigidTransform &T, Vector3 &p)
Definition: Rotation.cpp:183
void DirectionCosinesDerivative(const Vector &R, const Vector3 &z, Vector &dR)
Definition: Rotation.cpp:269
void MatrixDerivative(const Matrix3 &R, const Vector3 &z, Matrix3 &dR)
Derivative dR of the rotation matrix R of a frame as it rotates about the axis z. ...
Definition: Rotation.cpp:261
void EulerAngleMoments(const Vector3 &theta, int u, int v, int w, Matrix3 &A)
Definition: Rotation.cpp:393
bool EulerAngleDerivative(const Vector3 &theta, const Vector3 &z, int u, int v, int w, Vector3 &dtheta)
Calculates the derivative of the euler angle representation of R as it rotates around the axis z...
Definition: Rotation.cpp:416
A 3x3 matrix class.
Definition: math3d/primitives.h:469
void MomentDerivative(const Matrix3 &R, const Vector3 &z, Vector3 &dm)
Definition: Rotation.cpp:284
void GetMinimalRotationToPlane(const Vector3 &x, const Vector3 &y, Matrix3 &R)
Definition: Rotation.cpp:233
9-D rotation parameterization that lays out the columns of the rotation matrix in a single vector...
Definition: Rotation.h:21
void AngularVelocityEulerAngle(const Vector3 &theta, const Vector3 &dtheta, int u, int v, int w, Vector3 &z)
Calculates the angular velocity z of the rotation described by theta given its time derivatives dthet...
Definition: Rotation.cpp:427
void QuaternionDerivative(const Matrix3 &R, const Vector3 &z, Quaternion &dq)
Definition: Rotation.cpp:364
Real MatrixAbsoluteAngle(const Matrix3 &R)
Returns the absolute angle of the rotation R.
Definition: Rotation.cpp:434
Real AxisRotationMagnitude(const Matrix3 &R, const Vector3 &a)
Computes the "amount" of rotation about the axis a that thegiven rotation matrix R performs...
Definition: Rotation.cpp:540
void MatrixDerivative2(const Matrix3 &R, const Vector3 &w, const Vector3 &a, Matrix3 &ddR)
Second derivative ddR of the rotation matrix R of a frame as it rotates with velocity w...
Definition: Rotation.cpp:489