libmove3d
3.13.0
|
elastic strips optimization More...
#include "Util-pkg.h"
#include "P3d-pkg.h"
#include "Collision-pkg.h"
#include "Localpath-pkg.h"
#include "Planner-pkg.h"
Functions | |
int | p3d_trackCurrentTraj (p3d_rob *rob, int Nend, double epsilon, double d0, int Quick) |
deform current trajectory of a robot | |
void | p3d_gradientDescentOptimize (p3d_traj *traj, double tend, double epsilon, double d0, int Quick, int(*fct_stop)(void), void(*fct_draw)(void)) |
optimize a trajectory with a gradient descent method | |
void | p3d_clearTraj (p3d_traj *traj, double tend, int(*fct_stop)(void)) |
clear a trajectory by deleting useless strippoints |
elastic strips optimization
Set of functions for elastic band optimization and tracjectory tracking
void p3d_clearTraj | ( | p3d_traj * | traj, |
double | tend, | ||
int(*)(void) | fct_stop | ||
) |
clear a trajectory by deleting useless strippoints
traj | the trajectory |
tend | maximum time of the optimization (tend=0 means tend=infini) |
fct_stop | if fct_stop returns FALSE, optimization is stopped |
void p3d_gradientDescentOptimize | ( | p3d_traj * | traj, |
double | tend, | ||
double | epsilon, | ||
double | d0, | ||
int | Quick, | ||
int(*)(void) | fct_stop, | ||
void(*)(void) | fct_draw | ||
) |
optimize a trajectory with a gradient descent method
traj | the trajectory |
tend | maximum time of the optimization (tend=0 means tend=infini) |
epsilon | if the gain between two interations if less than epsilon, optimization is stopped |
d0 | contact distance of the obstacles. the strippoints should not be closer than d0. |
Quick | if TRUE, quickdescent algorithm is applied as gradient descent else projected gradient descent is applied. |
fct_stop | if fct_stop returns FALSE, optimization is stopped |
fct_draw | function drawing the trajectory at the end of an iteration |
The trajectory is deformed by altering each of strippoints in turn. To change a strippoint, a gradient descent method is applied. If one of local path linking this strippoint is not valid, the strippoint is not change and a strippoint is inserted on the old local path.
int p3d_trackCurrentTraj | ( | p3d_rob * | rob, |
int | Nend, | ||
double | epsilon, | ||
double | d0, | ||
int | Quick | ||
) |
deform current trajectory of a robot
It the same algorithm than gradientDescentOptimize(), but it must be used for a very short time (Nend=3) because there is no strip cleaning during the optimization. the random optimization is called at the end to try to break the strip.
rob | the robot |
Nend | maximum number of iterations |
epsilon | if the gain between two steps is less than epsilon, optimization is stopped |
d0 | contact distance of the obstacles. the strippoints should not be closer than d0. |
Quick | if TRUE, quickdescent algorithm is applied as gradient descent else projected gradient descent is applied. |