Klamp't  0.8.1
RobotTimeScaling.h
1 #ifndef ROBOT_TIME_SCALING_H
2 #define ROBOT_TIME_SCALING_H
3 
4 #include <KrisLibrary/planning/GeneralizedBezierCurve.h>
5 #include <Klampt/Modeling/Robot.h>
6 #include <Klampt/Modeling/MultiPath.h>
7 
12 bool TimeOptimizePath(Robot& robot,const vector<Real>& oldtimes,const vector<Config>& oldconfigs,Real dt,vector<Real>& newtimes,vector<Config>& newconfigs);
13 
18 bool InterpolateConstrainedPath(Robot& robot,const Config& a,const Config& b,const vector<IKGoal>& ikGoals,vector<Config>& path,Real xtol=1e-2);
19 
24 bool InterpolateConstrainedPath(Robot& robot,const vector<Config>& milestones,const vector<IKGoal>& ikGoals,vector<Config>& path,Real xtol=1e-2);
25 
31 void SmoothDiscretizePath(Robot& robot,const vector<Config>& oldconfigs,int n,vector<Real>& times,vector<Config>& configs);
32 
50 bool InterpolateConstrainedMultiPath(Robot& robot,const MultiPath& path,vector<GeneralizedCubicBezierSpline>& paths,Real xtol=1e-2);
51 
58 bool DiscretizeConstrainedMultiPath(Robot& robot,const MultiPath& path,MultiPath& out,Real xtol=1e-2);
59 
67 bool GenerateAndTimeOptimizeMultiPath(Robot& robot,MultiPath& multipath,Real xtol,Real dt);
68 
75 void EvaluateMultiPath(Robot& robot,const MultiPath& multipath,Real t,Config& q,Real xtol=0,Real contactol=1e-3,int numIKIters=100);
76 
77 #endif
bool TimeOptimizePath(Robot &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 resol...
A very general multi-section path container.
Definition: MultiPath.h:29
The main robot type used in RobotSim.
Definition: Robot.h:79
void EvaluateMultiPath(Robot &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 co...
bool DiscretizeConstrainedMultiPath(Robot &robot, const MultiPath &path, MultiPath &out, Real xtol=1e-2)
Given a coarsely discretized multipath, produces a finely discretized multipath that satisfies contac...
void SmoothDiscretizePath(Robot &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 unif...
bool GenerateAndTimeOptimizeMultiPath(Robot &robot, MultiPath &multipath, Real xtol, Real dt)
Given a multipath, time-scales it to minimize execution time given the robot&#39;s velocity and accelerat...
bool InterpolateConstrainedMultiPath(Robot &robot, const MultiPath &path, vector< GeneralizedCubicBezierSpline > &paths, Real xtol=1e-2)
Given a coarsely discretized multipath, produces a finely discretized, smooth curve with appropriate ...
bool InterpolateConstrainedPath(Robot &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 constra...