MCPcopy Create free account
hub / github.com/dartsim/dart / CheckRotMat

Function CheckRotMat

python/dartpy/eigen_geometry_pybind.cpp:69–85  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

67
68template <typename T>
69void CheckRotMat(const Eigen::Matrix<T, 3, 3>& R)
70{
71 // See `ExpectRotMat`.
72 const T identity_error
73 = (R * R.transpose() - Eigen::Matrix<T, 3, 3>::Identity())
74 .array()
75 .abs()
76 .maxCoeff();
77 DART_UNUSED(identity_error);
78 DART_ASSERT(
79 identity_error < kCheckTolerance && "Rotation matrix is not orthonormal");
80 const T det_error = fabs(R.determinant() - 1);
81 DART_UNUSED(det_error);
82 DART_ASSERT(
83 det_error < kCheckTolerance
84 && "Rotation matrix violates right-hand rule");
85}
86
87template <typename T>
88void CheckIsometry(const Eigen::Transform<T, 3, Eigen::Isometry>& X)

Callers 1

eigen_geometryFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected