|
Momentum
A library for solving nonlinear optimization problems related to human body kinematics
|
#include <fully_differentiable_pose_prior_error_function.h>
Public Member Functions | |
| FullyDifferentiablePosePriorErrorFunctionT (const Skeleton &skel, const ParameterTransform &pt, std::vector< std::string > names) | |
| ~FullyDifferentiablePosePriorErrorFunctionT () override | |
| FullyDifferentiablePosePriorErrorFunctionT (const FullyDifferentiablePosePriorErrorFunctionT &)=default | |
| FullyDifferentiablePosePriorErrorFunctionT (FullyDifferentiablePosePriorErrorFunctionT &&) noexcept=default | |
| FullyDifferentiablePosePriorErrorFunctionT & | operator= (const FullyDifferentiablePosePriorErrorFunctionT &)=default |
| FullyDifferentiablePosePriorErrorFunctionT & | operator= (FullyDifferentiablePosePriorErrorFunctionT &&) noexcept=default |
| void | setPosePrior (const VectorX< T > &pi, const MatrixX< T > &mmu, const std::vector< MatrixX< T > > &W, const VectorX< T > &sigma) |
| std::vector< std::string > | inputs () const final |
| Eigen::Index | getInputSize (const std::string &name) const final |
| const char * | name () const final |
| Eigen::VectorX< T > | d_gradient_d_input_dot (const std::string &inputName, const ModelParametersT< T > ¶ms, const SkeletonStateT< T > &state, Eigen::Ref< const Eigen::VectorX< T > > inputVec) final |
| Public Member Functions inherited from momentum::FullyDifferentiableSkeletonErrorFunctionT< T > | |
| virtual | ~FullyDifferentiableSkeletonErrorFunctionT ()=default |
| Eigen::VectorX< T > | getInput (const std::string &name) const |
| void | getInput (const std::string &name, Eigen::Ref< Eigen::VectorX< T > > value) const |
| void | setInput (const std::string &name, Eigen::Ref< const Eigen::VectorX< T > > value) |
| Public Member Functions inherited from momentum::PosePriorErrorFunctionT< T > | |
| PosePriorErrorFunctionT (const Skeleton &skel, const ParameterTransform &pt, std::shared_ptr< const MppcaT< T > > pp) | |
| PosePriorErrorFunctionT (const Character &character, std::shared_ptr< const MppcaT< T > > pp) | |
| void | setPosePrior (std::shared_ptr< const MppcaT< T > > pp) |
| 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 | logProbability (const ModelParametersT< T > ¶ms) const |
| 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 |
| Eigen::VectorX< T > | getMeanShape (const ModelParametersT< T > ¶ms) 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 const char * | kPi = "pi" |
| static constexpr const char * | kMu = "mu" |
| static constexpr const char * | kW = "W" |
| static constexpr const char * | kSigma = "sigma" |
| static constexpr const char * | kParameterIndices = "parameter_indices" |
Protected Member Functions | |
| void | getInputImp (const std::string &name, Eigen::Ref< Eigen::VectorX< T > > value) const final |
| void | setInputImp (const std::string &name, Eigen::Ref< const Eigen::VectorX< T > > value) final |
| Protected Member Functions inherited from momentum::PosePriorErrorFunctionT< T > | |
| void | loadInternal () |
| void | getBestFitMode (const ModelParametersT< T > ¶ms, size_t &bestIdx, Eigen::VectorX< T > &bestDiff, T &bestR, T &minDist) const |
Protected Attributes | |
| Eigen::VectorX< T > | pi_ |
| Eigen::MatrixX< T > | mmu_ |
| std::vector< Eigen::MatrixX< T > > | W_ |
| Eigen::VectorX< T > | sigma_ |
| const std::vector< std::string > | names_ |
| Protected Attributes inherited from momentum::PosePriorErrorFunctionT< T > | |
| std::vector< size_t > | ppMap_ |
| std::vector< size_t > | invMap_ |
| std::shared_ptr< const MppcaT< T > > | posePrior_ |
| Protected Attributes inherited from momentum::SkeletonErrorFunctionT< T > | |
| const Skeleton & | skeleton_ |
| const ParameterTransform & | parameterTransform_ |
| T | weight_ |
| VectorX< bool > | activeJointParams_ |
| ParameterSet | enabledParameters_ |
| bool | useHessian_ {false} |
Additional Inherited Members | |
| Static Protected Attributes inherited from momentum::PosePriorErrorFunctionT< T > | |
| static constexpr T | kPosePriorWeight = 1e-3 |
Definition at line 20 of file fully_differentiable_pose_prior_error_function.h.
| momentum::FullyDifferentiablePosePriorErrorFunctionT< T >::FullyDifferentiablePosePriorErrorFunctionT | ( | const Skeleton & | skel, |
| const ParameterTransform & | pt, | ||
| std::vector< std::string > | names ) |
Definition at line 34 of file fully_differentiable_pose_prior_error_function.cpp.
References names_, and momentum::PosePriorErrorFunctionT< T >::PosePriorErrorFunctionT().
|
overridedefault |
|
default |
|
defaultnoexcept |
|
finalvirtual |
Implements momentum::FullyDifferentiableSkeletonErrorFunctionT< T >.
Definition at line 190 of file fully_differentiable_pose_prior_error_function.cpp.
References momentum::PosePriorErrorFunctionT< T >::getBestFitMode(), getInputSize(), momentum::kInvalidIndex, kMu, kPi, momentum::PosePriorErrorFunctionT< T >::kPosePriorWeight, kSigma, kW, momentum::mapParameters(), MT_CHECK, MT_THROW_IF, momentum::PosePriorErrorFunctionT< T >::posePrior_, momentum::PosePriorErrorFunctionT< T >::ppMap_, sigma_, momentum::EigenStrongType< Derived, EigenType >::v, W_, and momentum::SkeletonErrorFunctionT< T >::weight_.
|
finalprotectedvirtual |
Implements momentum::FullyDifferentiableSkeletonErrorFunctionT< T >.
Definition at line 100 of file fully_differentiable_pose_prior_error_function.cpp.
References momentum::cast(), kMu, kPi, kSigma, kW, mmu_, MT_CHECK, MT_THROW, MT_THROW_IF, name(), pi_, momentum::PosePriorErrorFunctionT< T >::posePrior_, sigma_, and W_.
|
nodiscardfinalvirtual |
Implements momentum::FullyDifferentiableSkeletonErrorFunctionT< T >.
Definition at line 79 of file fully_differentiable_pose_prior_error_function.cpp.
References kMu, kPi, kSigma, kW, mmu_, MT_THROW, name(), pi_, sigma_, and W_.
Referenced by d_gradient_d_input_dot().
|
nodiscardfinalvirtual |
Implements momentum::FullyDifferentiableSkeletonErrorFunctionT< T >.
Definition at line 74 of file fully_differentiable_pose_prior_error_function.cpp.
|
inlinenodiscardfinalvirtual |
Implements momentum::FullyDifferentiableSkeletonErrorFunctionT< T >.
Definition at line 52 of file fully_differentiable_pose_prior_error_function.h.
Referenced by getInputImp(), getInputSize(), and setInputImp().
|
default |
|
defaultnoexcept |
|
finalprotectedvirtual |
Implements momentum::FullyDifferentiableSkeletonErrorFunctionT< T >.
Definition at line 142 of file fully_differentiable_pose_prior_error_function.cpp.
References kMu, kPi, kSigma, kW, mmu_, MT_CHECK, MT_THROW, MT_THROW_IF, name(), names_, pi_, momentum::PosePriorErrorFunctionT< T >::posePrior_, momentum::PosePriorErrorFunctionT< T >::setPosePrior(), sigma_, and W_.
| void momentum::FullyDifferentiablePosePriorErrorFunctionT< T >::setPosePrior | ( | const VectorX< T > & | pi, |
| const MatrixX< T > & | mmu, | ||
| const std::vector< MatrixX< T > > & | W, | ||
| const VectorX< T > & | sigma ) |
Definition at line 46 of file fully_differentiable_pose_prior_error_function.cpp.
References mmu_, MT_THROW_IF, names_, momentum::pi(), pi_, momentum::PosePriorErrorFunctionT< T >::setPosePrior(), sigma_, and W_.
|
staticconstexpr |
Definition at line 45 of file fully_differentiable_pose_prior_error_function.h.
Referenced by d_gradient_d_input_dot(), getInputImp(), getInputSize(), inputs(), and setInputImp().
|
staticconstexpr |
Definition at line 48 of file fully_differentiable_pose_prior_error_function.h.
|
staticconstexpr |
Definition at line 44 of file fully_differentiable_pose_prior_error_function.h.
Referenced by d_gradient_d_input_dot(), getInputImp(), getInputSize(), inputs(), and setInputImp().
|
staticconstexpr |
Definition at line 47 of file fully_differentiable_pose_prior_error_function.h.
Referenced by d_gradient_d_input_dot(), getInputImp(), getInputSize(), inputs(), and setInputImp().
|
staticconstexpr |
Definition at line 46 of file fully_differentiable_pose_prior_error_function.h.
Referenced by d_gradient_d_input_dot(), getInputImp(), getInputSize(), inputs(), and setInputImp().
|
protected |
Definition at line 70 of file fully_differentiable_pose_prior_error_function.h.
Referenced by getInputImp(), getInputSize(), setInputImp(), and setPosePrior().
|
protected |
Definition at line 81 of file fully_differentiable_pose_prior_error_function.h.
Referenced by FullyDifferentiablePosePriorErrorFunctionT(), setInputImp(), and setPosePrior().
|
protected |
Definition at line 67 of file fully_differentiable_pose_prior_error_function.h.
Referenced by getInputImp(), getInputSize(), setInputImp(), and setPosePrior().
|
protected |
Definition at line 79 of file fully_differentiable_pose_prior_error_function.h.
Referenced by d_gradient_d_input_dot(), getInputImp(), getInputSize(), setInputImp(), and setPosePrior().
|
protected |
Definition at line 73 of file fully_differentiable_pose_prior_error_function.h.
Referenced by d_gradient_d_input_dot(), getInputImp(), getInputSize(), setInputImp(), and setPosePrior().