|
Momentum
A library for solving nonlinear optimization problems related to human body kinematics
|
#include <state_error_function.h>
Public Member Functions | |
| StateErrorFunctionT (const Skeleton &skel, const ParameterTransform &pt, RotationErrorType rotationErrorType=RotationErrorType::RotationMatrixDifference) | |
| StateErrorFunctionT (const Character &character, RotationErrorType rotationErrorType=RotationErrorType::RotationMatrixDifference) | |
| double | getError (const ModelParametersT< T > ¶ms, const SkeletonStateT< T > &state, const MeshStateT< T > &meshState) final |
| double | getGradient (const ModelParametersT< T > ¶ms, const SkeletonStateT< T > &state, const MeshStateT< T > &meshState, Eigen::Ref< Eigen::VectorX< T > > gradient) final |
| double | getJacobian (const ModelParametersT< T > ¶ms, const SkeletonStateT< T > &state, const MeshStateT< T > &meshState, Eigen::Ref< Eigen::MatrixX< T > > jacobian, Eigen::Ref< Eigen::VectorX< T > > residual, int &usedRows) final |
| size_t | getJacobianSize () const final |
| void | reset () |
| void | setTargetState (const SkeletonStateT< T > *target) |
| void | setTargetState (const SkeletonStateT< T > &target) |
| void | setTargetState (TransformListT< T > target) |
| void | setTargetWeight (const Eigen::VectorX< T > &weights) |
| void | setTargetWeights (const Eigen::VectorX< T > &posWeight, const Eigen::VectorX< T > &rotWeight) |
| void | setPositionTargetWeights (const Eigen::VectorX< T > &posWeight) |
| Set the target position weights for each joint. | |
| void | setRotationTargetWeights (const Eigen::VectorX< T > &rotWeight) |
| Set the target rotation weights for each joint. | |
| void | setWeights (const float posWeight, const float rotationWeight) |
| const TransformListT< T > & | getTargetState () const |
| const Eigen::VectorX< T > & | getPositionWeights () const |
| const Eigen::VectorX< T > & | getRotationWeights () const |
| const T & | getPositionWeight () const |
| const T & | getRotationWeight () const |
| Public Member Functions inherited from momentum::SkeletonErrorFunctionT< T > | |
| SkeletonErrorFunctionT (const Skeleton &skel, const ParameterTransform &pt) | |
| virtual | ~SkeletonErrorFunctionT ()=default |
| const Skeleton & | getSkeleton () const |
| const ParameterTransform & | getParameterTransform () const |
| virtual const Character * | getCharacter () const |
| For mesh-based error functions, get access to the underlying character. | |
| void | setWeight (T w) |
| T | getWeight () const |
| void | setActiveJoints (const VectorX< bool > &aj) |
| void | setEnabledParameters (const ParameterSet &ps) |
| virtual void | getHessian (const ModelParametersT< T > &, const SkeletonStateT< T > &, const MeshStateT< T > &, Eigen::Ref< Eigen::MatrixX< T > >) |
| virtual double | getSolverDerivatives (const ModelParametersT< T > ¶meters, const SkeletonStateT< T > &state, const MeshStateT< T > &meshState, const size_t actualParameters, Eigen::MatrixX< T > &hess, Eigen::VectorX< T > &grad) |
| virtual bool | needsMesh () const |
Static Public Attributes | |
| static constexpr T | kPositionWeight = 1e-3 |
| static constexpr T | kOrientationWeight = 1e+0 |
Additional Inherited Members | |
| Protected Attributes inherited from momentum::SkeletonErrorFunctionT< T > | |
| const Skeleton & | skeleton_ |
| const ParameterTransform & | parameterTransform_ |
| T | weight_ |
| VectorX< bool > | activeJointParams_ |
| ParameterSet | enabledParameters_ |
| bool | useHessian_ {false} |
Definition at line 35 of file state_error_function.h.
| momentum::StateErrorFunctionT< T >::StateErrorFunctionT | ( | const Skeleton & | skel, |
| const ParameterTransform & | pt, | ||
| RotationErrorType | rotationErrorType = RotationErrorType::RotationMatrixDifference ) |
Definition at line 126 of file state_error_function.cpp.
References momentum::SkeletonErrorFunctionT< T >::skeleton_, and momentum::SkeletonErrorFunctionT< T >::SkeletonErrorFunctionT().
Referenced by momentum::FullyDifferentiableStateErrorFunctionT< T >::FullyDifferentiableStateErrorFunctionT(), and StateErrorFunctionT().
|
explicit |
Definition at line 138 of file state_error_function.cpp.
References StateErrorFunctionT().
|
nodiscardfinalvirtual |
Reimplemented from momentum::SkeletonErrorFunctionT< T >.
Definition at line 199 of file state_error_function.cpp.
References momentum::SkeletonStateT< T >::jointParameters, momentum::SkeletonStateT< T >::jointState, kOrientationWeight, momentum::kParametersPerJoint, kPositionWeight, MT_CHECK, MT_PROFILE_FUNCTION, momentum::QuaternionLogMap, momentum::quaternionLogMap(), momentum::RotationMatrixDifference, momentum::SkeletonErrorFunctionT< T >::skeleton_, and momentum::SkeletonErrorFunctionT< T >::weight_.
|
finalvirtual |
Reimplemented from momentum::SkeletonErrorFunctionT< T >.
Definition at line 265 of file state_error_function.cpp.
References momentum::SkeletonErrorFunctionT< T >::activeJointParams_, momentum::gradient_jointParams_to_modelParams(), momentum::SkeletonStateT< T >::jointParameters, momentum::SkeletonStateT< T >::jointState, momentum::kInvalidIndex, kOrientationWeight, momentum::kParametersPerJoint, kPositionWeight, MT_CHECK, MT_PROFILE_FUNCTION, momentum::SkeletonErrorFunctionT< T >::parameterTransform_, momentum::QuaternionLogMap, momentum::quaternionLogMap(), momentum::quaternionLogMapDerivative(), momentum::RotationMatrixDifference, momentum::SkeletonErrorFunctionT< T >::skeleton_, and momentum::SkeletonErrorFunctionT< T >::weight_.
|
finalvirtual |
Reimplemented from momentum::SkeletonErrorFunctionT< T >.
Definition at line 407 of file state_error_function.cpp.
References momentum::SkeletonErrorFunctionT< T >::activeJointParams_, momentum::jacobian_jointParams_to_modelParams(), momentum::SkeletonStateT< T >::jointState, momentum::kInvalidIndex, kOrientationWeight, momentum::kParametersPerJoint, kPositionWeight, MT_CHECK, MT_PROFILE_FUNCTION, momentum::SkeletonErrorFunctionT< T >::parameterTransform_, momentum::QuaternionLogMap, momentum::quaternionLogMap(), momentum::quaternionLogMapDerivative(), momentum::RotationMatrixDifference, momentum::SkeletonErrorFunctionT< T >::skeleton_, and momentum::SkeletonErrorFunctionT< T >::weight_.
|
nodiscardfinalvirtual |
Reimplemented from momentum::SkeletonErrorFunctionT< T >.
Definition at line 394 of file state_error_function.cpp.
References momentum::QuaternionLogMap.
|
inlinenodiscard |
Definition at line 96 of file state_error_function.h.
|
inlinenodiscard |
|
inlinenodiscard |
Definition at line 99 of file state_error_function.h.
|
inlinenodiscard |
|
inlinenodiscard |
Definition at line 86 of file state_error_function.h.
Referenced by momentum::FullyDifferentiableStateErrorFunctionT< T >::d_gradient_d_input_dot(), and momentum::FullyDifferentiableStateErrorFunctionT< T >::getInputImp().
| void momentum::StateErrorFunctionT< T >::reset | ( | ) |
Definition at line 144 of file state_error_function.cpp.
References momentum::SkeletonErrorFunctionT< T >::skeleton_.
| void momentum::StateErrorFunctionT< T >::setPositionTargetWeights | ( | const Eigen::VectorX< T > & | posWeight | ) |
Set the target position weights for each joint.
| posWeight | Per-joint position weights. |
Definition at line 187 of file state_error_function.cpp.
References MT_CHECK.
| void momentum::StateErrorFunctionT< T >::setRotationTargetWeights | ( | const Eigen::VectorX< T > & | rotWeight | ) |
Set the target rotation weights for each joint.
| rotWeight | Per-joint rotation weights. |
Definition at line 193 of file state_error_function.cpp.
References MT_CHECK.
| void momentum::StateErrorFunctionT< T >::setTargetState | ( | const SkeletonStateT< T > & | target | ) |
Definition at line 156 of file state_error_function.cpp.
References momentum::SkeletonStateT< T >::jointState, MT_CHECK, setTargetState(), and momentum::SkeletonStateT< T >::toTransforms().
| void momentum::StateErrorFunctionT< T >::setTargetState | ( | const SkeletonStateT< T > * | target | ) |
Definition at line 150 of file state_error_function.cpp.
References MT_CHECK, and setTargetState().
Referenced by momentum::FullyDifferentiableStateErrorFunctionT< T >::setInputImp(), setTargetState(), and setTargetState().
| void momentum::StateErrorFunctionT< T >::setTargetState | ( | TransformListT< T > | target | ) |
Definition at line 162 of file state_error_function.cpp.
References MT_CHECK.
| void momentum::StateErrorFunctionT< T >::setTargetWeight | ( | const Eigen::VectorX< T > & | weights | ) |
Definition at line 168 of file state_error_function.cpp.
References MT_CHECK.
| void momentum::StateErrorFunctionT< T >::setTargetWeights | ( | const Eigen::VectorX< T > & | posWeight, |
| const Eigen::VectorX< T > & | rotWeight ) |
Definition at line 176 of file state_error_function.cpp.
References MT_CHECK.
Referenced by momentum::FullyDifferentiableStateErrorFunctionT< T >::setInputImp().
|
inline |
Definition at line 81 of file state_error_function.h.
|
staticconstexpr |
Definition at line 116 of file state_error_function.h.
Referenced by getError(), getGradient(), and getJacobian().
|
staticconstexpr |
Definition at line 115 of file state_error_function.h.
Referenced by getError(), getGradient(), and getJacobian().