Klamp't  0.9.0
Classes | Functions
Planning

Classes

class  Klampt::ConstrainedInterpolator
 Construct a polyline between a and b such that each point is near the constraint C(x)=0. More...
 
class  Klampt::SmoothConstrainedInterpolator
 Constructs a piecewise polynomial path between a and b such that each point is near the constraint C(x)=0. More...
 
struct  Klampt::ConstraintChecker
 Checks for static constraints for a robot at a given stance. More...
 
struct  DistanceQuery
 A method for efficiently caching and updating distance computations using temporal coherence. More...
 
class  Klampt::PlannerObjectiveBase
 A base class for objective functionals in time/config/velocity space. More...
 
class  Klampt::TimeObjective
 An objective that measures path execution time. More...
 
class  Klampt::TerminalTimeObjective
 A goal that measures absolute difference in terminal time (i.e., penalize stopping at a different time than specified). More...
 
class  Klampt::ConfigObjective
 A goal that measures distance to a goal configuration qgoal. More...
 
class  Klampt::VelocityObjective
 A goal that measures distance to a goal velocity vgoal. More...
 
class  Klampt::CompositeObjective
 An objective that merges contributions from multiple other objective functions. More...
 
class  Klampt::CartesianObjective
 A goal that measures point-to-point distance. More...
 
class  Klampt::IKObjective
 A goal for an IK solution (including possibly rotation) More...
 
class  Klampt::CartesianTrackingObjective
 Tracking a path in cartesian space. More...
 
class  Klampt::RealTimePlanner
 A real-time planner. Supports constant time-stepping or adaptive time-stepping. More...
 
class  Klampt::RobotConstrainedInterpolator
 Just like a ConstrainedInterpolator but only projects the active DOFs. Much faster for high-DOF system with sparse constraints. More...
 
class  Klampt::RobotSmoothConstrainedInterpolator
 Just like a SmoothConstrainedInterpolator but only projects the active DOFs. Much faster for high-DOF system with sparse constraints. More...
 
class  Klampt::RobotCSpace
 Implements a basic robot configuration space with only joint limit constraint testing. More...
 
class  Klampt::ActiveRobotCSpace
 A CSpace for just a few dofs of a robot. Slightly faster than using a regular RobotCSpace then picking out subvectors. More...
 
class  Klampt::SingleRobotCSpace
 A cspace consisting of a single robot configuration in a WorldModel. Feasibility constraints are joint and collision constraints. More...
 
class  Klampt::SingleRigidObjectCSpace
 A configuration space for a rigid object, treated like a robot. More...
 
class  Klampt::TimeScaling
 Maps time into a given path parameter range (e.g., [0,1]) with joint space velocity and acceleration bounds. Stores a piecewise quadratic time scaling. Most users will use the TimeScaledBezierCurve class or OptimizeTimeScaling methods instead. More...
 
class  Klampt::TimeScaledBezierCurve
 A convenience class that stores a Bezier curve and its time scaling. Useful for evaluating the scaled curve, and for plotting it. More...
 

Functions

bool Klampt::MultiSmoothInterpolate (SmoothConstrainedInterpolator &interp, const vector< Vector > &pts, GeneralizedCubicBezierSpline &path)
 
bool Klampt::MultiSmoothInterpolate (SmoothConstrainedInterpolator &interp, const vector< Vector > &pts, const Vector &dq0, const Vector &dq1, GeneralizedCubicBezierSpline &path)
 
bool Klampt::AppendInterpolate (SmoothConstrainedInterpolator &interp, const Vector &pt, Real suffixDuration, GeneralizedCubicBezierSpline &path)
 
bool Klampt::TimeOptimizePath (RobotModel &robot, const vector< Real > &oldtimes, const vector< Config > &oldconfigs, Real dt, vector< Real > &newtimes, vector< Config > &newconfigs)
 Optimizes a piecewise-linear path by first smoothing it, then time-optimizing it with the given resolution dt.
 
bool Klampt::InterpolateConstrainedPath (RobotModel &robot, const Config &a, const Config &b, const vector< IKGoal > &ikGoals, vector< Config > &path, Real xtol=1e-2)
 Generates a constrained piecewise linear path between two configurations while satisfying the constraints in ikGoals.
 
bool Klampt::InterpolateConstrainedPath (RobotModel &robot, const vector< Config > &milestones, const vector< IKGoal > &ikGoals, vector< Config > &path, Real xtol=1e-2)
 Generates a constrained piecewise linear path between many configurations while satisfying the constraints in ikGoals.
 
void Klampt::SmoothDiscretizePath (RobotModel &robot, const vector< Config > &oldconfigs, int n, vector< Real > &times, vector< Config > &configs)
 Given a list of milestones oldconfigs, constructs a smooth interpolating path and discretizes it uniformly with resolution n. The output times map to the range [0,1].
 
bool Klampt::InterpolateConstrainedMultiPath (RobotModel &robot, const MultiPath &path, vector< GeneralizedCubicBezierSpline > &paths, Real xtol=1e-2)
 Given a coarsely discretized multipath, produces a finely discretized, smooth curve with appropriate tangents across contact states. More...
 
bool Klampt::DiscretizeConstrainedMultiPath (RobotModel &robot, const MultiPath &path, MultiPath &out, Real xtol=1e-2)
 Given a coarsely discretized multipath, produces a finely discretized multipath that satisfies contact constraints. More...
 
bool Klampt::GenerateAndTimeOptimizeMultiPath (RobotModel &robot, MultiPath &multipath, Real xtol, Real dt)
 Given a multipath, time-scales it to minimize execution time given the robot's velocity and acceleration bounds. More...
 
void Klampt::EvaluateMultiPath (RobotModel &robot, const MultiPath &multipath, Real t, Config &q, Real xtol=0, Real contactol=1e-3, int numIKIters=100)
 Evaluate the multipath at time t with a smooth interpolator, possibly solving intermediate contact constraints. If the path has no resolution, or resolution > xtol, an IK solver is invoked to solve for the path's contact constraints.
 
bool Klampt::OptimizeTimeScaling (const GeneralizedCubicBezierSpline &path, const Vector &vmin, const Vector &vmax, const Vector &amin, const Vector &amax, TimeScaling &scaling)
 Optimizes the given path according to velocity and acceleration bounds. The resulting time scaling is constrained to start and stop at 0 velocity. More...
 

Detailed Description

Function Documentation

bool Klampt::AppendInterpolate ( SmoothConstrainedInterpolator interp,
const Vector &  pt,
Real  suffixDuration,
GeneralizedCubicBezierSpline &  path 
)

Adds a smooth path to the given point at the end of the provided path. The path extension has duration suffixDuration.

bool Klampt::DiscretizeConstrainedMultiPath ( RobotModel robot,
const MultiPath path,
MultiPath out,
Real  xtol = 1e-2 
)

Given a coarsely discretized multipath, produces a finely discretized multipath that satisfies contact constraints.

See also
InterpolateConstrainedMultiPath
bool Klampt::GenerateAndTimeOptimizeMultiPath ( RobotModel robot,
MultiPath multipath,
Real  xtol,
Real  dt 
)

Given a multipath, time-scales it to minimize execution time given the robot's velocity and acceleration bounds.

The geometric path is discretized with resolution xtol, and the time scaling is discretized with resolution dt.

bool Klampt::InterpolateConstrainedMultiPath ( RobotModel robot,
const MultiPath path,
vector< GeneralizedCubicBezierSpline > &  paths,
Real  xtol = 1e-2 
)

Given a coarsely discretized multipath, produces a finely discretized, smooth curve with appropriate tangents across contact states.

Each segment must begin and end at transitions. xtol is the discretization resolution.

This can be applied to increase the resolution of already discretized paths, or just to produce a set of splines interpolating the path. It will check the path's "resolution" setting and discretize if empty or the resolution is greater than xtol.

Warning: the space and manifold members of the bezier paths will be bogus pointers. If you need to use them, you will need to set them to appropriate RobotCSpace and RobotGeodesicManifold objects (see code for GenerateAndTimeOptimizeMultiPath in RobotTimeScaling.cpp for an example).

bool Klampt::MultiSmoothInterpolate ( SmoothConstrainedInterpolator interp,
const vector< Vector > &  pts,
GeneralizedCubicBezierSpline &  path 
)

Interpolates through several points smoothly using the given interpolator. The output durations are such that point i corresponds precisely to path parameter i.

bool Klampt::MultiSmoothInterpolate ( SmoothConstrainedInterpolator interp,
const vector< Vector > &  pts,
const Vector &  dq0,
const Vector &  dq1,
GeneralizedCubicBezierSpline &  path 
)

Interpolates through several points smoothly using the given interpolator. The output durations are such that point i corresponds precisely to path parameter i. The endpoint derivatives are set to dq0 and dq1, respectively.

bool Klampt::OptimizeTimeScaling ( const GeneralizedCubicBezierSpline &  path,
const Vector &  vmin,
const Vector &  vmax,
const Vector &  amin,
const Vector &  amax,
TimeScaling scaling 
)

Optimizes the given path according to velocity and acceleration bounds. The resulting time scaling is constrained to start and stop at 0 velocity.

Note: most Klamp't users will want to use the much more convenient functions in RobotTimeScaling.h.