Classes | Public Member Functions | Protected Member Functions | Protected Attributes
constrained_ik::constraints::AvoidSingularities Class Reference

Constraint to increases dexterity when manipulator is close to singularity. More...

#include <avoid_singularities.h>

Inheritance diagram for constrained_ik::constraints::AvoidSingularities:
Inheritance graph
[legend]

List of all members.

Classes

struct  AvoidSingularitiesData
 This structure stores constraint data. More...

Public Member Functions

virtual Eigen::VectorXd calcError (const AvoidSingularitiesData &cdata) const
 Velocity is gradient of smallest singular value del(sv) = uT * del(J) * v.
virtual Eigen::MatrixXd calcJacobian (const AvoidSingularitiesData &cdata) const
 Jacobian for this constraint is identity (all joints may contribute)
virtual bool checkStatus (const AvoidSingularitiesData &cdata) const
 Termination criteria for singularity constraint.
constrained_ik::ConstraintResults evalConstraint (const SolverState &state) const override
 see base class for documentation
virtual double getEnableThreshold () const
 Getter for enable_threshold_.
virtual double getIgnoreThreshold () const
 Getter for ignore_threshold_.
virtual double getWeight () const
 Getter for weight_.
void loadParameters (const XmlRpc::XmlRpcValue &constraint_xml) override
 see base class for documentation
virtual void setEnableThreshold (double enable_threshold)
 Setter for enable_threshold_.
virtual void setIgnoreThreshold (double ignore_threshold)
 Setter for ignore_threshold_.
virtual void setWeight (double weight)
 Setter for weight_.

Protected Member Functions

Eigen::MatrixXd jacobianPartialDerivative (const AvoidSingularitiesData &cdata, size_t jntIdx, double eps=1e-6) const
 Calculates the partial derivative of the jacobian This will calculate the partial derivative of the jacobian with respect to the provided joint index by method of numerical differentiation.

Protected Attributes

double enable_threshold_
 how small singular value must be to trigger avoidance
double ignore_threshold_
 how small is too small
double weight_
 weights used to scale the jocabian and error

Detailed Description

Constraint to increases dexterity when manipulator is close to singularity.

Joint velocity is determined by gradient of smallest singular value Constraint is only active when smallest SV is below theshold

Examples:
All examples are located here Avoid Singularities Constraint Examples

Definition at line 48 of file avoid_singularities.h.


Member Function Documentation

Eigen::VectorXd constrained_ik::constraints::AvoidSingularities::calcError ( const AvoidSingularitiesData cdata) const [virtual]

Velocity is gradient of smallest singular value del(sv) = uT * del(J) * v.

Parameters:
cdataThe constraint specific data.
Returns:
Joint velocity error scaled by weight

Definition at line 66 of file avoid_singularities.cpp.

Jacobian for this constraint is identity (all joints may contribute)

Parameters:
cdataThe constraint specific data.
Returns:
Identity jacobian scaled by weight

Definition at line 82 of file avoid_singularities.cpp.

virtual bool constrained_ik::constraints::AvoidSingularities::checkStatus ( const AvoidSingularitiesData cdata) const [inline, virtual]

Termination criteria for singularity constraint.

Parameters:
cdataThe constraint specific data.
Returns:
True always (no termination criteria)

Definition at line 95 of file avoid_singularities.h.

virtual double constrained_ik::constraints::AvoidSingularities::getEnableThreshold ( ) const [inline, virtual]

Getter for enable_threshold_.

Returns:
enable_threshold_

Definition at line 113 of file avoid_singularities.h.

virtual double constrained_ik::constraints::AvoidSingularities::getIgnoreThreshold ( ) const [inline, virtual]

Getter for ignore_threshold_.

Returns:
ignore_threshold_

Definition at line 125 of file avoid_singularities.h.

virtual double constrained_ik::constraints::AvoidSingularities::getWeight ( ) const [inline, virtual]

Getter for weight_.

Returns:
weight_

Definition at line 101 of file avoid_singularities.h.

Eigen::MatrixXd constrained_ik::constraints::AvoidSingularities::jacobianPartialDerivative ( const AvoidSingularitiesData cdata,
size_t  jntIdx,
double  eps = 1e-6 
) const [protected]

Calculates the partial derivative of the jacobian This will calculate the partial derivative of the jacobian with respect to the provided joint index by method of numerical differentiation.

Parameters:
cdataConstraint specific data
jntIdxjoint index
epsvalue for which to peturb the joint value
Returns:
partial derivative of the jacobian relative to a single joint

Definition at line 90 of file avoid_singularities.cpp.

virtual void constrained_ik::constraints::AvoidSingularities::setEnableThreshold ( double  enable_threshold) [inline, virtual]

Setter for enable_threshold_.

Parameters:
enable_thresholdValue to assign to enable_threshold_

Definition at line 119 of file avoid_singularities.h.

virtual void constrained_ik::constraints::AvoidSingularities::setIgnoreThreshold ( double  ignore_threshold) [inline, virtual]

Setter for ignore_threshold_.

Parameters:
ignore_thresholdValue to assign to ignore_threshold_

Definition at line 131 of file avoid_singularities.h.

virtual void constrained_ik::constraints::AvoidSingularities::setWeight ( double  weight) [inline, virtual]

Setter for weight_.

Parameters:
weightValue to assign to weight_

Definition at line 107 of file avoid_singularities.h.


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


constrained_ik
Author(s): Chris Lewis , Jeremy Zoss , Dan Solomon
autogenerated on Sat Jun 8 2019 19:23:46