libmove3d-planners
|
Public Member Functions | |
Smoothing () | |
Class constructors and destructors. | |
Smoothing (const Trajectory &T) | |
Smoothing (Robot *R, traj *t) | |
int | getRunId () |
Get the run Id. | |
void | setRunId (int id) |
Set the run Id. | |
void | setStep (double step) |
Set a fixed deformation step. | |
void | resetStep () |
Use automatic step computation. | |
double | getTime () |
Get the time spent in optimization. | |
int | getIteration () |
Get iteration. | |
void | setContextName (std::string name) |
Set Context name. | |
void | saveOptimToFile (std::string str) |
Save the optimization to a file. More... | |
void | removeRedundantNodes () |
Go through all nodes in a deterministic manner. | |
void | setSortedIndex () |
Set the sorted indexes by cost. | |
confPtr_t | getRandConfAlongTraj (double &randDist, bool use_bias) |
Get a random confiruation along the trajectroy that can be biased. | |
bool | oneLoopShortCut () |
One loop of the random shortcut. More... | |
bool | oneLoopShortCutRecompute () |
One loop of the random shortcut with recomputation of the trajectory cost. More... | |
void | runShortCut (int nbIteration, int idRun=0) |
Runs the shortcut method for a certain number of iterations. More... | |
int | removeUselessNodes () |
Deterministic shortcut. | |
![]() | |
Trajectory (Robot *R) | |
Trajectory (Robot *R, traj *t) | |
Trajectory (std::vector< confPtr_t > &C) | |
Trajectory (const Trajectory &T) | |
Trajectory & | operator= (const Trajectory &t) |
bool | operator== (const Trajectory &t) const |
bool | operator!= (const Trajectory &t) const |
void | copyPaths (std::vector< LocalPath * > &vect) |
std::vector < std::tr1::shared_ptr < Configuration > > | getTowConfigurationAtParam (double param1, double param2, uint &lp1, uint &lp2) |
std::pair< bool, std::vector < LocalPath * > > | extractSubPortion (double param1, double param2, unsigned int &first, unsigned int &last, bool check_for_coll=true) |
Trajectory | extractSubTrajectoryOfLocalPaths (unsigned int id_start, unsigned int id_end) |
Extract sub trajectory. More... | |
Trajectory | extractSubTrajectory (double param1, double param2, bool check_for_coll=true) |
bool | concat (const Trajectory &traj) |
bool | replacePortionOfLocalPaths (unsigned int id1, unsigned int id2, std::vector< LocalPath * > paths, bool freeMemory=true) |
bool | replacePortion (double param1, double param2, std::vector< LocalPath * > paths, bool freeMemory=true) |
bool | replaceBegin (double param, const std::vector< LocalPath * > &paths) |
bool | replaceEnd (double param, const std::vector< LocalPath * > &paths) |
bool | cutTrajInSmallLP (unsigned int nLP) |
bool | cutTrajInSmallLPSimple (unsigned int nLP) |
uint | cutPortionInSmallLP (std::vector< LocalPath * > &portion, uint nLP) |
void | push_back (confPtr_t q) |
bool | push_back (std::tr1::shared_ptr< LocalPath > path) |
double | collisionCost () |
std::vector< std::pair< double, double > > | getCostProfile () |
double | computeSubPortionIntergralCost (std::vector< LocalPath * > &portion) |
double | computeSubPortionCost (std::vector< LocalPath * > &portion) |
double | computeSubPortionCost (std::vector< LocalPath * >::iterator first, std::vector< LocalPath * >::iterator last) |
double | computeSubPortionMaxCost (std::vector< LocalPath * > &portion) |
double | ReComputeSubPortionCost (std::vector< LocalPath * > &portion, int &nb_cost_tests) |
double | computeSubPortionCostVisib (std::vector< LocalPath * > &portion) |
double | costOfPortion (double param1, double param2) |
double | extractCostPortion (double param1, double param2) |
double | cost () |
double | computeCostComplete () |
double | costComplete () |
double | costNoRecompute () |
double | costRecomputed () |
double | costStatistics (TrajectoryStatistics &stat) |
double | costDeltaAlongTraj () |
double | costNPoints (const int n_points) |
double | costSum () |
std::vector< double > | getCostAlongTrajectory (int nbSample) |
void | resetCostComputed () |
bool | isEmpty () |
void | clear () |
confPtr_t | operator[] (const int &i) const |
confPtr_t | configAtParam (double param, unsigned int *id_localpath=NULL) const |
double | paramAtConfig (confPtr_t config, double step=-1) const |
LocalPath * | getLocalPathPtrOf (confPtr_t conf) const |
double | distanceToTraj (confPtr_t config, double step=-1) |
std::vector< confPtr_t > | getNConfAtParam (double delta) |
std::vector< confPtr_t > | getVectorOfConfiguration () |
uint | getIdOfPathAt (double param) |
LocalPath * | getLocalPathPtrAt (unsigned int id) const |
int | getNbOfPaths () const |
int | getNbOfViaPoints () const |
bool | isValid () |
void | resetIsValid () |
void | updateRange () |
double | computeSubPortionRange (const std::vector< LocalPath * > &portion) const |
bool | replaceP3dTraj () |
p3d_traj * | replaceP3dTraj (p3d_traj *trajPt) |
p3d_traj * | replaceHumanP3dTraj (Robot *rob, p3d_traj *trajPt) |
void | printAllLocalpathCost () |
void | draw (int nbKeyFrame) |
void | print () |
int | meanCollTest () |
bool | makeBSplineTrajectory () |
void | setColor (int col) |
unsigned int | getHighestCostId () const |
Robot * | getRobot () const |
int | size () const |
confPtr_t | getBegin () const |
confPtr_t | getEnd () const |
std::vector< LocalPath * > | getCourbe () const |
std::vector< LocalPath * > & | getCourbe () |
double | getRangeMax () const |
Protected Member Functions | |
bool | checkStopConditions (unsigned int iter) |
stops the trajectory optimization More... | |
std::vector< confPtr_t > | get2RandomConf (double step, double &secondDist, double &firstDist) |
gets randomly two random configurations | |
std::vector< confPtr_t > | getConfAtStepAlongTraj (double step, double firstDist, double secondDist) |
gets randomly n configurations on the traj between firstDist and secondDist | |
bool | partialShortcut () |
PatialShortCut : intependently shortcut each DoFs. More... | |
bool | isLowerCostLargePortion (double lFirst, double lSecond, std::vector< LocalPath * > &paths) |
Compute the subportion of with entire outer localpaths. More... | |
double | interpolateOneDoF (unsigned int ithActiveDoF, double init, double goal, double alpha) |
Interpolates a Configuration. More... | |
void | changeIthActiveDofValueOnConf (Configuration &q, unsigned int ithActiveDoF, double value) |
Change the Ith Active Dof on Conf. More... | |
void | debugShowTraj (double lPrev, double lNext) |
Show the trajectory while being deformed. | |
double | getBiasedParamOnTraj () |
Get a parameter on the trajectory which is biased to the high cost parts of the trajectory. | |
double | closestResolutionToStep (double length, double step) |
Compute the resolution of a path. More... | |
double | gainOfLastIterations (unsigned int n) |
Compute the gain of the last n succueded iterations. More... | |
void | computeStats () |
compute the stats | |
void | storeCostAndGain (double NewCost, double CurCost) |
Store the cost and gain of the iteration in double vectors. | |
Protected Attributes | |
int | m_runId |
std::string | m_ContextName |
std::vector< double > | m_Selected |
int | m_nbBiased |
int | m_nbReallyBiased |
double | m_currentCost |
double | m_time |
bool | m_useAutoStep |
double | m_step |
std::vector< std::pair< double, std::vector< confPtr_t > > > | m_convergence_trajs |
std::vector< std::pair< double, TrajectoryStatistics > > | m_convergence_rate |
std::vector< double > | m_OptimCost |
std::vector< double > | m_GainCost |
int | m_Iteration |
bool | m_IterationSucceded |
std::vector< double > | m_GainOfIterations |
unsigned int | m_MaxNumberOfIterations |
![]() | |
Robot * | m_Robot |
unsigned int | HighestCostId |
bool | isHighestCostIdSet |
|
protected |
Change the Ith Active Dof on Conf.
returns a configuration with the interpoated DoF
|
protected |
stops the trajectory optimization
Checks out if the plannification problem has reach its goals.
|
protected |
Compute the resolution of a path.
resolution |
|
protected |
Compute the gain of the last n succueded iterations.
This function computes the gain that have made the last iteration of the smoothing process.
last | n taken into account iterations |
|
protected |
Interpolates a Configuration.
Interpolates the ith active DoF of the robot.
|
protected |
Compute the subportion of with entire outer localpaths.
Compare the cost of two portions.
bool Smoothing::oneLoopShortCut | ( | ) |
One loop of the random shortcut.
One loop of the short cut method.
Replace
bool Smoothing::oneLoopShortCutRecompute | ( | ) |
One loop of the random shortcut with recomputation of the trajectory cost.
Replaces by a shortcut if of lower cost but recomputes the entire trajectory.
|
protected |
PatialShortCut : intependently shortcut each DoFs.
One loop of the short cut method.
void Smoothing::runShortCut | ( | int | nbIteration, |
int | idRun = 0 |
||
) |
Runs the shortcut method for a certain number of iterations.
This is the main function iterating the smoothing methods.
iterations |
void Smoothing::saveOptimToFile | ( | std::string | str | ) |
Save the optimization to a file.
This function saves the trajectory cost to a file along the smoothing process.