dart
|
The WholeBodyIK class provides an interface for simultaneously solving all the IK constraints of all BodyNodes and EndEffectors belonging to a single Skeleton. More...
#include <HierarchicalIK.hpp>
Public Member Functions | |
std::shared_ptr< HierarchicalIK > | clone (const SkeletonPtr &_newSkel) const override |
Clone this HierarchicalIK module. | |
virtual std::shared_ptr< WholeBodyIK > | cloneWholeBodyIK (const SkeletonPtr &_newSkel) const |
Same as clone(), but produces a more complete type. | |
void | refreshIKHierarchy () override |
Refresh the IK hierarchy of this IK module. | |
Public Member Functions inherited from dart::dynamics::HierarchicalIK | |
virtual | ~HierarchicalIK ()=default |
Virtual destructor. | |
bool | solve (bool applySolution=true) |
Solve the IK Problem. More... | |
bool | solve (Eigen::VectorXd &positions, bool applySolution=true) |
Same as solve(bool), but the positions vector will be filled with the solved positions. More... | |
bool | findSolution (Eigen::VectorXd &positions) |
Finds a solution of the IK problem without applying the solution. More... | |
bool | solveAndApply (bool allowIncompleteResult=true) |
Identical to findSolution(), but this function applies the solution when the solver successfully found a solution or allowIncompleteResult is set to true. More... | |
bool | solveAndApply (Eigen::VectorXd &positions, bool allowIncompleteResult=true) |
Identical to solveAndApply(bool), but position will be filled with the solved positions. More... | |
void | setObjective (const std::shared_ptr< optimization::Function > &_objective) |
Set the objective function for this HierarchicalIK. | |
const std::shared_ptr< optimization::Function > & | getObjective () |
Get the objective function for this HierarchicalIK. | |
std::shared_ptr< const optimization::Function > | getObjective () const |
Get the objective function for this HierarchicalIK. | |
void | setNullSpaceObjective (const std::shared_ptr< optimization::Function > &_nsObjective) |
Set the null space objective for this HierarchicalIK. | |
const std::shared_ptr< optimization::Function > & | getNullSpaceObjective () |
Get the null space objective for this HierarchicalIK. | |
std::shared_ptr< const optimization::Function > | getNullSpaceObjective () const |
Get the null space objective for this HierarchicalIK. | |
bool | hasNullSpaceObjective () const |
Returns true if this HierarchicalIK has a null space objective. | |
const std::shared_ptr< optimization::Problem > & | getProblem () |
Get the Problem that is being maintained by this HierarchicalIK module. | |
std::shared_ptr< const optimization::Problem > | getProblem () const |
Get the Problem that is being maintained by this HierarchicalIK module. | |
void | resetProblem (bool _clearSeeds=false) |
Reset the Problem that is being maintained by this HierarchicalIK module. More... | |
void | setSolver (const std::shared_ptr< optimization::Solver > &_newSolver) |
Set the Solver that should be used by this IK module, and set it up with the Problem that is configured by this IK module. | |
const std::shared_ptr< optimization::Solver > & | getSolver () |
Get the Solver that is being used by this IK module. | |
std::shared_ptr< const optimization::Solver > | getSolver () const |
Get the Solver that is being used by this IK module. | |
const IKHierarchy & | getIKHierarchy () const |
Get the IK hierarchy of this IK module. | |
const std::vector< Eigen::MatrixXd > & | computeNullSpaces () const |
Compute the null spaces of each level of the hierarchy. | |
Eigen::VectorXd | getPositions () const |
Get the current joint positions of the Skeleton associated with this IK module. More... | |
void | setPositions (const Eigen::VectorXd &_q) |
Set the current joint positions of the Skeleton associated with this IK module. More... | |
SkeletonPtr | getSkeleton () |
Get the Skeleton that this IK module is associated with. | |
ConstSkeletonPtr | getSkeleton () const |
Get the Skeleton that this IK module is associated with. | |
SkeletonPtr | getAffiliation () |
This is the same as getSkeleton(). More... | |
ConstSkeletonPtr | getAffiliation () const |
This is the same as getSkeleton(). More... | |
void | clearCaches () |
Clear the caches of this IK module. More... | |
Public Member Functions inherited from dart::common::Subject | |
virtual | ~Subject () |
Destructor will notify all Observers that it is destructing. | |
Static Public Member Functions | |
static std::shared_ptr< WholeBodyIK > | create (const SkeletonPtr &_skel) |
Create a WholeBodyIK. | |
Protected Member Functions | |
WholeBodyIK (const SkeletonPtr &_skel) | |
Constructor. | |
Protected Member Functions inherited from dart::dynamics::HierarchicalIK | |
HierarchicalIK (const SkeletonPtr &_skeleton) | |
Constructor. | |
void | initialize (const std::shared_ptr< HierarchicalIK > &my_ptr) |
Setup the module. | |
void | copyOverSetup (const std::shared_ptr< HierarchicalIK > &_otherIK) const |
Copy the setup of this HierarchicalIK module into another HierarchicalIK module. | |
Protected Member Functions inherited from dart::common::Subject | |
void | sendDestructionNotification () const |
Send a destruction notification to all Observers. More... | |
void | addObserver (Observer *_observer) const |
Add an Observer to the list of Observers. | |
void | removeObserver (Observer *_observer) const |
Remove an Observer from the list of Observers. | |
Additional Inherited Members | |
Protected Attributes inherited from dart::dynamics::HierarchicalIK | |
WeakSkeletonPtr | mSkeleton |
Pointer to the Skeleton that this IK is tied to. | |
IKHierarchy | mHierarchy |
Cache for the IK hierarcy. | |
std::shared_ptr< optimization::Problem > | mProblem |
The Problem that this IK module is maintaining. | |
std::shared_ptr< optimization::Solver > | mSolver |
The Solver that this IK module will use. | |
optimization::FunctionPtr | mObjective |
The Objective of this IK module. | |
optimization::FunctionPtr | mNullSpaceObjective |
The null space Objective of this IK module. | |
std::weak_ptr< HierarchicalIK > | mPtr |
Weak pointer to self. | |
Eigen::VectorXd | mLastPositions |
Cache for the last positions. | |
std::vector< Eigen::MatrixXd > | mNullSpaceCache |
Cache for null space computations. | |
Eigen::MatrixXd | mPartialNullspaceCache |
Cache for a partial null space computation. | |
Eigen::JacobiSVD< math::Jacobian > | mSVDCache |
Cache for the null space SVD. | |
math::Jacobian | mJacCache |
Cache for Jacobians. | |
Protected Attributes inherited from dart::common::Subject | |
std::set< Observer * > | mObservers |
List of current Observers. | |
The WholeBodyIK class provides an interface for simultaneously solving all the IK constraints of all BodyNodes and EndEffectors belonging to a single Skeleton.