Implicit non-linear constraint. More...
#include <hpp/core/config-projector.hh>
Public Member Functions | |
void | addFunction (const DifferentiableFunctionPtr_t &function, ComparisonTypePtr_t comp=ComparisonType::createDefault()) HPP_CORE_DEPRECATED |
Add a function. More... | |
void | addConstraint (const DifferentiableFunctionPtr_t &constraint, ComparisonTypePtr_t comp=ComparisonType::createDefault()) HPP_CORE_DEPRECATED |
Add constraint. More... | |
void | add (const NumericalConstraintPtr_t &numericalConstraint, const SizeIntervals_t &passiveDofs=SizeIntervals_t(0)) |
Add a numerical constraint. More... | |
void | add (const LockedJointPtr_t &lockedJoint) |
Add a locked joint. More... | |
const DevicePtr_t & | robot () const |
Get robot. More... | |
virtual void | projectOnKernel (ConfigurationIn_t from, ConfigurationIn_t to, ConfigurationOut_t result) |
Project configuration "to" on constraint tangent space in "from". More... | |
void | maxIterations (size_type iterations) |
Set maximal number of iterations. More... | |
size_type | maxIterations () const |
Get maximal number of iterations in config projector. More... | |
void | errorThreshold (const value_type &threshold) |
Set error threshold. More... | |
value_type | errorThreshold () const |
Get errorimal number of threshold in config projector. More... | |
value_type | residualError () const |
virtual bool | isSatisfied (ConfigurationIn_t config) |
Check whether a configuration statisfies the constraint. More... | |
::hpp::statistics::SuccessStatistics & | statistics () |
Get the statistics. More... | |
Right hand side of equalities - inequalities | |
vector_t | rightHandSideFromConfig (ConfigurationIn_t config) |
Set the right hand side from a configuration. More... | |
void | rightHandSide (const vector_t ¶m) |
Set the level set parameter. More... | |
vector_t | rightHandSide () const |
Get the level set parameter. More... | |
void | updateRightHandSide () |
Regenerate the right hand side from the numerical constraint right hand sides. More... | |
![]() | |
bool | apply (ConfigurationOut_t configuration) |
Function that applies the constraint. More... | |
const std::string & | name () const |
Get name of constraint. More... | |
Static Public Member Functions | |
static ConfigProjectorPtr_t | create (const DevicePtr_t &robot, const std::string &name, value_type errorThreshold, size_type maxIterations) |
Return shared pointer to new object. More... | |
Protected Member Functions | |
ConfigProjector (const DevicePtr_t &robot, const std::string &name, value_type errorThreshold, size_type maxIterations) | |
Constructor. More... | |
void | init (const ConfigProjectorPtr_t &self) |
Store weak pointer to itself. More... | |
virtual bool | impl_compute (ConfigurationOut_t configuration) |
Numerically solve constraint. More... | |
void | computeLockedDofs (ConfigurationOut_t configuration) |
Set locked degrees of freedom to their locked values. More... | |
![]() | |
Constraint (const std::string &name) | |
Constructor. More... | |
void | init (const ConstraintPtr_t &self) |
Store shared pointer to itself. More... | |
Implicit non-linear constraint.
This class defines a numerical constraints on a robot configuration of the form:
Functions are differentiable functions. Vectors
are called right hand side.
The constraints are solved numerically by a Newton Raphson like method. Instances store locked degrees of freedom for performance optimisation.
Numerical constraints can be added using method ConfigProjector::addFunction. Default parameter of this method define equality constraints, but inequality constraints can also be defined by passing an object of type ComparisonType to method.
|
protected |
Constructor.
robot | robot the constraint applies to. |
errorThreshold | norm of the value of the constraint under which the constraint is considered satified, |
maxIterations | maximal number of iteration in the resolution of the constraint. |
void hpp::core::ConfigProjector::add | ( | const NumericalConstraintPtr_t & | numericalConstraint, |
const SizeIntervals_t & | passiveDofs = SizeIntervals_t(0) |
||
) |
Add a numerical constraint.
numericalConstraint | The numerical constraint. |
passiveDofs | column indexes of the jacobian vector that will be set to zero when solving. |
void hpp::core::ConfigProjector::add | ( | const LockedJointPtr_t & | lockedJoint | ) |
Add a locked joint.
lockedJoint | The locked joint. |
|
inline |
Add constraint.
constraint | The function. |
comp | For equality constraint, keep the default value. For inequality constraint, it does a comparison to whether the constraint is active. |
References hpp::core::NumericalConstraint::create().
|
inline |
Add a function.
function | The function. |
comp | For equality constraint, keep the default value. For inequality constraint, it does a comparison to whether the constraint is active. |
References hpp::core::NumericalConstraint::create().
|
protected |
Set locked degrees of freedom to their locked values.
|
static |
Return shared pointer to new object.
robot | robot the constraint applies to. |
errorThreshold | norm of the value of the constraint under which the constraint is considered satified, |
maxIterations | maximal number of iteration in the resolution of the constraint. |
|
inline |
Set error threshold.
|
inline |
Get errorimal number of threshold in config projector.
|
protectedvirtual |
Numerically solve constraint.
Implements hpp::core::Constraint.
|
inlineprotected |
Store weak pointer to itself.
References hpp::core::Constraint::init().
|
virtual |
Check whether a configuration statisfies the constraint.
Implements hpp::core::Constraint.
|
inline |
Set maximal number of iterations.
|
inline |
Get maximal number of iterations in config projector.
|
virtual |
Project configuration "to" on constraint tangent space in "from".
from | configuration, |
to | configuration to project |
|
inline |
void hpp::core::ConfigProjector::rightHandSide | ( | const vector_t & | param | ) |
Set the level set parameter.
param | the level set parameter. |
vector_t hpp::core::ConfigProjector::rightHandSide | ( | ) | const |
Get the level set parameter.
vector_t hpp::core::ConfigProjector::rightHandSideFromConfig | ( | ConfigurationIn_t | config | ) |
Set the right hand side from a configuration.
in such a way that the configuration satisfies the numerical constraints
config | the input configuration. |
|
inline |
Get robot.
|
inline |
Get the statistics.
void hpp::core::ConfigProjector::updateRightHandSide | ( | ) |
Regenerate the right hand side from the numerical constraint right hand sides.