16 const size_t constrIndex,
20 std::array<Eigen::Matrix<T, 9, 3>, 3>& dfdv)
const {
25 v[0] = state.
rotation() * rotMat.col(0);
26 v[1] = state.
rotation() * rotMat.col(1);
27 v[2] = state.
rotation() * rotMat.col(2);
34 f = Eigen::Map<Vector<T, 9>>(val.data(), val.size());
36 for (
size_t iVec = 0; iVec < 3; ++iVec) {
38 dfdv[iVec].template middleRows<3>(iVec * 3).setIdentity();
44 const size_t constrIndex,
48 std::array<Eigen::Matrix<T, 9, 3>, 3>& dfdv)
const {
55 f = Eigen::Map<Vector<T, 9>>(val.data(), val.size());
61 for (
size_t iVec = 0; iVec < 3; ++iVec) {
63 dfdv[iVec].template middleRows<3>(iVec * 3) = invTarget;
std::vector< OrientationDataT< T > > constraints_
The OrientationErrorFunction minimizes the F-norm of the element-wise difference of a 3x3 rotation ma...
void evalFunction(size_t constrIndex, const JointStateT< T > &state, Vector< T, 9 > &f, std::array< Vector3< T >, 3 > &v, std::array< Eigen::Matrix< T, 9, 3 >, 3 > &dfdv) const final
The OrientationRotDiffErrorFunction minimizes the F-norm of (R_target^T * R_current - I),...
void evalFunction(size_t constrIndex, const JointStateT< T > &state, Vector< T, 9 > &f, std::array< Vector3< T >, 3 > &v, std::array< Eigen::Matrix< T, 9, 3 >, 3 > &dfdv) const final
Eigen::Matrix< T, 3, 3 > Matrix3
Eigen::Matrix< T, Dim, 1, Options > Vector
Column vector alias (an Nx1 Eigen matrix).
Profiling macros that dispatch to one of three backends, selected at compile time:
#define MT_PROFILE_FUNCTION()
Represents the state of a joint with local and global transformations.
const Quaternion< T > & rotation() const
Access the joint's global rotation quaternion.
Constraint data on 3x3 rotation represented in quaternions.
Eigen::Quaternion< T > target
Target rotation in global space.
Eigen::Quaternion< T > offset
Rotation offset in the parent space.