wcs.h File Reference

Detailed Description

Interface that unifies the access to world and cuiksystems so that the atlas related applications can operate on both structures.

Definition in file wcs.h.

Data Structures

struct  TAtlasBase
 Type defining the equations on which the atlas is defined. More...
 

Macros

#define CS_WD_EXT   "world/cuik"
 Possible extensions for the equation files. More...
 
#define CS_WD_INIT(pr, name, wcs)   InitCSWDFromFile(pr,name,wcs)
 Initializes the equations from a file. More...
 
#define CS_WD_FROM_WORLD(ptr, wcs)   { (wcs)->isCS=FALSE; (wcs)->cs=NULL; (wcs)->w=ptr; }
 Initializes the equations from a world structure. More...
 
#define CS_WD_FROM_CUIKSYSTEM(ptr, wcs)   { (wcs)->isCS=TRUE; (wcs)->cs=ptr; (wcs)->w=NULL; }
 Initializes the equations from a CuikSystem structure. More...
 
#define ON_CUIKSYSTEM(wcs)   (wcs)->isCS
 TRUE if the atlas is defined on a cuiksystem. More...
 
#define GET_WORLD(wcs)   (wcs)->w
 Returns the world from an TAtlasBase. More...
 
#define GET_CUIKSYSTEM(wcs)   (wcs)->cs
 Returns the CuikSystem from an TAtlasBase. More...
 
#define CS_WD_EVALUATE_SIMP_EQUATIONS(pr, p, r, wcs)   if ((wcs)->isCS) EvaluateSimpCSEquations(pr,p,r,(wcs)->cs); else WorldEvaluateSimpEquations(pr,p,r,(wcs)->w);
 Evaluates the simplified set of equations. More...
 
#define CS_WD_EVALUATE_SUBSET_SIMP_EQUATIONS(pr, st, p, r, wcs)   if ((wcs)->isCS) EvaluateSubSetSimpCSEquations(pr,st,p,r,(wcs)->cs); else WorldEvaluateSubSetSimpEquations(pr,st,p,r,(wcs)->w);
 Evaluates a subset of the simplified set of equations. More...
 
#define CS_WD_SIMP_INEQUALITIES_HOLD(pr, p, wcs)   ((wcs)->isCS ? SimpInequalitiesHoldOnPoint(pr,p,(wcs)->cs) : WorldSimpInequalitiesHold(pr,p,(wcs)->w))
 Cheks if all inequalities hold. More...
 
#define CS_WD_SIMP_INEQUALITIES_ERROR(pr, p, wcs)   ((wcs)->isCS ? ErrorInSimpInequalitiesOnPoint(pr,p,(wcs)->cs) : WorldErrorInSimpInequalities(pr,p,(wcs)->w))
 Maximum error in the inequalities. More...
 
#define CS_WD_GET_SYSTEM_VARS(sv, wcs)   ((wcs)->isCS ? GetCSSystemVars(sv,(wcs)->cs) : GetWorldSystemVars(sv,(wcs)->w))
 Gets the system variables. More...
 
#define CS_WD_GET_NUM_SYSTEM_VARS(wcs)   ((wcs)->isCS ? GetCSNumSystemVariables((wcs)->cs) : GetWorldNumSystemVariables((wcs)->w))
 Gets the number of system variables. More...
 
#define CS_WD_GET_VAR_TOPOLOGY(varID, wcs)   ((wcs)->isCS ? GetCSVarTopology(varID,(wcs)->cs) : GetWorldVarTopology(varID,(wcs)->w))
 Gets the variable topology. More...
 
#define CS_WD_REGENERATE_ORIGINAL_POINT(pr, p, o, wcs)   ((wcs)->isCS ? RegenerateOriginalPoint(pr,p,o,(wcs)->cs) : RegenerateWorldOriginalPoint(pr,p,o,(wcs)->w))
 Completes an original point from a simplified one. More...
 
#define CS_WD_INIT_CD(pr, mt, wcs)   { if (!(wcs)->isCS) InitWorldCD(pr,mt,(wcs)->w); }
 Initializes the collision detector. More...
 
#define CS_WD_IN_COLLISION(f, pr, s, sPrev, wcs)
 Checks if a configuration is in collision. More...
 
#define CS_WD_ORIGINAL_IN_COLLISION(pr, o, oPrev, wcs)   (((wcs)->isCS)||(!WorldCanCollide((wcs)->w)) ? FALSE : MoveAndCheckCD(pr,FALSE,0,o,oPrev,(wcs)->w))
 Checks if a configuration is in collision. More...
 
#define CS_WD_COST_PTR(wcs)   ((wcs)->isCS ? (void *)((wcs)->cs) : (void *)((wcs)->w))
 Pointer to the base type. More...
 
#define CS_WD_COST_FN(wcs)   ((wcs)->isCS ? EvaluateCSCost : EvaluateWorldCost)
 Cost function for a given configution. More...
 
#define CS_WD_COST(pr, simp, p, wcs)   ((wcs)->isCS ? EvaluateCSCost(pr,simp,p,(void *)((wcs)->cs)) : EvaluateWorldCost(pr,simp,p,(void *)((wcs)->w)))
 Evaluates the cost of a given configution. More...
 
#define CS_WD_GET_SIMP_TOPOLOGY(pr, tp, wcs)   ((wcs)->isCS ? GetSimpCSTopology(pr,tp,(wcs)->cs) : GetWorldSimpTopology(pr,tp,(wcs)->w))
 Gets the simplified variable topology. More...
 
#define CS_WD_REGENERATE_SOLUTION_POINT(pr, p, r, wcs)   ((wcs)->isCS ? RegenerateSolutionPoint(pr,p,r,(wcs)->cs) : RegenerateWorldSolutionPoint(pr,p,r,(wcs)->w))
 Compleates a solution point with the dummy variables. More...
 
#define CS_WD_GENERATE_SIMPLIFIED_POINT(pr, p, r, wcs)   ((wcs)->isCS ? GenerateSimplifiedPoint(pr,p,r,(wcs)->cs) : WorldGenerateSimplifiedPoint(pr,p,r,(wcs)->w))
 Generates a simplified point from an original one. More...
 
#define CS_WD_ERROR_IN_SIMP_EQUATIONS(pr, p, wcs)   ((wcs)->isCS ? ErrorInSimpCSEquations(pr,p,(wcs)->cs) : WorldErrorInSimpEquations(pr,p,(wcs)->w))
 Computes the error in the simplified system for a given point. More...
 
#define CS_WD_GENERATE_SIMP_INITIAL_BOX(pr, b, wcs)   { if ((wcs)->isCS) GenerateSimpInitialBox(pr,b,(wcs)->cs); else GetWorldSimpInitialBox(pr,b,(wcs)->w); }
 Computes the global box for the simplified system. More...
 
#define CS_WD_GET_SIMP_JACOBIAN(pr, J, wcs)   { if ((wcs)->isCS) GetSimpCSJacobian(pr,J,(wcs)->cs); else GetWorldSimpJacobian(pr,J,(wcs)->w); }
 Computes the Jacobian of the simplified system. More...
 
#define CS_WD_NEWTON_IN_SIMP(pr, p, wcs)   ((wcs)->isCS ? CuikNewtonSimp(pr,p,(wcs)->cs) : WorldSimpCuikNewton(pr,p,(wcs)->w))
 Applies a Newton procedure to move a point towads the manifold. More...
 
#define CS_WD_DELETE(wcs)   { if ((wcs)->isCS) { DeleteCuikSystem((wcs)->cs); free((wcs)->cs); } else { DeleteWorld((wcs)->w); free((wcs)->w); } }
 Destructor of the equation structure. More...
 

Functions

void InitCSWDFromFile (Tparameters *pr, char *name, TAtlasBase *wcs)
 Initializes a world or a CuikSystem structre. More...
 

Macro Definition Documentation

#define CS_WD_EXT   "world/cuik"

Extension for the equation files. This is only used for printing.

See Also
CUIK_EXT, WORLD_EXT

Definition at line 48 of file wcs.h.

Referenced by main().

#define CS_WD_INIT (   pr,
  name,
  wcs 
)    InitCSWDFromFile(pr,name,wcs)

Initializes the equations from a file.

Parameters
prPointer to the set of parameters.
nameThe file name given by the caller.
wcsPointer to the equation structure to initialize.
See Also
InitCSWDFromFile

Definition at line 89 of file wcs.h.

Referenced by main().

#define CS_WD_FROM_WORLD (   ptr,
  wcs 
)    { (wcs)->isCS=FALSE; (wcs)->cs=NULL; (wcs)->w=ptr; }

Initializes the equations from a world structure.

CAUTION: Do not use CS_WD_DELETE for structures created using this macro. The internal pointer to world in wcs copies the input pointer. Thus a delete would produce a double free.

Parameters
ptrA pointer to the world structure.
wcsPointer to the equation structure to initialize.
See Also
InitCSWDFromFile

Definition at line 108 of file wcs.h.

Referenced by main().

#define CS_WD_FROM_CUIKSYSTEM (   ptr,
  wcs 
)    { (wcs)->isCS=TRUE; (wcs)->cs=ptr; (wcs)->w=NULL; }

Initializes the equations from a CuikSystem structure.

CAUTION: Do not use CS_WD_DELETE for structures created using this macro. The internal pointer to CuikSystem wcs copies the input pointer. Thus a delete would produce a double free.

Parameters
ptrA pointer to the CuikSystem structure.
wcsPointer to the equation structure to initialize.
See Also
InitCSWDFromFile

Definition at line 127 of file wcs.h.

#define ON_CUIKSYSTEM (   wcs)    (wcs)->isCS

TRUE if the equations defining the implicit conf. space are given by a cuiksystem and FALSE if they are given by a world file (possibly involving obstacles,...)

Parameters
wcsPointer to the equation structure to query.

Definition at line 139 of file wcs.h.

Referenced by AtlasAStar().

#define GET_WORLD (   wcs)    (wcs)->w

Returns the world from an TAtlasBase.

Parameters
wcsPointer to the equation structure to query.

Definition at line 150 of file wcs.h.

Referenced by main().

#define GET_CUIKSYSTEM (   wcs)    (wcs)->cs

Returns the CuikSystem from an TAtlasBase.

Parameters
wcsPointer to the equation structure to query.

Definition at line 160 of file wcs.h.

#define CS_WD_EVALUATE_SIMP_EQUATIONS (   pr,
  p,
  r,
  wcs 
)    if ((wcs)->isCS) EvaluateSimpCSEquations(pr,p,r,(wcs)->cs); else WorldEvaluateSimpEquations(pr,p,r,(wcs)->w);

Evaluates the simplified set of equations.

Parameters
prPointer to the set of parameters.
pPointer to the point.
rPointer to the result.
wcsPointer to the equation set.
See Also
EvaluateSimpCSEquations, WorldEvaluateSimpEquations

Definition at line 176 of file wcs.h.

Referenced by Chart2Manifold(), Newton2ManifoldPlane(), and RefineSingularPoint().

#define CS_WD_EVALUATE_SUBSET_SIMP_EQUATIONS (   pr,
  st,
  p,
  r,
  wcs 
)    if ((wcs)->isCS) EvaluateSubSetSimpCSEquations(pr,st,p,r,(wcs)->cs); else WorldEvaluateSubSetSimpEquations(pr,st,p,r,(wcs)->w);

Evaluates a subset of the simplified set of equations.

Parameters
prPointer to the set of parameters.
stArray of booleans indicating the subset to evaluate.
pPointer to the point.
rPointer to the result.
wcsPointer to the equation set.
See Also
EvaluateSimpCSEquations, WorldEvaluateSimpEquations

Definition at line 192 of file wcs.h.

Referenced by Chart2Manifold().

#define CS_WD_SIMP_INEQUALITIES_HOLD (   pr,
  p,
  wcs 
)    ((wcs)->isCS ? SimpInequalitiesHoldOnPoint(pr,p,(wcs)->cs) : WorldSimpInequalitiesHold(pr,p,(wcs)->w))

Determines if the set of inequalities in the simplified set of equations actually hold for a given point.

Parameters
prPointer to the set of parameters.
pPointer to the point.
wcsPointer to the equation set.
See Also
SimpInequalitiesHoldOnPoint, WorldSimpInequalitiesHold

Definition at line 207 of file wcs.h.

Referenced by AddBranchToRRT(), AtlasRRT(), AtlasRRTSample(), AtlasRRTstar(), AtlasTRRT(), cBiRRT(), ccRRT(), ccTRRT(), ConnectSamples(), ConnectSamplesChart(), ExtendAtlasFromPoint(), InitChartInt(), InitRRT(), NewChartFromPoint(), NewTemptativeSample(), RRTstar(), and RRTValidateSample().

#define CS_WD_SIMP_INEQUALITIES_ERROR (   pr,
  p,
  wcs 
)    ((wcs)->isCS ? ErrorInSimpInequalitiesOnPoint(pr,p,(wcs)->cs) : WorldErrorInSimpInequalities(pr,p,(wcs)->w))

Determines the maximum error in the inequalities in the simplified set of equations actually hold for a given point.

Parameters
prPointer to the set of parameters.
pPointer to the point.
wcsPointer to the equation set.
See Also
ErrorInSimpInequalitiesOnPoint, WorldErrorInSimpInequalities

Definition at line 223 of file wcs.h.

Referenced by CutPolytopeWithFace().

#define CS_WD_GET_SYSTEM_VARS (   sv,
  wcs 
)    ((wcs)->isCS ? GetCSSystemVars(sv,(wcs)->cs) : GetWorldSystemVars(sv,(wcs)->w))

Gets an array of booleans with TRUE for the system variables.

Parameters
svPointer to the array where to store the system var flags.
wcsPointer to the equation set.
Returns
The number of variables in the problem.
See Also
GetCSSystemVars, GetWorldSystemVars

Definition at line 238 of file wcs.h.

Referenced by AtlasAStar(), AtlasGBF(), main(), MinimizeOnAtlas(), ReconstructAtlasRRTPath(), SaveChartCenters(), SaveRRTNodes(), SaveSingularCharts(), SmoothSamples(), Steps2PathinAtlasRRT(), and Steps2PathinRRT().

#define CS_WD_GET_NUM_SYSTEM_VARS (   wcs)    ((wcs)->isCS ? GetCSNumSystemVariables((wcs)->cs) : GetWorldNumSystemVariables((wcs)->w))

Number of system vars.

Parameters
wcsPointer to the equation set.
See Also
GetCSNumSystemVars, GetWorldNumSystemVars

Definition at line 250 of file wcs.h.

Referenced by main().

#define CS_WD_GET_VAR_TOPOLOGY (   varID,
  wcs 
)    ((wcs)->isCS ? GetCSVarTopology(varID,(wcs)->cs) : GetWorldVarTopology(varID,(wcs)->w))

Gets an array with the topology flag for each variable in the original system.

Parameters
varIDIdentifier of the variaable whose topology is required.
wcsPointer to the equation set.
See Also
GetCSVarTopology, GetWorldVarTopology

Definition at line 263 of file wcs.h.

Referenced by TriangulateAtlas().

#define CS_WD_REGENERATE_ORIGINAL_POINT (   pr,
  p,
  o,
  wcs 
)    ((wcs)->isCS ? RegenerateOriginalPoint(pr,p,o,(wcs)->cs) : RegenerateWorldOriginalPoint(pr,p,o,(wcs)->w))

Compleates a point of the original system of equations from the values of the variables in the simplified system.

Parameters
prPointer to the set of parameters.
pPointer to the point.
oPointer where to store the results.
wcsPointer to the equation set.
See Also
RegenerateOriginalPoint, RegenerateWorldOriginalPoint

Definition at line 279 of file wcs.h.

Referenced by MinimizeOnAtlas(), PathInChart(), PlotAtlas(), PlotAtlasRRT(), PlotBifurcations(), PlotChart(), PlotChartAsBox(), PlotChartAsPolygon(), PlotConnection(), PlotQrand(), PlotRRT(), ReconstructAtlasPath(), ReconstructAtlasRRTPath(), SaveChartCenters(), SaveRRTNodes(), SaveSingularCharts(), SmoothSamples(), Steps2PathinAtlasRRT(), Steps2PathinRRT(), and TriangulateAtlas().

#define CS_WD_INIT_CD (   pr,
  mt,
  wcs 
)    { if (!(wcs)->isCS) InitWorldCD(pr,mt,(wcs)->w); }

Initializes the collision detector. This only has effects if we are operating over world structures (the cuiksystem do not have obstacle information).

Parameters
prThe set of parameters.
mtMaximum number of threads to check collision in parallel.
wcsPointer to the equation set.
See Also
InitWorldCD

Definition at line 294 of file wcs.h.

Referenced by GradientSmooth(), InitAtlas(), InitRRT(), RandomSmooth(), and ShortcutSmooth().

#define CS_WD_IN_COLLISION (   f,
  pr,
  s,
  sPrev,
  wcs 
)
Value:
{ if (((wcs)->isCS)||(!WorldCanCollide((wcs)->w))) f=FALSE; else { double *oPrev=NULL,*o; \
RegenerateWorldOriginalPoint(pr,s,&o,(wcs)->w);if ((sPrev!=NULL)&&(WorldContinuousCD((wcs)->w))) RegenerateWorldOriginalPoint(pr,sPrev,&oPrev,(wcs)->w); \
f=MoveAndCheckCD(pr,FALSE,0,o,oPrev,(wcs)->w); \
free(o);if (oPrev!=NULL) free(oPrev);} \
}
boolean WorldCanCollide(Tworld *w)
Determines if any collision is potentially possible.
Definition: world.c:1046
#define FALSE
FALSE.
Definition: boolean.h:30
boolean MoveAndCheckCD(Tparameters *p, boolean all, unsigned int tID, double *sol, double *solPrev, Tworld *w)
Checks a point for collision.
Definition: world.c:1076
boolean WorldContinuousCD(Tworld *w)
Determines the type of collision library used.
Definition: world.c:1051
unsigned int RegenerateWorldOriginalPoint(Tparameters *p, double *s, double **o, Tworld *w)
Reconstruct a point in original kinematic system from a simplified point.
Definition: world.c:2166

Determines if a configuration given in the simplified form is in collision.

Parameters
fOutput flag. TRUE if the configuration is in collision.
prPointer to the set of parameters.
sPointer to the configuration in the simple system.
sPrevPointer to the previous configuration (also in the simple system). Only used for continuous collision detection.
wcsPointer to the set of equations and obstacles.
See Also
RegenerateWorldOriginalPoint, MoveAndCheckCD

Definition at line 319 of file wcs.h.

Referenced by AddBranchToRRT(), ChartVolume(), ConnectSamples(), ConnectSamplesChart(), DistanceOnChart(), ExtendAtlasFromPoint(), GeodesicDistance(), GradientSmooth(), InitChartInt(), InitRRT(), main(), and NewTemptativeSample().

#define CS_WD_ORIGINAL_IN_COLLISION (   pr,
  o,
  oPrev,
  wcs 
)    (((wcs)->isCS)||(!WorldCanCollide((wcs)->w)) ? FALSE : MoveAndCheckCD(pr,FALSE,0,o,oPrev,(wcs)->w))

Determines if a configuration given in the original form is in collision.

This is typically used instead of CS_WD_IN_COLLISION when we already have the point in the original system (i.e., after using CS_WD_REGENERATE_ORIGINAL_POINT).

Parameters
prPointer to the set of parameters.
oPointer to the configuration in the original system.
oPrevPointer to the previous configuration in the original system. Only used for continuous collision detection.
wcsPointer to the set of equations and obstacles.
See Also
CS_WD_IN_COLLISION, MoveAndCheckCD

Definition at line 348 of file wcs.h.

Referenced by AtlasAStar(), AtlasGBF(), AtlasRRT(), AtlasRRTstar(), AtlasTRRT(), cBiRRT(), ccRRT(), ccTRRT(), InitAtlasFromPoint(), PathInChart(), and RRTstar().

#define CS_WD_COST_PTR (   wcs)    ((wcs)->isCS ? (void *)((wcs)->cs) : (void *)((wcs)->w))

Returns the pointer to the base type. This is used as a parameter for the cost function.

See Also
CS_WD_COST_FN

Definition at line 359 of file wcs.h.

Referenced by main().

#define CS_WD_COST_FN (   wcs)    ((wcs)->isCS ? EvaluateCSCost : EvaluateWorldCost)

Gives the cost function used to evaluate a given set of configurations.

See Also
EvaluateCSCost, EvaluateWorldCost

Definition at line 369 of file wcs.h.

Referenced by main().

#define CS_WD_COST (   pr,
  simp,
  p,
  wcs 
)    ((wcs)->isCS ? EvaluateCSCost(pr,simp,p,(void *)((wcs)->cs)) : EvaluateWorldCost(pr,simp,p,(void *)((wcs)->w)))

Computes the cost of a given set of configurations. In the world files the cost is defined using the "avoid limit" clause. In the cuik files it can be defined as an arbitrary equation invoving the problem variables.

Parameters
prPointer to the set of parameters.
simpTRUE if the point is in simplified form
pPointer to the point
wcsPointer to the set of equations.
See Also
EvaluateCSCost, EvaluateWorldCost

Definition at line 387 of file wcs.h.

Referenced by main().

#define CS_WD_GET_SIMP_TOPOLOGY (   pr,
  tp,
  wcs 
)    ((wcs)->isCS ? GetSimpCSTopology(pr,tp,(wcs)->cs) : GetWorldSimpTopology(pr,tp,(wcs)->w))

Gets an array with the topology flag for each variable in the simplified system.

Parameters
prPointer to the set of parameters.
tpPointer to the array where to store the topology.
wcsPointer to the set of equations.
See Also
CS_WD_GET_VAR_TOPOLOGY, GetSimpCSTopology, GetWorldSimpTopology

Definition at line 401 of file wcs.h.

Referenced by GradientSmooth(), main(), RandomSmooth(), SetAtlasTopology(), SetRRTTopology(), ShortcutSmooth(), and SmoothSamples().

#define CS_WD_REGENERATE_SOLUTION_POINT (   pr,
  p,
  r,
  wcs 
)    ((wcs)->isCS ? RegenerateSolutionPoint(pr,p,r,(wcs)->cs) : RegenerateWorldSolutionPoint(pr,p,r,(wcs)->w))

Compleates a solution point including only values for the system variables with the values for the non-system (dummy) variables.

Parameters
prPointer to the set of parameters.
pPointer to the point.
rPointer to the array where to store the result.
wcsPointer to the set of equations.
See Also
RegenerateSolutionPoint, RegenerateWorldSolutionPoint

Definition at line 417 of file wcs.h.

Referenced by AtlasAStar(), AtlasGBF(), AtlasRRT(), AtlasRRTstar(), AtlasTRRT(), cBiRRT(), ccRRT(), ccTRRT(), InitAtlasFromPoint(), InitRRT(), RRTstar(), and SmoothSamples().

#define CS_WD_GENERATE_SIMPLIFIED_POINT (   pr,
  p,
  r,
  wcs 
)    ((wcs)->isCS ? GenerateSimplifiedPoint(pr,p,r,(wcs)->cs) : WorldGenerateSimplifiedPoint(pr,p,r,(wcs)->w))

Generates a point in the simplified system from a point in the original system.

Parameters
prPointer to the set of parameters.
pPointer to the point.
rPointer to where to store the result.
wcsPointer to the set of equations.
See Also
GenerateSimplifiedPoint, WorldGenerateSimplifiedPoint

Definition at line 432 of file wcs.h.

Referenced by AtlasAStar(), AtlasGBF(), AtlasRRT(), AtlasRRTstar(), AtlasTRRT(), cBiRRT(), ccRRT(), ccTRRT(), InitAtlasFromPoint(), InitRRT(), RRTstar(), and SmoothSamples().

#define CS_WD_ERROR_IN_SIMP_EQUATIONS (   pr,
  p,
  wcs 
)    ((wcs)->isCS ? ErrorInSimpCSEquations(pr,p,(wcs)->cs) : WorldErrorInSimpEquations(pr,p,(wcs)->w))

Computes the error in the simplified system for a given point.

Parameters
prPointer to the set of parameters.
pPointer to the point.
wcsPointer to the set of equations.
See Also
ErrorInSimpCSEquations, WorldErrorInSimpEquations

Definition at line 446 of file wcs.h.

Referenced by AtlasAStar(), AtlasGBF(), AtlasRRT(), AtlasRRTstar(), AtlasTRRT(), cBiRRT(), ccRRT(), ccTRRT(), InitChartInt(), InitRRT(), and RRTstar().

#define CS_WD_GENERATE_SIMP_INITIAL_BOX (   pr,
  b,
  wcs 
)    { if ((wcs)->isCS) GenerateSimpInitialBox(pr,b,(wcs)->cs); else GetWorldSimpInitialBox(pr,b,(wcs)->w); }

Computes a box with the valid range for the variables of the simplifed system.

Parameters
prPointer to the set of parameters.
bPointer to the output box.
wcsPointer to the set of equations.
See Also
GenerateSimpInitialBox, GetWorldSimpInitialBox

Definition at line 460 of file wcs.h.

Referenced by GradientSmooth(), InitAtlas(), InitAtlasRRT(), InitRRT(), LoadAtlas(), LoadAtlasRRT(), LoadRRT(), main(), RandomSmooth(), and ShortcutSmooth().

#define CS_WD_GET_SIMP_JACOBIAN (   pr,
  J,
  wcs 
)    { if ((wcs)->isCS) GetSimpCSJacobian(pr,J,(wcs)->cs); else GetWorldSimpJacobian(pr,J,(wcs)->w); }

Computes the Jacobian of the simplified system.

Parameters
prPointer to the set of parameters.
JPointer to the Jaocobian.
wcsPointer to the set of equations.
See Also
GetSimpCSJacobian, GetWorldSimpJacobian

Definition at line 474 of file wcs.h.

Referenced by ConnectSamplesChart(), GradientSmooth(), InitAtlas(), InitAtlasRRT(), LoadAtlas(), LoadAtlasRRT(), and main().

#define CS_WD_NEWTON_IN_SIMP (   pr,
  p,
  wcs 
)    ((wcs)->isCS ? CuikNewtonSimp(pr,p,(wcs)->cs) : WorldSimpCuikNewton(pr,p,(wcs)->w))

Applies a Newton procedure to move a point towads the manifold defined by the equations.

Parameters
prPointer to the set of parameters.
pPointer to the point.
wcsPointer to the set of equations.
See Also
CuikNewtonSimp, WorldSimpCuikNewton

Definition at line 488 of file wcs.h.

Referenced by AddBranchToRRT(), ConnectSamples(), and GeodesicDistance().

#define CS_WD_DELETE (   wcs)    { if ((wcs)->isCS) { DeleteCuikSystem((wcs)->cs); free((wcs)->cs); } else { DeleteWorld((wcs)->w); free((wcs)->w); } }

Releases the memory used to store the equation structure.

Parameters
wcsPointer to the set of equations.
See Also
DeleteCuikSystem, DeleteWorld

Definition at line 500 of file wcs.h.

Referenced by main().

Function Documentation

void InitCSWDFromFile ( Tparameters pr,
char *  name,
TAtlasBase wcs 
)

Initializes the equations from a file. First we try to read the equations from cuik file. If this fails, we try to read them from a world file. If not possible, we trigger and error.

The cuik files are typically derived from the world ones (using cuikequations). So if the cuik file has been generated, then it probably means you want to work with it. Otherwise just delete (or rename) it and we will read the world file instead.

We have two main set of equation. One (the original system) is the one as given in the given file. The other (the simplified system) is the same after introducing trivial simplifications (removing variables with constant values, replacing variables by equivalent ones,...). Typically we operate with the simplified system but input and output points are given in the original system. Therefore we have to translate between them when necessary. But this is out of the scope of this function.

See Also
InitCuikSystemFromFile, InitWorldFromFile

Definition at line 618 of file chart.c.

References CreateFileName(), TAtlasBase::cs, CUIK_EXT, DeleteFileName(), FALSE, GetFileFullName(), InitCuikSystemFromFile(), InitWorldFromFile(), TAtlasBase::isCS, NEW, TRUE, TAtlasBase::w, and WORLD_EXT.

Referenced by main().