dart
Public Member Functions | Public Attributes | Protected Member Functions | Protected Attributes | List of all members
HuboArmIK Class Reference

The HuboArmIK is based on the derivation of Hubo's arm IK by Matt Zucker. More...

Inheritance diagram for HuboArmIK:
Inheritance graph
[legend]
Collaboration diagram for HuboArmIK:
Collaboration graph
[legend]

Public Member Functions

 HuboArmIK (InverseKinematics *_ik, const std::string &baseLinkName, const Analytical::Properties &properties=Analytical::Properties())
 
std::unique_ptr< GradientMethodclone (InverseKinematics *_newIK) const override
 Enable this GradientMethod to be cloned to a new IK module.
 
const std::vector< Solution > & computeSolutions (const Eigen::Isometry3d &_desiredBodyTf) override
 Use this function to fill the entries of the mSolutions variable. More...
 
const std::vector< std::size_t > & getDofs () const override
 Get a list of the DOFs that will be included in the entries of the solutions returned by getSolutions(). More...
 
- Public Member Functions inherited from dart::dynamics::InverseKinematics::Analytical
 Analytical (InverseKinematics *_ik, const std::string &_methodName, const Properties &_properties)
 Constructor.
 
virtual ~Analytical ()=default
 Virtual destructor.
 
const std::vector< Solution > & getSolutions ()
 Get the solutions for this IK module, along with a tag indicating whether each solution is valid. More...
 
const std::vector< Solution > & getSolutions (const Eigen::Isometry3d &_desiredTf)
 Get the solutions for this IK module, along with a tag indicating whether each solution is valid. More...
 
void computeGradient (const Eigen::Vector6d &_error, Eigen::VectorXd &_grad) override
 You should not need to override this function. More...
 
void setPositions (const Eigen::VectorXd &_config)
 Set the configuration of the DOFs. More...
 
Eigen::VectorXd getPositions () const
 Get the configuration of the DOFs. More...
 
void setExtraDofUtilization (ExtraDofUtilization _utilization)
 Set how you want extra DOFs to be utilized by the IK module.
 
ExtraDofUtilization getExtraDofUtilization () const
 Get how extra DOFs are being utilized by the IK module.
 
void setExtraErrorLengthClamp (double _clamp)
 Set how much to clamp the error vector that gets applied to extra DOFs.
 
double getExtraErrorLengthClamp () const
 Get how much we will clamp the error vector that gets applied to extra DOFs.
 
void setQualityComparisonFunction (const QualityComparison &_func)
 Set the function that will be used to compare the qualities of two solutions. More...
 
void resetQualityComparisonFunction ()
 Reset the quality comparison function to the default method.
 
Properties getAnalyticalProperties () const
 Get the Properties for this Analytical class.
 
void constructDofMap ()
 Construct a mapping from the DOFs of getDofs() to their indices within the Node's list of dependent DOFs. More...
 
- Public Member Functions inherited from dart::dynamics::InverseKinematics::GradientMethod
 GradientMethod (InverseKinematics *_ik, const std::string &_methodName, const Properties &_properties)
 Constructor.
 
virtual ~GradientMethod ()=default
 Virtual destructor.
 
void evalGradient (const Eigen::VectorXd &_q, Eigen::Map< Eigen::VectorXd > _grad)
 This function is used to handle caching the gradient vector and interfacing with the solver. More...
 
const std::string & getMethodName () const
 Get the name of this GradientMethod.
 
void clampGradient (Eigen::VectorXd &_grad) const
 Clamp the gradient based on the clamp settings of this GradientMethod.
 
void setComponentWiseClamp (double _clamp=DefaultIKGradientComponentClamp)
 Set the component-wise clamp for this GradientMethod. More...
 
double getComponentWiseClamp () const
 Get the component-wise clamp for this GradientMethod.
 
void applyWeights (Eigen::VectorXd &_grad) const
 Apply weights to the gradient based on the weight settings of this GradientMethod. More...
 
void setComponentWeights (const Eigen::VectorXd &_weights)
 Set the weights that will be applied to each component of the gradient. More...
 
const Eigen::VectorXd & getComponentWeights () const
 Get the weights of this GradientMethod.
 
void convertJacobianMethodOutputToGradient (Eigen::VectorXd &grad, const std::vector< std::size_t > &dofs)
 Convert the gradient that gets generated by Jacobian methods into a gradient that can be used by a GradientDescentSolver. More...
 
Properties getGradientMethodProperties () const
 Get the Properties of this GradientMethod.
 
void clearCache ()
 Clear the cache to force the gradient to be recomputed. More...
 
InverseKinematicsgetIK ()
 Returns the IK module that this GradientMethod belongs to.
 
const InverseKinematicsgetIK () const
 Returns the IK module that this GradientMethod belongs to.
 
- Public Member Functions inherited from dart::common::Subject
virtual ~Subject ()
 Destructor will notify all Observers that it is destructing.
 

Public Attributes

const double zeroSize = 1e-8
 

Protected Member Functions

void configure () const
 
- Protected Member Functions inherited from dart::dynamics::InverseKinematics::Analytical
virtual void addExtraDofGradient (Eigen::VectorXd &grad, const Eigen::Vector6d &error, ExtraDofUtilization utilization)
 This function will compute a gradient which utilizes the extra DOFs that go unused by the Analytical solution and then it will add the components of that gradient to the output parameter: grad. More...
 
void checkSolutionJointLimits ()
 Go through the mSolutions vector and tag entries with LIMIT_VIOLATED if any components of their configuration are outside of their position limits. More...
 
- 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.
 

Protected Attributes

bool configured
 
Eigen::Isometry3d shoulderTf
 
Eigen::Isometry3d wristTfInv
 
Eigen::Isometry3d mNodeOffsetTfInv
 
double L3
 
double L4
 
double L5
 
Eigen::Matrix< int, 8, 3 > alterantives
 
std::vector< std::size_t > mDofs
 
std::string mBaseLinkName
 
WeakBodyNodePtr mBaseLink
 
JacobianNodemWristEnd
 
- Protected Attributes inherited from dart::dynamics::InverseKinematics::Analytical
std::vector< SolutionmSolutions
 Vector of solutions.
 
UniqueProperties mAnalyticalP
 Properties for this Analytical IK solver.
 
- Protected Attributes inherited from dart::dynamics::InverseKinematics::GradientMethod
common::sub_ptr< InverseKinematicsmIK
 The IK module that this GradientMethod belongs to.
 
std::string mMethodName
 The name of this method.
 
Eigen::VectorXd mLastPositions
 The last positions that was passed to this GradientMethod.
 
Eigen::VectorXd mLastGradient
 The last gradient that was computed by this GradientMethod.
 
Properties mGradientP
 Properties for this GradientMethod.
 
- Protected Attributes inherited from dart::common::Subject
std::set< Observer * > mObservers
 List of current Observers.
 

Additional Inherited Members

- Public Types inherited from dart::dynamics::InverseKinematics::Analytical
enum  Validity_t { VALID = 0, OUT_OF_REACH = 1 << 0, LIMIT_VIOLATED = 1 << 1 }
 Bitwise enumerations that are used to describe some properties of each solution produced by the analytical IK. More...
 
enum  ExtraDofUtilization { UNUSED = 0, PRE_ANALYTICAL, POST_ANALYTICAL, PRE_AND_POST_ANALYTICAL }
 If there are extra DOFs in the IK module which your Analytical solver implementation does not make use of, those DOFs can be used to supplement the analytical solver using Jacobian transpose iteration. More...
 
typedef std::function< bool(const Eigen::VectorXd &_better, const Eigen::VectorXd &_worse, const InverseKinematics *_ik)> QualityComparison
 

Detailed Description

The HuboArmIK is based on the derivation of Hubo's arm IK by Matt Zucker.

Member Function Documentation

◆ computeSolutions()

const std::vector<Solution>& HuboArmIK::computeSolutions ( const Eigen::Isometry3d &  _desiredBodyTf)
inlineoverridevirtual

Use this function to fill the entries of the mSolutions variable.

Be sure to clear the mSolutions vector at the start, and to also return the mSolutions vector at the end. Note that you are not expected to evaluate any of the solutions for their quality. However, you should set the Solution::mValidity flag to OUT_OF_REACH for each solution that does not actually reach the desired transform, and you should call checkSolutionJointLimits() and the end of the function, which will set the LIMIT_VIOLATED flags of any configurations that are outside of the position limits.

Implements dart::dynamics::InverseKinematics::Analytical.

◆ getDofs()

const std::vector<std::size_t>& HuboArmIK::getDofs ( ) const
inlineoverridevirtual

Get a list of the DOFs that will be included in the entries of the solutions returned by getSolutions().

Ideally, this should match up with the DOFs being used by the InverseKinematics module, but this might not always be possible, so this function ensures that solutions can be interpreted correctly.

Implements dart::dynamics::InverseKinematics::Analytical.


The documentation for this class was generated from the following file: