33 #ifndef DART_DYNAMICS_INVERSEKINEMATICS_HPP_ 34 #define DART_DYNAMICS_INVERSEKINEMATICS_HPP_ 41 #include "dart/common/Signal.hpp" 42 #include "dart/common/Subject.hpp" 43 #include "dart/common/sub_ptr.hpp" 44 #include "dart/dynamics/JacobianNode.hpp" 45 #include "dart/dynamics/SmartPointer.hpp" 46 #include "dart/math/Geometry.hpp" 47 #include "dart/optimization/Function.hpp" 48 #include "dart/optimization/Problem.hpp" 49 #include "dart/optimization/Solver.hpp" 54 const double DefaultIKTolerance = 1e-6;
55 const double DefaultIKErrorClamp = 1.0;
56 const double DefaultIKGradientComponentClamp = 0.2;
57 const double DefaultIKGradientComponentWeight = 1.0;
58 const double DefaultIKDLSCoefficient = 0.05;
59 const double DefaultIKAngularWeight = 0.4;
60 const double DefaultIKLinearWeight = 1.0;
135 bool solve(
bool applySolution =
true);
143 bool solve(Eigen::VectorXd& positions,
bool applySolution =
true);
218 Eigen::VectorXd& positions,
bool allowIncompleteResult =
true);
271 template <
class DegreeOfFreedomT>
272 void setDofs(
const std::vector<DegreeOfFreedomT*>& _dofs);
277 void setDofs(
const std::vector<std::size_t>& _dofs);
280 const std::vector<std::size_t>&
getDofs()
const;
288 const std::vector<int>&
getDofMap()
const;
293 void setObjective(
const std::shared_ptr<optimization::Function>& _objective);
296 const std::shared_ptr<optimization::Function>&
getObjective();
299 std::shared_ptr<const optimization::Function>
getObjective()
const;
310 const std::shared_ptr<optimization::Function>& _nsObjective);
325 template <
class IKErrorMethod,
typename... Args>
340 template <
class IKGradientMethod,
typename... Args>
362 const std::shared_ptr<optimization::Problem>&
getProblem();
365 std::shared_ptr<const optimization::Problem>
getProblem()
const;
377 void setSolver(
const std::shared_ptr<optimization::Solver>& _newSolver);
380 const std::shared_ptr<optimization::Solver>&
getSolver();
383 std::shared_ptr<const optimization::Solver>
getSolver()
const;
390 void setOffset(
const Eigen::Vector3d& _offset = Eigen::Vector3d::Zero());
395 const Eigen::Vector3d&
getOffset()
const;
408 void setTarget(std::shared_ptr<SimpleFrame> _newTarget);
412 std::shared_ptr<SimpleFrame>
getTarget();
416 std::shared_ptr<const SimpleFrame>
getTarget()
const;
515 std::shared_ptr<optimization::Solver>
mSolver;
559 typedef std::pair<Eigen::Vector6d, Eigen::Vector6d> Bounds;
567 const Bounds& _bounds = Bounds(
568 Eigen::Vector6d::Constant(-DefaultIKTolerance),
569 Eigen::Vector6d::Constant(DefaultIKTolerance)),
571 double _errorClamp = DefaultIKErrorClamp,
573 const Eigen::Vector6d& _errorWeights = Eigen::compose(
574 Eigen::Vector3d::Constant(DefaultIKAngularWeight),
575 Eigen::Vector3d::Constant(DefaultIKLinearWeight)));
579 std::pair<Eigen::Vector6d, Eigen::Vector6d>
mBounds;
594 EIGEN_MAKE_ALIGNED_OPERATOR_NEW
600 const std::string& _methodName,
607 virtual std::unique_ptr<ErrorMethod>
clone(
619 virtual Eigen::Vector6d computeError() = 0;
625 virtual Eigen::Isometry3d computeDesiredTransform(
626 const Eigen::Isometry3d& _currentTf,
const Eigen::Vector6d& _error)
630 const Eigen::Vector6d& evalError(
const Eigen::VectorXd& _q);
633 const std::string& getMethodName()
const;
637 const Eigen::Vector6d& _lower
638 = Eigen::Vector6d::Constant(-DefaultIKTolerance),
639 const Eigen::Vector6d& _upper
640 = Eigen::Vector6d::Constant(DefaultIKTolerance));
643 void setBounds(
const std::pair<Eigen::Vector6d, Eigen::Vector6d>& _bounds);
646 const std::pair<Eigen::Vector6d, Eigen::Vector6d>& getBounds()
const;
649 void setAngularBounds(
650 const Eigen::Vector3d& _lower
651 = Eigen::Vector3d::Constant(-DefaultIKTolerance),
652 const Eigen::Vector3d& _upper
653 = Eigen::Vector3d::Constant(DefaultIKTolerance));
656 void setAngularBounds(
657 const std::pair<Eigen::Vector3d, Eigen::Vector3d>& _bounds);
660 std::pair<Eigen::Vector3d, Eigen::Vector3d> getAngularBounds()
const;
663 void setLinearBounds(
664 const Eigen::Vector3d& _lower
665 = Eigen::Vector3d::Constant(-DefaultIKTolerance),
666 const Eigen::Vector3d& _upper
667 = Eigen::Vector3d::Constant(DefaultIKTolerance));
670 void setLinearBounds(
671 const std::pair<Eigen::Vector3d, Eigen::Vector3d>& _bounds);
674 std::pair<Eigen::Vector3d, Eigen::Vector3d> getLinearBounds()
const;
678 void setErrorLengthClamp(
double _clampSize = DefaultIKErrorClamp);
682 double getErrorLengthClamp()
const;
686 void setErrorWeights(
const Eigen::Vector6d& _weights);
690 const Eigen::Vector6d& getErrorWeights()
const;
694 void setAngularErrorWeights(
695 const Eigen::Vector3d& _weights
696 = Eigen::Vector3d::Constant(DefaultIKAngularWeight));
700 Eigen::Vector3d getAngularErrorWeights()
const;
704 void setLinearErrorWeights(
705 const Eigen::Vector3d& _weights
706 = Eigen::Vector3d::Constant(DefaultIKLinearWeight));
710 Eigen::Vector3d getLinearErrorWeights()
const;
737 EIGEN_MAKE_ALIGNED_OPERATOR_NEW
764 bool computeErrorFromCenter =
true,
765 SimpleFramePtr referenceFrame =
nullptr);
788 Eigen::Isometry3d computeDesiredTransform(
789 const Eigen::Isometry3d& _currentTf,
790 const Eigen::Vector6d& _error)
override;
793 Eigen::Vector6d computeError()
override;
797 void setComputeFromCenter(
bool computeFromCenter);
801 bool isComputingFromCenter()
const;
805 void setReferenceFrame(SimpleFramePtr referenceFrame);
808 ConstSimpleFramePtr getReferenceFrame()
const;
811 Properties getTaskSpaceRegionProperties()
const;
834 double clamp = DefaultIKGradientComponentClamp,
835 const Eigen::VectorXd& weights = Eigen::VectorXd());
841 const std::string& _methodName,
848 virtual std::unique_ptr<GradientMethod>
clone(
866 virtual void computeGradient(
867 const Eigen::Vector6d& _error, Eigen::VectorXd& _grad)
873 const Eigen::VectorXd& _q, Eigen::Map<Eigen::VectorXd> _grad);
876 const std::string& getMethodName()
const;
879 void clampGradient(Eigen::VectorXd& _grad)
const;
883 void setComponentWiseClamp(
double _clamp = DefaultIKGradientComponentClamp);
886 double getComponentWiseClamp()
const;
890 void applyWeights(Eigen::VectorXd& _grad)
const;
898 void setComponentWeights(
const Eigen::VectorXd& _weights);
901 const Eigen::VectorXd& getComponentWeights()
const;
912 void convertJacobianMethodOutputToGradient(
913 Eigen::VectorXd& grad,
const std::vector<std::size_t>& dofs);
916 Properties getGradientMethodProperties()
const;
947 Eigen::VectorXd mInitialPositionsCache;
988 std::unique_ptr<GradientMethod>
clone(
992 void computeGradient(
993 const Eigen::Vector6d& _error, Eigen::VectorXd& _grad)
override;
998 void setDampingCoefficient(
double _damping = DefaultIKDLSCoefficient);
1001 double getDampingCoefficient()
const;
1028 std::unique_ptr<GradientMethod>
clone(
1032 void computeGradient(
1033 const Eigen::Vector6d& _error, Eigen::VectorXd& _grad)
override;
1058 OUT_OF_REACH = 1 << 0,
1059 LIMIT_VIOLATED = 1 << 1
1087 PRE_AND_POST_ANALYTICAL
1095 const Eigen::VectorXd& _config = Eigen::VectorXd(),
1096 int _validity = VALID);
1107 typedef std::function<bool(
1108 const Eigen::VectorXd& _better,
1109 const Eigen::VectorXd& _worse,
1127 double extraErrorLengthClamp = DefaultIKErrorClamp);
1132 double extraErrorLengthClamp,
1133 QualityComparison qualityComparator);
1136 void resetQualityComparisonFunction();
1155 const std::string& _methodName,
1165 const std::vector<Solution>& getSolutions();
1171 const std::vector<Solution>& getSolutions(
1172 const Eigen::Isometry3d& _desiredTf);
1176 void computeGradient(
1177 const Eigen::Vector6d& _error, Eigen::VectorXd& _grad)
override;
1188 virtual const std::vector<Solution>& computeSolutions(
1189 const Eigen::Isometry3d& _desiredBodyTf)
1197 virtual const std::vector<std::size_t>&
getDofs()
const = 0;
1214 void setExtraErrorLengthClamp(
double _clamp);
1218 double getExtraErrorLengthClamp()
const;
1234 void setQualityComparisonFunction(
const QualityComparison& _func);
1237 void resetQualityComparisonFunction();
1248 void constructDofMap();
1262 virtual void addExtraDofGradient(
1263 Eigen::VectorXd& grad,
1264 const Eigen::Vector6d& error,
1272 void checkSolutionJointLimits();
1288 std::vector<std::size_t> mExtraDofs;
1294 std::vector<Solution> mValidSolutionsCache;
1297 std::vector<Solution> mOutOfReachCache;
1300 std::vector<Solution> mLimitViolationCache;
1303 Eigen::VectorXd mConfigCache;
1308 Eigen::VectorXd mRestoreConfigCache;
1311 Eigen::VectorXd mExtraDofGradCache;
1336 double eval(
const Eigen::VectorXd& _x)
override;
1340 const Eigen::VectorXd& _x, Eigen::Map<Eigen::VectorXd> _grad)
override;
1358 EIGEN_MAKE_ALIGNED_OPERATOR_NEW
1382 double eval(
const Eigen::VectorXd& _x)
override;
1386 const Eigen::VectorXd& _x, Eigen::Map<Eigen::VectorXd> _grad)
override;
1396 #include "dart/dynamics/detail/InverseKinematics.hpp" 1398 #endif // DART_DYNAMICS_INVERSEKINEMATICS_HPP_ Definition: InverseKinematics.hpp:1091
InverseKinematics & operator=(const InverseKinematics &)=delete
Assignment is not allowed.
std::vector< Solution > mSolutions
Vector of solutions.
Definition: InverseKinematics.hpp:1275
sub_ptr is a pointer to a Subject.
Definition: sub_ptr.hpp:46
std::unique_ptr< ErrorMethod > mErrorMethod
The method that this IK module will use to compute errors.
Definition: InverseKinematics.hpp:499
Eigen::VectorXd getPositions() const
Get the current joint positions of the Skeleton.
Definition: InverseKinematics.cpp:1660
std::shared_ptr< SimpleFrame > getTarget()
Get the target that is being used by this IK module.
Definition: InverseKinematics.cpp:1603
ExtraDofUtilization mExtraDofUtilization
Flag for how to use the extra DOFs in the IK module.
Definition: InverseKinematics.hpp:1116
The Subject class is a base class for any object that wants to report when it gets destroyed...
Definition: Subject.hpp:57
void setNullSpaceObjective(const std::shared_ptr< optimization::Function > &_nsObjective)
Set an objective function that should be minimized within the null space of the inverse kinematics co...
Definition: InverseKinematics.cpp:1449
Eigen::JacobiSVD< math::Jacobian > mSVDCache
Cache for the null space SVD.
Definition: InverseKinematics.hpp:1350
UniqueProperties mAnalyticalP
Properties for this Analytical IK solver.
Definition: InverseKinematics.hpp:1278
std::shared_ptr< optimization::Function > mNullSpaceObjective
Null space objective for the IK module.
Definition: InverseKinematics.hpp:496
void useWholeBody()
Use all relevant joints on the Skeleton to solve the IK.
Definition: InverseKinematics.cpp:1385
common::Connection mNodeConnection
Connection to the node update.
Definition: InverseKinematics.hpp:477
int mValidity
Bitmap for whether this configuration is valid.
Definition: InverseKinematics.hpp:1103
The InverseKinematics class provides a convenient way of setting up an IK optimization problem...
Definition: InverseKinematics.hpp:75
double mDamping
Damping coefficient.
Definition: InverseKinematics.hpp:965
Definition: InverseKinematics.hpp:971
const std::shared_ptr< optimization::Solver > & getSolver()
Get the Solver that is being used by this IK module.
Definition: InverseKinematics.cpp:1552
The Properties struct contains settings that are commonly used by methods that compute error for inve...
Definition: InverseKinematics.hpp:563
bool hasNullSpaceObjective() const
Returns false if the null space objective does nothing.
Definition: InverseKinematics.cpp:1470
Definition: InverseKinematics.hpp:824
virtual ~InverseKinematics()
Virtual destructor.
Definition: InverseKinematics.cpp:50
std::vector< int > mDofMap
Map for the DOFs that are to be used by this IK module.
Definition: InverseKinematics.hpp:490
Properties mErrorP
The properties of this ErrorMethod.
Definition: InverseKinematics.hpp:733
UniqueProperties mTaskSpaceP
Properties of this TaskSpaceRegion.
Definition: InverseKinematics.hpp:815
InverseKinematicsPtr clone(JacobianNode *_newNode) const
Clone this IK module, but targeted at a new Node.
Definition: InverseKinematics.cpp:166
GradientMethod & getGradientMethod()
Get the GradientMethod for this IK module.
Definition: InverseKinematics.cpp:1488
The TaskSpaceRegion is a nicely generalized method for computing the error of an IK Problem...
Definition: InverseKinematics.hpp:743
void setPositions(const Eigen::VectorXd &_q)
Set the current joint positions of the Skeleton.
Definition: InverseKinematics.cpp:1666
math::Jacobian mJacobian
Jacobian cache for the IK module.
Definition: InverseKinematics.hpp:530
std::shared_ptr< SimpleFrame > mTarget
Target that this IK module should use.
Definition: InverseKinematics.hpp:524
bool hasOffset() const
This returns false if the offset for the inverse kinematics is a zero vector.
Definition: InverseKinematics.cpp:1582
const std::shared_ptr< optimization::Problem > & getProblem()
Get the Problem that is being maintained by this IK module.
Definition: InverseKinematics.cpp:1513
bool solveAndApply(bool allowIncompleteResult=true)
Identical to findSolution(), but this function applies the solution when the solver successfully foun...
Definition: InverseKinematics.cpp:132
This class should be inherited by optimization::Function classes that have a dependency on the Invers...
Definition: InverseKinematics.hpp:543
The InverseKinematics::Objective Function is simply used to merge the objective and null space object...
Definition: InverseKinematics.hpp:1320
void useChain()
When solving the IK for this module's Node, use the longest available dynamics::Chain that goes from ...
Definition: InverseKinematics.cpp:1371
bool mComputeErrorFromCenter
Setting this to true (which is default) will tell it to compute the error based on the center of the ...
Definition: InverseKinematics.hpp:755
SimpleFramePtr mReferenceFrame
The reference frame that the task space region is expressed.
Definition: InverseKinematics.hpp:760
std::shared_ptr< optimization::Problem > mProblem
The Problem that will be maintained by this IK module.
Definition: InverseKinematics.hpp:512
Eigen::Vector6d mErrorWeights
These weights will be applied to the error vector component-wise.
Definition: InverseKinematics.hpp:591
Eigen::Vector6d mLastError
The last error vector computed by this ErrorMethod.
Definition: InverseKinematics.hpp:730
IKErrorMethod & setErrorMethod(Args &&... args)
Set the ErrorMethod for this IK module.
Definition: InverseKinematics.hpp:45
bool isActive() const
Returns true if this IK module is allowed to be active in a HierarchicalIK.
Definition: InverseKinematics.cpp:1353
Analytical is a base class that should be inherited by methods that are made to solve the IK analytic...
Definition: InverseKinematics.hpp:1050
void clearCaches()
Clear the caches of this IK module.
Definition: InverseKinematics.cpp:1681
Definition: Aspect.cpp:40
The JacobianNode class serves as a common interface for BodyNodes and EndEffectors to both be used as...
Definition: JacobianNode.hpp:54
sub_ptr< InverseKinematics > mIK
Pointer to this Objective's IK module.
Definition: InverseKinematics.hpp:1344
Definition: InverseKinematics.hpp:768
Eigen::VectorXd mGradCache
Cache for the gradient of the Objective.
Definition: InverseKinematics.hpp:1347
JacobianDLS refers to the Damped Least Squares Jacobian Pseudoinverse (specifically, Moore-Penrose Pseudoinverse).
Definition: InverseKinematics.hpp:959
static InverseKinematicsPtr create(JacobianNode *_node)
Create an InverseKinematics module for a specified node.
Definition: InverseKinematics.cpp:43
sub_ptr< JacobianNode > mNode
JacobianNode that this IK module is associated with.
Definition: InverseKinematics.hpp:527
The InverseKinematics::Constraint Function is simply meant to be used to merge the ErrorMethod and Gr...
Definition: InverseKinematics.hpp:1368
void setHierarchyLevel(std::size_t _level)
Set the hierarchy level of this module.
Definition: InverseKinematics.cpp:1359
double mComponentWiseClamp
The component-wise clamp for this GradientMethod.
Definition: InverseKinematics.hpp:827
bool solve(bool applySolution=true)
Solve the IK Problem.
Definition: InverseKinematics.cpp:57
bool mHasOffset
True if the offset is non-zero.
Definition: InverseKinematics.hpp:521
UniqueProperties mDLSProperties
Properties of this Damped Least Squares method.
Definition: InverseKinematics.hpp:1008
const math::Jacobian & computeJacobian() const
Compute the Jacobian for this IK module's node, using the Skeleton's current joint positions and the ...
Definition: InverseKinematics.cpp:1639
JacobianNode * getAffiliation()
This is the same as getNode().
Definition: InverseKinematics.cpp:1627
std::pair< Eigen::Vector6d, Eigen::Vector6d > mBounds
Bounds that define the acceptable range of the Node's transform relative to its target frame...
Definition: InverseKinematics.hpp:579
common::sub_ptr< InverseKinematics > mIK
Pointer to the IK module of this ErrorMethod.
Definition: InverseKinematics.hpp:721
std::size_t getHierarchyLevel() const
Get the hierarchy level of this modle.
Definition: InverseKinematics.cpp:1365
JacobianTranspose will simply apply the transpose of the Jacobian to the error vector in order to com...
Definition: InverseKinematics.hpp:1017
ErrorMethod & getErrorMethod()
Get the ErrorMethod for this IK module.
Definition: InverseKinematics.cpp:1476
const std::shared_ptr< optimization::Function > & getObjective()
Get the objective function for this IK module.
Definition: InverseKinematics.cpp:1436
Eigen::MatrixXd mNullSpaceCache
Cache for the null space.
Definition: InverseKinematics.hpp:1354
const std::vector< std::size_t > & getDofs() const
Get the indices of the DOFs that this IK module will use when solving.
Definition: InverseKinematics.cpp:1417
ErrorMethod is a base class for different ways of computing the error of an InverseKinematics module...
Definition: InverseKinematics.hpp:556
std::shared_ptr< optimization::Solver > mSolver
The solver that this IK module will use for iterative methods.
Definition: InverseKinematics.hpp:515
const Eigen::Vector3d & getOffset() const
Get the offset from the origin of the body frame that will be used when performing inverse kinematics...
Definition: InverseKinematics.cpp:1576
ExtraDofUtilization
If there are extra DOFs in the IK module which your Analytical solver implementation does not make us...
Definition: InverseKinematics.hpp:1082
GradientMethod is a base class for different ways of computing the gradient of an InverseKinematics m...
Definition: InverseKinematics.hpp:821
Eigen::VectorXd mLastGradient
The last gradient that was computed by this GradientMethod.
Definition: InverseKinematics.hpp:939
const std::shared_ptr< optimization::Function > & getNullSpaceObjective()
Get the null space objective for this IK module.
Definition: InverseKinematics.cpp:1457
IKGradientMethod & setGradientMethod(Args &&... args)
Set the GradientMethod for this IK module.
Definition: InverseKinematics.hpp:55
Definition: Function.hpp:45
Analytical * getAnalytical()
Get the Analytical IK method for this module, if one is available.
Definition: InverseKinematics.cpp:1501
void resetProblem(bool _clearSeeds=false)
Reset the Problem that is being maintained by this IK module.
Definition: InverseKinematics.cpp:1526
std::size_t mHierarchyLevel
Hierarchy level for this IK module.
Definition: InverseKinematics.hpp:483
Definition: InverseKinematics.hpp:746
QualityComparison mQualityComparator
Function for comparing the qualities of solutions.
Definition: InverseKinematics.hpp:1122
bool mActive
True if this IK module should be active in its IK hierarcy.
Definition: InverseKinematics.hpp:480
void setActive(bool _active=true)
If this IK module is set to active, then it will be utilized by any HierarchicalIK that has it in its...
Definition: InverseKinematics.cpp:1341
Eigen::VectorXd mComponentWeights
The weights for this GradientMethod.
Definition: InverseKinematics.hpp:830
sub_ptr< InverseKinematics > mIK
Pointer to this Constraint's IK module.
Definition: InverseKinematics.hpp:1390
const std::vector< int > & getDofMap() const
When a Jacobian is computed for a JacobianNode, it will include a column for every DegreeOfFreedom th...
Definition: InverseKinematics.cpp:1423
Eigen::VectorXd mLastPositions
The last positions that was passed to this GradientMethod.
Definition: InverseKinematics.hpp:936
void setInactive()
Equivalent to setActive(false)
Definition: InverseKinematics.cpp:1347
Definition: InverseKinematics.hpp:962
Validity_t
Bitwise enumerations that are used to describe some properties of each solution produced by the analy...
Definition: InverseKinematics.hpp:1055
Analytical * mAnalytical
If mGradientMethod is an Analytical extension, then this will have the same value is mGradientMethod...
Definition: InverseKinematics.hpp:509
Eigen::VectorXd mConfig
Configuration computed by the Analytical solver.
Definition: InverseKinematics.hpp:1099
JacobianNode * getNode()
Get the JacobianNode that this IK module operates on.
Definition: InverseKinematics.cpp:1615
Eigen::VectorXd mLastPositions
The last joint positions passed into this ErrorMethod.
Definition: InverseKinematics.hpp:727
void resetNodeConnection()
Reset the signal connection for this IK module's Node.
Definition: InverseKinematics.cpp:1853
Definition: InverseKinematics.hpp:1113
void setTarget(std::shared_ptr< SimpleFrame > _newTarget)
Set the target for this IK module.
Definition: InverseKinematics.cpp:1588
std::string mMethodName
Name of this error method.
Definition: InverseKinematics.hpp:724
InverseKinematics(const InverseKinematics &)=delete
Copying is not allowed.
double mExtraErrorLengthClamp
How much to clamp the extra error that gets applied to DOFs.
Definition: InverseKinematics.hpp:1119
Eigen::Vector3d mOffset
The offset that this IK module should use when computing IK.
Definition: InverseKinematics.hpp:518
void setOffset(const Eigen::Vector3d &_offset=Eigen::Vector3d::Zero())
Inverse kinematics can be performed on any point within the body frame.
Definition: InverseKinematics.cpp:1564
void initialize()
Gets called during construction.
Definition: InverseKinematics.cpp:1808
std::string mMethodName
The name of this method.
Definition: InverseKinematics.hpp:933
std::shared_ptr< optimization::Function > mObjective
Objective for the IK module.
Definition: InverseKinematics.hpp:493
double mErrorLengthClamp
The error vector will be clamped to this length with each iteration.
Definition: InverseKinematics.hpp:584
common::sub_ptr< InverseKinematics > mIK
The IK module that this GradientMethod belongs to.
Definition: InverseKinematics.hpp:930
Properties mGradientP
Properties for this GradientMethod.
Definition: InverseKinematics.hpp:942
std::unique_ptr< GradientMethod > mGradientMethod
The method that this IK module will use to compute gradients.
Definition: InverseKinematics.hpp:502
common::Connection mTargetConnection
Connection to the target update.
Definition: InverseKinematics.hpp:474
bool findSolution(Eigen::VectorXd &positions)
Finds a solution of the IK problem without applying the solution.
Definition: InverseKinematics.cpp:80
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 configur...
Definition: InverseKinematics.cpp:1541
Definition: InverseKinematics.hpp:1139
class Connection
Definition: Signal.hpp:47
std::vector< std::size_t > mDofs
A list of the DegreeOfFreedom Skeleton indices that will be used by this IK module.
Definition: InverseKinematics.hpp:487
void resetTargetConnection()
Reset the signal connection for this IK module's target.
Definition: InverseKinematics.cpp:1844
void setObjective(const std::shared_ptr< optimization::Function > &_objective)
Set an objective function that should be minimized while satisfying the inverse kinematics constraint...
Definition: InverseKinematics.cpp:1429
void setDofs(const std::vector< DegreeOfFreedomT *> &_dofs)
Explicitly set which degrees of freedom should be used to solve the IK for this module.
Definition: InverseKinematics.hpp:70