Klamp't  0.8.1
Public Member Functions | Public Attributes | List of all members
ConstrainedInterpolator Class Reference

Construct a polyline between a and b such that each point is near the constraint C(x)=0. More...

#include <ConstrainedInterpolator.h>

Inheritance diagram for ConstrainedInterpolator:
RobotConstrainedInterpolator

Public Member Functions

 ConstrainedInterpolator (CSpace *space, VectorFieldFunction *constraint)
 
bool Make (const Config &a, const Config &b, vector< Config > &path, bool checkConstraints=false)
 
virtual void ConstraintValue (const Config &x, Vector &v)
 
virtual bool Project (Config &x)
 

Public Attributes

CSpace * space
 
VectorFieldFunction * constraint
 
Config xmin
 
Config xmax
 if set, uses bounds in the newton solver
 
VectorFieldFunction * inequalities
 if set, uses a nonlinear constraint in the newton solver
 
int maxNewtonIters
 
Real ftol
 
Real xtol
 
Real maxGrowth
 
Optimization::NewtonRoot solver
 

Detailed Description

Construct a polyline between a and b such that each point is near the constraint C(x)=0.

The method uses a recursive bisection technique, where the midpoint of each segment is projected to the constraint until termination. If checkConstraints is true, the feasibility of each projected point is checked.

The projection uses a Newton-Raphson solver, capped at maxNewtonIters iterations. It ensures that each milestone satisfies ||C(x[k])|| <= ftol, and d(x[k],x[k+1])<=xtol.

maxGrowth defines the maximum extra distance that the path through a projected configuration can add to the total length of the path. That is, when going from x1 to x2, the projected midpoint xm is checked so that d(x1,xm) + d(xm,x2) <= (1+maxGrowth)d(x1,x2). To ensure convergence this parameter should be < 1 (default 0.9).


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