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

Constructs a piecewise polynomial path between a and b such that each point is near the constraint C(x)=0. More...

#include <ConstrainedInterpolator.h>

Inheritance diagram for SmoothConstrainedInterpolator:
RobotSmoothConstrainedInterpolator

Public Member Functions

 SmoothConstrainedInterpolator (CSpace *space, VectorFieldFunction *constraint)
 
bool Make (const Config &a, const Config &b, GeneralizedCubicBezierSpline &path, bool checkConstraints=false)
 
bool Make (const Config &a, const Vector &da, const Config &b, const Vector &db, GeneralizedCubicBezierSpline &path, bool checkConstraints=false)
 
virtual void ConstraintValue (const Config &x, Vector &v)
 
virtual bool Project (Config &x)
 
virtual bool ProjectVelocity (const Config &x, Config &v)
 

Public Attributes

CSpace * space
 
GeodesicSpace * manifold
 
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

Constructs a piecewise polynomial path between a and b such that each point is near the constraint C(x)=0.

Interpolation is accomplished via a cubic bezier curve. This is slightly faster than taking a regular ConstrainedInterpolator and then post-smoothing it via a Bezier curve.

The method uses a recursive bisection technique, where the midpoint of each segment is projected to the constraint, and bisection continues until a given resolution is met. If checkConstraints is true, the feasibility of each projected point is also 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)/2 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: