16 const size_t constrIndex,
26 dfdv[0].setIdentity();
31 const size_t constrIndex,
35 std::array<Eigen::Matrix<T, 1, 3>, 1>& dfdv)
const {
46 const size_t constrIndex,
50 std::array<Eigen::Matrix<T, 1, 3>, 1>& dfdv)
const {
56 f[0] = std::acos(std::clamp(
dot, -T(1), T(1)));
62 const T sine = std::sqrt(1 -
dot *
dot);
64 dfdv[0] = -constr.
globalAxis.transpose() / sine;
Angle: compute the angle.
void evalFunction(size_t constrIndex, const JointStateT< T > &state, Vector< T, 1 > &f, std::array< Vector3< T >, 1 > &v, std::array< Eigen::Matrix< T, 1, 3 >, 1 > &dfdv) const final
Cos: compute the dot product between the two axis - cosine of the angle between them.
void evalFunction(size_t constrIndex, const JointStateT< T > &state, Vector< T, 1 > &f, std::array< Vector3< T >, 1 > &v, std::array< Eigen::Matrix< T, 1, 3 >, 1 > &dfdv) const final
Diff: compute the element wise differences between the two axis.
void evalFunction(size_t constrIndex, const JointStateT< T > &state, Vector3< T > &f, std::array< Vector3< T >, 1 > &v, std::array< Matrix3< T >, 1 > &dfdv) const final
std::vector< FixedAxisDataT< T > > constraints_
Eigen::Matrix< T, 3, 3 > Matrix3
FloatP dot(const Eigen::MatrixBase< Derived > &v1, const Vector3P< S > &v2)
Computes dot product of Eigen::Vector3f and 3-vector of packets.
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()
Vector3< T > localAxis
axis in the parent's coordinate frame
Vector3< T > globalAxis
target axis in the global frame
Represents the state of a joint with local and global transformations.
const Quaternion< T > & rotation() const
Access the joint's global rotation quaternion.