atlas.h File Reference Detailed DescriptionDefinition of a set of local charts on a manifold. Definition in file atlas.h.
Macro Definition Documentation
Vebosity of the atlas operations. If set to 0 only minimalistic information is printed. Definition at line 29 of file atlas.h. Referenced by AtlasAStar(), AtlasGBF(), main(), and ReconstructAtlasPath().
When set to 1 charts are plotted in different colors according to whether they are singular (green), open (red), singular open (yellow), close (blue), etc. Otherwise all charts are plotted in blue. This is only used if the user does not provide a cost map associated with the atlas. Definition at line 39 of file atlas.h. Referenced by PlotAtlas().
Select between the two types of projection when interpolating between configurations. In the first type of projection a Newton (or Jacobian pseudo-inverse) method is used. This method does not warrantee any separation between the samples when projected. When we force the projection to lie in a plane orthogonal to the interpolation direction, projected samples are at least as separated as the interpolation steps. Right now this is only used when approximatting the geodesic distance between samples that is part of the A* search (used to determine if there is a collision between the centers of two charts: collision = INF distance).
Initial number of charts of an atlas. It will be expanded as needed. Definition at line 60 of file atlas.h. Referenced by AddChart2AtlasRRT(), InitAtlas(), and InitAtlasRRT().
Initial number of bifurcations of an atlas. It will be expanded as needed. Definition at line 66 of file atlas.h. Referenced by InitAtlas().
Ratio at which the sampling radius is reduced when sampling fails. Definition at line 85 of file atlas.h. Referenced by ExtendAtlasFromPoint(), and NewChartFromPoint().
Initial number of elements in the heap of local chart used int AtlasGBF. This is extended as needed. Definition at line 102 of file atlas.h. Referenced by AtlasAStar(), AtlasGBF(), and BuildAtlasFromPoint(). Function Documentation
Defines a new atlas heap element.
Definition at line 2600 of file atlas.c. References TAtlasHeapElement::beta, TAtlasHeapElement::chartID, TAtlasHeapElement::cost, Error(), and TAtlasHeapElement::nPenalized. Referenced by AtlasAStar(), AtlasGBF(), and BuildAtlasFromPoint().
Defines a new atlas heap element from another. We use void pointers to use the generic heap implementation.
Definition at line 2610 of file atlas.c. Referenced by AtlasAStar(), AtlasGBF(), and BuildAtlasFromPoint().
Gets the chart identifer stored in an atlas heap element.
Definition at line 2618 of file atlas.c. References TAtlasHeapElement::chartID. Referenced by AtlasAStar(), AtlasGBF(), and BuildAtlasFromPoint().
Gets the cost stored in an atlas heap element.
Definition at line 2623 of file atlas.c. References TAtlasHeapElement::cost.
Identifies atlas heap element with lower cost.
Definition at line 2628 of file atlas.c. Referenced by AtlasAStar(), AtlasGBF(), and BuildAtlasFromPoint().
Penalizes the cost of the atlas heap element. Every time this function is called we increase the counter in the heap element and, thus, we penalize the cost accordingly. The idea is that charts where it is difficult to sample should be penalized to deviate the search to neighbouring charts with larger external border.
Definition at line 2643 of file atlas.c. References TAtlasHeapElement::nPenalized. Referenced by AtlasGBF().
Releases the memory alloated in the atlas heap element, if any.
Definition at line 2648 of file atlas.c. Referenced by AtlasAStar(), AtlasGBF(), and BuildAtlasFromPoint().
Initializes an empty atlas.
Definition at line 2676 of file atlas.c. References Tatlas::ambient, Tatlas::bifurcation, Tatlas::ce, Tatlas::charts, CS_WD_GENERATE_SIMP_INITIAL_BOX, CS_WD_GET_SIMP_JACOBIAN, CS_WD_INIT_CD, Tatlas::currentChart, Tatlas::e, FALSE, GetJacobianSize(), Tatlas::H, INIT_NUM_BIFURCATIONS, INIT_NUM_CHARTS, Tatlas::J, Tatlas::k, Tatlas::m, Tatlas::maxCharts, Tatlas::mBifurcations, Tatlas::n, Tatlas::nBifurcations, Tatlas::ncJ, Tatlas::nCores, NEW, Tatlas::npBifurcations, Tatlas::npCharts, Tatlas::nrJ, Tatlas::parallel, Tatlas::r, SetAtlasTopology(), Tatlas::simpleChart, and Tatlas::w. Referenced by InitAtlasFromPoint().
Defines a chart on the given point and adds it to the atlas updating the neighbouring relations and checking for the presence of singularities in between the centers of the charts dectected as neighbours, if any. Note that we could actually build an atlas by sampling random points on the manifold and using this function to create new charts until the atlas is compleated. However this estrategy is not guaranteed be be succesful and could produce atlas with charts for very different sizes. This is why higher dimensional continuation typically uses more principled ways to generate new charts from the existing ones (see BuildAtlasFromPoint).
Definition at line 2836 of file atlas.c. References Tatlas::ambient, Tatlas::ce, Tatlas::charts, Tatlas::currentChart, Tatlas::e, FALSE, InitChart(), Tatlas::J, Tatlas::k, Tatlas::m, Tatlas::maxCharts, MEM_DUP, NEW, NO_UINT, PostProcessNewCharts(), Tatlas::r, Tatlas::simpleChart, Tatlas::tp, TRUE, and Tatlas::w. Referenced by MinimizeOnAtlas().
Version of AddChart2Atlas for atlas in AtlasRRT (construction of a RRT from an atlas and the reverse). In this special version, we add the chart to the atlas and we determine its neighbours but without any concern about detecting singularities nor enforcing intersection with the parent chart. Moreover, we trust that the input point is in the manifold and that its is collision free (these conditions are checked when generating the point).
Definition at line 2870 of file atlas.c. References Tatlas::ambient, Tatlas::ce, Tatlas::charts, CT_DETECT_BIFURCATIONS, Tatlas::currentChart, DetectBifurcation(), Tatlas::e, FALSE, GetParameter(), InitTrustedChart(), Tatlas::J, Tatlas::k, Tatlas::m, Tatlas::maxCharts, MEM_DUP, Tatlas::n, NEW, NO_UINT, PostProcessNewCharts(), Tatlas::r, Tatlas::simpleChart, Tatlas::tp, and Tatlas::w. Referenced by AddChart2AtlasRRT().
Initializes an atlas defining a local chart from a given point. If the given point is not on the manifold nothing is added to the atlas.
Definition at line 2742 of file atlas.c. References Tatlas::ambient, Tatlas::ce, ChangeParameter(), Tatlas::charts, CS_WD_GENERATE_SIMPLIFIED_POINT, CS_WD_ORIGINAL_IN_COLLISION, CS_WD_REGENERATE_SOLUTION_POINT, CT_CE, CT_E, CT_EPSILON, CT_N_DOF, CT_R, Tatlas::currentChart, Tatlas::e, Error(), EvaluateTransposedJacobianInVector(), FindRank(), FrontierChart(), GetParameter(), InitAtlas(), InitBTree(), InitChart(), Tatlas::J, Tatlas::k, Tatlas::m, Tatlas::ncJ, NEW, Tatlas::npCharts, Tatlas::nrJ, Tatlas::r, Tatlas::simpleChart, Tatlas::tp, Tatlas::w, and Warning(). Referenced by BuildAtlasFromPoint(), InitAtlasRRT(), main(), and MinimizeOnAtlas().
Defines an atlas from a given point and covering the whole connected component including this point. This procedure can be quite time demanding for high-dimensional manifolds. For these cases, we implement a parallel version (via MP). However, currently the parallel version can not deal with obstacles (i.e., it can only run on cuik files but not on world files).
Definition at line 2919 of file atlas.c. References AddElement2Heap(), BoundaryPointFromExternalCorner(), Tatlas::charts, CopyAtlasHeapElement(), CT_ATLASGBF_BETA, CT_MAX_CHARTS, CT_N_DOF, Tatlas::currentChart, DeleteAtlasHeapElement(), DeleteHeap(), DistanceTopology(), Error(), ExtendAtlasFromPoint(), ExtractMinElement(), FALSE, GetAtlasHeapElementID(), GetChartCenter(), GetParameter(), HeapEmpty(), INIT_NUM_CHARTS_IN_ATLAS_HEAP, InitAtlasFromPoint(), InitAtlasHeapElement(), InitAtlasStatistics(), InitHeap(), Tatlas::k, LessThanAtlasHeapElement(), Tatlas::m, Tatlas::maxCharts, MEM_DUP, Tatlas::nCores, NEW, NewBoundaryAttempt(), NewChartFromPoint(), NewNotInBoundary(), NO_UINT, OpenChart(), Tatlas::parallel, PostProcessNewCharts(), PrintAtlasStatistics(), randomDouble(), RANDOMNESS, Tatlas::tp, TRUE, and WrongCorner(). Referenced by main().
Local minimization of a cost function defined on the atlas. The minimization is done using gradient descent. The gradient is numerically evaluated. The presence of bifurcation si taken into account (if the appropiate parameteres are set, see CT_DETECT_BIFURCATIONS) and, thus, different minima can be determined. The paths to the minima are stored in separate files.
Definition at line 3106 of file atlas.c. References AddChart2Atlas(), AddSample2Samples(), ChangeParameter(), Chart2Manifold(), Tatlas::charts, CS_WD_GET_SYSTEM_VARS, CS_WD_REGENERATE_ORIGINAL_POINT, CT_DELTA, CT_DETECT_BIFURCATIONS, CT_EPSILON, CT_N_DOF, Tatlas::currentChart, Error(), FALSE, GetChartCenter(), GetParameter(), INF, InitAtlasFromPoint(), InitSamples(), Tatlas::J, Tatlas::m, MEM_DUP, TMinTrace::nc, NEW, Norm(), TMinTrace::ns, SaveSamples(), SaveSamplesN(), ScaleVector(), TMinTrace::st, TRUE, Tatlas::w, and Warning(). Referenced by main().
Returns the maximum curvature error for all the charts, i.e., the maximum angle between neighbouring charts.
Definition at line 3321 of file atlas.c. References Tatlas::ce.
Determines a point in the intersection of a given plane and the manifold. This is an auxiliary function of FindPointInOtherBranch but it is also used when defining an (Atlas)RRT (to incrementally extend a branch of the tree toward a given point). The point is searched using a Newton procedure where the syste of equations defining the manifold is extended with the equation defining the given plane.
Definition at line 2250 of file atlas.c. References ArrayPi2Pi(), CS_WD_EVALUATE_SIMP_EQUATIONS, CT_EPSILON, CT_MAX_NEWTON_ITERATIONS, DeleteNewton(), Error(), EvaluateJacobianInVector(), FALSE, GetNewtonMatrixBuffer(), GetNewtonRHBuffer(), GetParameter(), InitNewton(), Tatlas::J, Tatlas::m, Tatlas::n, Tatlas::ncJ, NewtonStep(), Norm(), Tatlas::nrJ, SetRow(), Tatlas::tp, TRUE, and Tatlas::w. Referenced by FindPointInOtherBranch(), and GeodesicDistance().
Tries to expand the atlas from a given point defined on the chart tangent space. This point is assumed to be on the border of the atlas (on the ball defined in the given chart and not in any other ball from other charts). If the new chart can not be properly defined, the we try to try to generate it closer to the center of the parent chart. When very close to the parent chart center we are supposed to be able to generate a new chart without any issues.
Definition at line 1015 of file atlas.c. References AddBorderConstraint(), Tatlas::ambient, Tatlas::ce, Chart2Manifold(), ChartIsFrontier(), Tatlas::charts, CloseCharts(), CollisionChart(), CS_WD_IN_COLLISION, CS_WD_SIMP_INEQUALITIES_HOLD, CT_EPSILON, Tatlas::currentChart, DeleteChart(), Tatlas::e, Error(), FALSE, GetParameter(), InitChart(), Tatlas::J, Tatlas::k, Tatlas::m, Tatlas::maxCharts, MEM_DUP, MIN_SAMPLING_RADIUS, NEW, NewAtlasExtension(), NewDecompositionError(), NewFarFromParent(), NewGoodExtension(), NewImpossible(), NewLargeError(), NewNonRegularPoint(), NewNotInManifold(), NewRadiousChange(), NewSingularImpossible(), NO_UINT, Norm(), PointInBoxTopology(), PostProcessNewCharts(), Tatlas::r, SAMPLING_RADIUS_REDUCTION_FACTOR, ScaleVector(), Tatlas::simpleChart, SingularChart(), Tatlas::tp, TRUE, and Tatlas::w. Referenced by AtlasAStar(), and BuildAtlasFromPoint().
This is like ExtendAtlasFromPoint but the process is started close to the center of the parent chart and the new chart is progressively generated towards the targed point as we have success in generating the new chart. In this process, we could even go further that the targed point. Another difference with ExtendAtlasFromPoint is that here we take into account obstacles.
Definition at line 1246 of file atlas.c. References Tatlas::ambient, Tatlas::ce, Chart2Manifold(), Tatlas::charts, CloseCharts(), CollisionChart(), CT_DELTA, CT_EPSILON, Tatlas::currentChart, DeleteChart(), Tatlas::e, Error(), FALSE, GetChartCenter(), GetChartRadius(), GetParameter(), InitChart(), Tatlas::J, Tatlas::k, Tatlas::m, Tatlas::maxCharts, MEM_DUP, NEW, NewAtlasExtension(), NewDecompositionError(), NewFarFromParent(), NewGoodExtension(), NewImpossible(), NewInCollision(), NewLargeError(), NewNonRegularPoint(), NewNotInManifold(), NewRadiousChange(), NewSingularImpossible(), Norm(), PostProcessNewCharts(), Tatlas::r, ScaleVector(), Tatlas::simpleChart, SingularChart(), Tatlas::tp, TRUE, and Tatlas::w. Referenced by AtlasGBF().
Expands the atlas with the purpose to reach a given configuration using a A* search strategy.
< Predecesor. Previou node in the best path to the start node. Definition at line 3341 of file atlas.c. References AddElement2Heap(), ATLAS_VERBOSE, BoundaryPointFromExternalCorner(), ChartNeighbourID(), ChartNumNeighbours(), Tatlas::charts, CopyAtlasHeapElement(), TAStarInfo::cost, CS_WD_ERROR_IN_SIMP_EQUATIONS, CS_WD_GENERATE_SIMPLIFIED_POINT, CS_WD_GET_SYSTEM_VARS, CS_WD_ORIGINAL_IN_COLLISION, CS_WD_REGENERATE_SOLUTION_POINT, CT_ATLASGBF_BETA, CT_EPSILON, CT_MAX_CHARTS, CT_MAX_PLANNING_TIME, Tatlas::currentChart, DeleteAtlasHeapElement(), DeleteHeap(), DeleteStatistics(), DistanceOnChart(), DistanceTopology(), Error(), ExpandibleChart(), ExtendAtlasFromPoint(), ExtractMinElement(), FALSE, GeodesicDistance(), GetAtlasHeapElementID(), GetChartCenter(), GetElapsedTime(), GetHeapElement(), GetParameter(), HeapEmpty(), HeapSize(), TAStarInfo::heuristic, INF, INIT_NUM_CHARTS_IN_ATLAS_HEAP, InitAtlasHeapElement(), InitAtlasStatistics(), InitHeap(), InitStatistics(), Tatlas::J, Tatlas::k, LessThanAtlasHeapElement(), Tatlas::m, Tatlas::maxCharts, MEM_DUP, MEM_EXPAND, Tatlas::n, Tatlas::nCores, NEW, NewBoundaryAttempt(), NewChartFromPoint(), NewNotInBoundary(), NO_UINT, ON_CUIKSYSTEM, Tatlas::parallel, PointOnChart(), PostProcessNewCharts(), PrintAtlasStatistics(), ReconstructAtlasPath(), TAStarInfo::status, Tatlas::tp, TRUE, Tatlas::w, Warning(), and WrongCorner(). Referenced by main().
Expands the atlas with the purpose to reach a given configuration using a Greedy Best First search strategy.
Definition at line 3677 of file atlas.c. References AddElement2Heap(), ATLAS_VERBOSE, Tatlas::charts, CopyAtlasHeapElement(), CS_WD_ERROR_IN_SIMP_EQUATIONS, CS_WD_GENERATE_SIMPLIFIED_POINT, CS_WD_GET_SYSTEM_VARS, CS_WD_ORIGINAL_IN_COLLISION, CS_WD_REGENERATE_SOLUTION_POINT, CT_ATLASGBF_BETA, CT_EPSILON, CT_MAX_CHARTS, CT_MAX_PLANNING_TIME, Tatlas::currentChart, DeleteAtlasHeapElement(), DeleteHeap(), DeleteStatistics(), DistanceOnChart(), DistanceTopology(), Error(), ExpandibleChart(), ExtendAtlasTowardPoint(), ExtractMinElement(), FALSE, GetAtlasHeapElementID(), GetChartCenter(), GetElapsedTime(), GetParameter(), HeapEmpty(), INF, INIT_NUM_CHARTS_IN_ATLAS_HEAP, InitAtlasHeapElement(), InitAtlasStatistics(), InitHeap(), InitStatistics(), Tatlas::J, Tatlas::k, LessThanAtlasHeapElement(), Tatlas::m, Tatlas::maxCharts, MEM_EXPAND, Tatlas::n, Tatlas::nCores, NEW, NewBoundaryAttempt(), NewNotInBoundary(), NO_UINT, PenalizeAtlasHeapElement(), PointOnChart(), PrintAtlasStatistics(), RandomPointOnBoundary(), ReconstructAtlasPath(), Tatlas::tp, TRUE, Tatlas::w, and Warning(). Referenced by main().
Tries to define a tree covereing the manifold. \
Returns the number of charts in the atlas.
Definition at line 3931 of file atlas.c. References Tatlas::currentChart. Referenced by AddChart2AtlasRRT(), InitAtlasRRT(), main(), and RandomPointInAtlasTree(). Returns a pointer to one of the charts of the atlas. Care should be taken not to manipulate the chart (use it for query only).
Definition at line 3936 of file atlas.c. References Tatlas::charts. Referenced by AddBranchToAtlasRRT(), AddChart2AtlasRRT(), AddSample2AtlasRRT(), AtlasRRT(), AtlasRRTSample(), GetRRTNNInNeighbourChart(), NewTemptativeSample(), PlotAtlasRRT(), PlotQrand(), PointTowardRandSample(), PopulateWithSamples(), PrintAtlasRRTStatistics(), and RandomPointInAtlasTree().
Samples a random point on the part of the manifold covered by the atlas with uniform distribution. We select a chart with uniform distribution and then a point in the tangent space of the selected chart.
Definition at line 3944 of file atlas.c. References Tatlas::charts, Tatlas::currentChart, randomMax(), RandomPointInChart(), randomWithDistribution(), and Tatlas::tp. Referenced by RandomPointInAtlasTree().
Approximates the volume of the manifold parametrized by an atlas.
Definition at line 3966 of file atlas.c. References Tatlas::charts, ChartVolume(), Tatlas::currentChart, FrontierChart(), Tatlas::J, and Tatlas::tp. Referenced by main().
Stores the centers of the charts in the form of boxes.
Definition at line 3987 of file atlas.c. References Chart2Manifold(), ChartNeighbourID(), ChartNumNeighbours(), Tatlas::charts, CreateFileName(), CS_WD_GET_SYSTEM_VARS, CS_WD_REGENERATE_ORIGINAL_POINT, Tatlas::currentChart, DeleteFileName(), Error(), FrontierChart(), GetChartCenter(), GetFileFullName(), INF, Tatlas::J, Tatlas::k, Tatlas::m, Manifold2Chart(), NEW, NO_UINT, ScaleVector(), SOL_EXT, SOL_WITH_DUMMIES_EXT, Tatlas::tp, and Tatlas::w. Referenced by main().
Stores the centers of the singular charts in the form of boxes.
Definition at line 4095 of file atlas.c. References Tatlas::charts, CreateFileName(), CS_WD_GET_SYSTEM_VARS, CS_WD_REGENERATE_ORIGINAL_POINT, Tatlas::currentChart, DeleteFileName(), Error(), GetChartCenter(), GetFileFullName(), SingularChart(), SOL_EXT, SOL_WITH_DUMMIES_EXT, and Tatlas::w. Referenced by main().
Plots a 3d projection of an atlas defined on a manifold. Although the ambien space can have arbitrary dimension we project it on 3 dimensions. Only 2D manifolds plots can be properly visualized. The output plot can be visualized using geomview.
Definition at line 4151 of file atlas.c. References ChartNeighbourID(), ChartNumNeighbours(), Tatlas::charts, Close3dObject(), Close3dObjectNoColor(), ClosePlot3d(), CS_WD_REGENERATE_ORIGINAL_POINT, Tatlas::currentChart, Delete3dObject(), DeleteColor(), ExpandibleChart(), FALSE, FrontierChart(), GetChartCenter(), InitPlot3d(), Tatlas::J, Tatlas::k, NewColor(), NO_UINT, PLOT_AS_POLYGONS, PLOT_ATLAS_IN_COLORS, PlotChart(), PlotVect3d(), Tatlas::simpleChart, SingularChart(), StartNew3dObject(), and Tatlas::w. Referenced by main(), and PlotAtlasRRT().
Plots a 3d projection of triangular mesh formed by the atlas centers. This is only well defined for surfaces, i.e., for manifolds of dimension 2. The difference with PlotAtlas is that here only the chart centers are used and, thus, the charts are not displayed. The use of a triangular mesh on the chart centers results in a smoother visualization. The plot generated with PlotAtlas creates a separate polytope for each atlas and, thus there are "discontinuities" in between charts. The triangular mesh is fully continuous and can be properly smoothed and shaded. Although the ambien space can have arbitrary dimension we project it on 3 dimensions. The output plot can be visualized using geomview.
Definition at line 4314 of file atlas.c. References Tatlas::charts, Close3dObject(), ClosePlot3d(), CostColor(), CrossProduct(), CrossTopologyBorder(), CS_WD_GET_VAR_TOPOLOGY, CS_WD_REGENERATE_ORIGINAL_POINT, CT_CUT_X, CT_CUT_Y, CT_CUT_Z, CT_REPRESENTATION, Tatlas::currentChart, DifferenceVector(), DotProduct(), Error(), FALSE, GetChartCenter(), GetChartNeighboursFromVertices(), GetParameter(), InitPlot3d(), Tatlas::k, M_2PI, MEM_DUP, NeighbouringTriangles(), NEW, NewColor(), NO_UINT, Plot3dObject(), Plot3dObjectWithColors(), REP_JOINTS, SameTriangle(), ScaleVector(), StartNew3dObject(), TOPOLOGY_R, TRUE, and Tatlas::w. Referenced by main().
Returns the approximated memory used (in bytes) by a given atlas.
Definition at line 3831 of file atlas.c. References ChartMemSize(), Tatlas::charts, and Tatlas::currentChart. Referenced by AtlasRRTMemSize(), and main().
Stores all the information in the atlas in a file.
Definition at line 3842 of file atlas.c. References Tatlas::ce, Tatlas::charts, Tatlas::currentChart, Tatlas::e, Error(), GetFileFullName(), Tatlas::k, Tatlas::m, Tatlas::maxCharts, Tatlas::n, Tatlas::r, SaveBifurcations(), SaveChart(), and Tatlas::simpleChart. Referenced by main(), and SaveAtlasRRT().
Construct an atlas from the information previously stored in a file by SaveAtlas.
Definition at line 3869 of file atlas.c. References AddChart2Btree(), Tatlas::ambient, Tatlas::ce, Tatlas::charts, CS_WD_GENERATE_SIMP_INITIAL_BOX, CS_WD_GET_SIMP_JACOBIAN, Tatlas::currentChart, Tatlas::e, Error(), FALSE, GetFileFullName(), GetJacobianSize(), Tatlas::H, InitBTree(), Tatlas::J, Tatlas::k, LoadBifurcations(), LoadChart(), Tatlas::m, Tatlas::maxCharts, Tatlas::n, Tatlas::ncJ, Tatlas::nCores, NEW, Tatlas::nrJ, Tatlas::parallel, Tatlas::r, SetAtlasTopology(), Tatlas::simpleChart, Tatlas::tp, and Tatlas::w. Referenced by LoadAtlasRRT(), and main().
Deletes the information stored in the atlas.
Definition at line 4561 of file atlas.c. References Tatlas::ambient, Tatlas::charts, Tatlas::currentChart, DeleteBifurcations(), DeleteBox(), DeleteBTree(), DeleteChart(), DeleteHessian(), DeleteJacobian(), Tatlas::H, Tatlas::J, and Tatlas::tp. Referenced by DeleteAtlasRRT(), and main(). |
Follow us!