Constraint to increases dexterity when manipulator is close to singularity. More...
#include <avoid_singularities.h>
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 |
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
Definition at line 48 of file avoid_singularities.h.
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.
cdata | The constraint specific data. |
Definition at line 66 of file avoid_singularities.cpp.
Eigen::MatrixXd constrained_ik::constraints::AvoidSingularities::calcJacobian | ( | const AvoidSingularitiesData & | cdata | ) | const [virtual] |
Jacobian for this constraint is identity (all joints may contribute)
cdata | The constraint specific data. |
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.
cdata | The constraint specific data. |
Definition at line 95 of file avoid_singularities.h.
virtual double constrained_ik::constraints::AvoidSingularities::getEnableThreshold | ( | ) | const [inline, virtual] |
Getter for 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_.
Definition at line 125 of file avoid_singularities.h.
virtual double constrained_ik::constraints::AvoidSingularities::getWeight | ( | ) | const [inline, virtual] |
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.
cdata | Constraint specific data |
jntIdx | joint index |
eps | value for which to peturb the joint value |
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_.
enable_threshold | Value 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_.
ignore_threshold | Value 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_.
weight | Value to assign to weight_ |
Definition at line 107 of file avoid_singularities.h.