rrt.c File Reference Detailed Description
Function Documentation
To be called everty time we start a new RRT branch.
Definition at line 228 of file rrt.c. References TRRTStatistics::nBranch. Referenced by cBiRRT(), ccRRT(), ccTRRT(), and WireRRTstar().
To be called every time we managed to add a non-emtpy branch to the RRT.
Definition at line 233 of file rrt.c. References TRRTStatistics::nNoEmptyBranch. Referenced by cBiRRT(), ccRRT(), ccTRRT(), and WireRRTstar().
New attempt to connect the two trees. This is only updated in bi-directional RRTs.
Definition at line 238 of file rrt.c. References TRRTStatistics::nTreeConnection. Referenced by cBiRRT().
New attempt to connect the two trees that resulted in a non empty branch. This is only updated in bi-directional RRTs.
Definition at line 243 of file rrt.c. References TRRTStatistics::nNoEmptyTreeConnection. Referenced by cBiRRT().
To be called everytime we add a new step to a branch.
Definition at line 253 of file rrt.c. References TRRTStatistics::nStep.
New distance from q_rand to the tree. These distances are accumulated and then we compute the average using the number of attempts for branch extension.
Definition at line 248 of file rrt.c. References TRRTStatistics::dQrand.
To be called every time the random sample is reached.
Definition at line 258 of file rrt.c. References TRRTStatistics::nQrandReached. Referenced by AddBranchToRRT().
Error converging to the manifold.
Definition at line 263 of file rrt.c. References TRRTStatistics::nConvergenceError. Referenced by AddBranchToRRT().
A high cost configuration is reached. Only possible in transition-based RRTs.
Definition at line 268 of file rrt.c. References TRRTStatistics::nHighCost. Referenced by AddBranchToRRT().
The branch extension is stopped because it leves the problem domain.
Definition at line 273 of file rrt.c. References TRRTStatistics::nOutOfDomain. Referenced by AddBranchToRRT().
The branch extension is stopped because the distance to q_rand increases.
Definition at line 278 of file rrt.c. References TRRTStatistics::nDistanceIncreases. Referenced by AddBranchToRRT().
To be called every time a branch extension is stopped due to a collision.
Definition at line 283 of file rrt.c. References TRRTStatistics::nCollision. Referenced by AddBranchToRRT().
To be called every time a branch extension is stopped if a sample that is too far from the previous sample.
Definition at line 288 of file rrt.c. References TRRTStatistics::nTooFar. Referenced by AddBranchToRRT().
To be called every time a branch extension is stalled (it grows but too slow).
Definition at line 293 of file rrt.c. References TRRTStatistics::nStalled. Referenced by AddBranchToRRT().
To be called every time we actually add a node (or sample) to the RRT.
Definition at line 298 of file rrt.c. References TRRTStatistics::nSample. Referenced by AddNodeToRRT(), BiRRTstar(), cBiRRT(), ccRRT(), ccTRRT(), and RRTstar().
Counts the number of random samples generated. Definition at line 303 of file rrt.c. References TRRTStatistics::nRandom. Referenced by RRTSample().
Counts the number os random samples rejected. Definition at line 308 of file rrt.c. References TRRTStatistics::nRejections. Referenced by RRTValidateSample().
New collision check. Definition at line 313 of file rrt.c. References TRRTStatistics::nCollisionChecks. Referenced by AddBranchToRRT().
Init the RRT statistics.
Definition at line 195 of file rrt.c. References TRRTStatistics::dQrand, TRRTStatistics::n, TRRTStatistics::nBranch, TRRTStatistics::nCollision, TRRTStatistics::nCollisionChecks, TRRTStatistics::nConvergenceError, TRRTStatistics::nDistanceIncreases, TRRTStatistics::nHighCost, TRRTStatistics::nNoEmptyBranch, TRRTStatistics::nNoEmptyTreeConnection, TRRTStatistics::nOutOfDomain, TRRTStatistics::nQrandReached, TRRTStatistics::nRandom, TRRTStatistics::nRejections, TRRTStatistics::nSample, TRRTStatistics::nStalled, TRRTStatistics::nStep, TRRTStatistics::nTooFar, and TRRTStatistics::nTreeConnection. Referenced by BiRRTstar(), cBiRRT(), ccRRT(), ccTRRT(), main(), and RRTstar().
Accumulates two sets of RRT statistics. This is used to accumulate statistics when executing a long sequence of experiments.
Definition at line 318 of file rrt.c. References TRRTStatistics::dQrand, TRRTStatistics::n, TRRTStatistics::nBranch, TRRTStatistics::nCollision, TRRTStatistics::nCollisionChecks, TRRTStatistics::nDistanceIncreases, TRRTStatistics::nNoEmptyBranch, TRRTStatistics::nNoEmptyTreeConnection, TRRTStatistics::nOutOfDomain, TRRTStatistics::nQrandReached, TRRTStatistics::nRandom, TRRTStatistics::nRejections, TRRTStatistics::nSample, TRRTStatistics::nStalled, TRRTStatistics::nStep, TRRTStatistics::nTooFar, and TRRTStatistics::nTreeConnection. Referenced by BiRRTstar(), cBiRRT(), ccRRT(), ccTRRT(), and RRTstar().
Prints a report about the collected RRT statistics.
Definition at line 352 of file rrt.c. References TRRTStatistics::dQrand, DynamicDomainRRT(), GetDynamicDomainRadius(), INF, TRRTStatistics::n, TRRTStatistics::nBranch, TRRTStatistics::nCollision, TRRTStatistics::nCollisionChecks, TRRTStatistics::nConvergenceError, TRRTStatistics::nDistanceIncreases, TRRTStatistics::nHighCost, TRRTStatistics::nNoEmptyBranch, TRRTStatistics::nNoEmptyTreeConnection, TRRTStatistics::nOutOfDomain, TRRTStatistics::nQrandReached, TRRTStatistics::nRandom, TRRTStatistics::nRejections, Trrt::ns, TRRTStatistics::nSample, TRRTStatistics::nStalled, TRRTStatistics::nStep, TRRTStatistics::nTooFar, and TRRTStatistics::nTreeConnection. Referenced by BiRRTstar(), cBiRRT(), ccRRT(), ccTRRT(), main(), and RRTstar().
As a single branch to the RRT with the purpose of reaching a given sample. The branch might include many samples if many small steps are performed toward de targed. The extension proceeds as far as there is no collision, and the distance to the targed sample decreases. During the generation of the branch we check if the global goal is reached.
Definition at line 847 of file rrt.c. References AccumulateVector(), AddNodeToRRT(), AdjustDynamicDomain(), Trrt::ambient, CS_WD_IN_COLLISION, CS_WD_NEWTON_IN_SIMP, CS_WD_SIMP_INEQUALITIES_HOLD, CT_EPSILON, Trrt::dd, Trrt::delta, DifferenceVectorTopology(), DistanceTopology(), DIVERGED, FALSE, GetParameter(), Trrt::m, Trrt::n, NEW, NewRRTCollision(), NewRRTCollisionCheck(), NewRRTConvergenceError(), NewRRTDistanceIncreases(), NewRRTHighCost(), NewRRTOutOfDomain(), NewRRTQrandReached(), NewRRTStalled(), NewRRTTooFar(), Norm(), PointInBoxTopology(), TRRTSampleInfo::samples, ScaleVector(), Trrt::si, SumVectorScale(), Trrt::tp, TransitionTestRRT(), TRUE, and Trrt::w.
Reconstruct the path from the tree root to the sample in the tree closer to the goal. This is typically used to get the targed is reached.
Definition at line 1076 of file rrt.c. References DeleteVector(), ReverseSamples(), RRTPathSteps(), and Steps2PathinRRT(). Referenced by PathStart2GoalInRRT(), and RRTstar().
Defines a path (a collection of close enough samples) from a set of steps defined as nodes in a RRT.
Definition at line 1093 of file rrt.c. References AddSample2Samples(), Trrt::ambient, ConnectSamples(), TRRTSampleInfo::cost, CS_WD_GET_SYSTEM_VARS, CS_WD_REGENERATE_ORIGINAL_POINT, CT_EPSILON, DeleteSamples(), FALSE, GetParameter(), GetVectorElement(), TRRTStep::id, INF, InitSamples(), Trrt::m, Trrt::n, TRRTSampleInfo::samples, Trrt::si, Trrt::tp, VectorSize(), Trrt::w, and Warning(). Referenced by BiRRTstar(), and ReconstructRRTPath().
Computes the length of the
Definition at line 1181 of file rrt.c. References DistanceTopology(), Trrt::m, NO_UINT, TRRTSampleInfo::parent, TRRTSampleInfo::samples, Trrt::si, and Trrt::tp.
Extends a RRT adding a node from q_near to q_rand. This implements a RRT-Extend strategy while AddBranchToRRT implements a RRT-Connect. Right now this is only used for the RRT* but it could be used for other types of RRT without any problem.
Definition at line 1970 of file rrt.c. References AddNodeToRRT(), AdjustDynamicDomain(), Trrt::ambient, ConnectSamples(), TRRTSampleInfo::cost, TRRTSampleInfo::costp, CT_EPSILON, Trrt::dd, DistanceTopology(), GetParameter(), INF, Trrt::m, Trrt::n, NEW, NO_UINT, TRRTSampleInfo::parent, TRRTSampleInfo::samples, Trrt::si, Trrt::tp, TRRTSampleInfo::tree, TRUE, and Trrt::w. Referenced by BiRRTstar(), and RRTstar().
Selects the best parent among all neighbouring nodes for a node just added to the tree.
Definition at line 2023 of file rrt.c. References AddEdgeToRRT(), AddElement2Heap(), Trrt::ambient, ConnectSamples(), TRRTSampleInfo::cost, TRRTSampleInfo::costp, CT_EPSILON, Error(), FALSE, GetParameter(), Trrt::graph, INF, Trrt::m, Trrt::mode, Trrt::n, NEW, NewDoublePair(), NewRRTBranch(), NewRRTNoEmptyBranch(), TRRTSampleInfo::parent, TRRTSampleInfo::samples, SetRRTCostAndParent(), Trrt::si, Trrt::tp, TRRTSampleInfo::tree, TRUE, TWO_TREES_WITH_SWAP, UpdateCostAndTree(), and Trrt::w. Referenced by BiRRTstar(), and RRTstar().
Uses the last added node to the RRT to try to reduce the cost of the neighbouring nodes.
Definition at line 2212 of file rrt.c. References Trrt::ambient, ChangeBiRRTSteps(), ConnectSamples(), TRRTSampleInfo::cost, TRRTSampleInfo::costp, CT_EPSILON, Error(), FALSE, GetParameter(), Trrt::graph, INF, Trrt::m, Trrt::mode, Trrt::n, TRRTSampleInfo::parent, TRRTSampleInfo::samples, SetRRTCostAndParent(), Trrt::si, Trrt::tp, TRRTSampleInfo::tree, TRUE, TWO_TREES_WITH_SWAP, UpdateCostAndTree(), and Trrt::w. Referenced by BiRRTstar(), and RRTstar().
Prints information about the RRT* iteration.
Definition at line 2294 of file rrt.c. References TRRTSampleInfo::cost, CostToRoot(), NO_UINT, Trrt::ns, RRT_VERBOSE, and Trrt::si. Referenced by RRTstar().
Prints information about the BiRRT* iteration.
Definition at line 2323 of file rrt.c. References INF, Trrt::ns, and RRT_VERBOSE. Referenced by BiRRTstar().
Copy constructor for RRTSteps.
Definition at line 750 of file rrt.c. Referenced by AtlasBiRRTstar(), BiRRTstar(), and RRTPathSteps().
Stores an edge between nodes 'i' and 'j' with cost 'c' This only has effect if the RRT is in graph mode.
Definition at line 781 of file rrt.c. References TRRTSampleInfo::cn, Error(), Trrt::graph, TRRTSampleInfo::m, MEM_DUP, MEM_EXPAND, TRRTSampleInfo::n, TRRTSampleInfo::nn, Trrt::ns, and Trrt::si. Referenced by AddNodeToRRT(), AtlasBiRRTstar(), BiRRTstar(), WireAtlasRRTstar(), and WireRRTstar().
transition Test for Transition RRT
Definition at line 806 of file rrt.c. References TRRTSampleInfo::cost, CT_COEF_TEMP, CT_EPSILON, CT_NFAIL_MAX, GetParameter(), Trrt::nFail, randomDouble(), Trrt::si, Trrt::temperature, and TRUE. Referenced by AddBranchToRRT(), New_NewTemptativeSample(), and NewTemptativeSample().
Defines a RRT with a single sample, the root.
Definition at line 1203 of file rrt.c. References Trrt::ambient, TRRTSampleInfo::cn, TRRTSampleInfo::cost, TRRTSampleInfo::costp, CS_WD_ERROR_IN_SIMP_EQUATIONS, CS_WD_GENERATE_SIMP_INITIAL_BOX, CS_WD_GENERATE_SIMPLIFIED_POINT, CS_WD_IN_COLLISION, CS_WD_INIT_CD, CS_WD_REGENERATE_SOLUTION_POINT, CS_WD_SIMP_INEQUALITIES_HOLD, CT_DELTA, CT_DYNAMIC_DOMAIN, CT_EPSILON, CT_N_DOF, CT_SAMPLING, Trrt::dd, TRRTSampleInfo::ddr, Trrt::delta, Error(), FALSE, TRRTSampleInfo::g, GetBoxInterval(), GetBoxNIntervals(), GetParameter(), GOAL2START, Trrt::graph, INIT_NUM_SAMPLES_RRT, Trrt::k, KDTREE_SAMPLING, LowerLimit(), TRRTSampleInfo::m, Trrt::m, Trrt::mode, Trrt::ms, TRRTSampleInfo::n, Trrt::n, Trrt::nCores, NEW, Trrt::nFail, TRRTSampleInfo::nn, NO_UINT, Trrt::ns, ONE_TREE, Trrt::parallel, TRRTSampleInfo::parent, PointInBoxTopology(), RRT_NN_TOPOLOGY, TRRTSampleInfo::samples, SetRRTTopology(), Trrt::si, START2GOAL, Trrt::temperature, TEMPERATURE_INIT, Trrt::tp, TRRTSampleInfo::tree, TRUE, TWO_TREES, UpperLimit(), and Trrt::w. Referenced by InitAtlasRRT(), and main().
Returns the current value for the temperature of the T-RRT.
Definition at line 1460 of file rrt.c. References Trrt::temperature. Referenced by AtlasTRRT(). Identifies RRTs where we store the whole set of neighnbours for each node. This is used in some variants of RRT* to accelerate the propagation of the path improvements.
Definition at line 1465 of file rrt.c. References Trrt::graph. Referenced by AtlasBiRRTstar(), AtlasRRTstar(), and WireAtlasRRTstar().
Generates a random sample to expand the RRT. The sample can be generated with different policies according to the mode (from the ambient space, or near the existing nodes) and the goal (if defined the goal is used as random sample 1 out of 100 times).
Definition at line 1470 of file rrt.c. References Trrt::ambient, BOTHTREES, KDTREE_SAMPLING, Trrt::m, Trrt::mode, NewRRTRandomSample(), ONE_TREE, randomDouble(), RandomPointInBox(), and START2GOAL. Referenced by AtlasRRTSample(), BiRRTstar(), cBiRRT(), ccRRT(), ccTRRT(), and RRTstar().
Checks if a given sample is valid to expand the RRT.
Definition at line 1509 of file rrt.c. References CS_WD_SIMP_INEQUALITIES_HOLD, Trrt::dd, DistanceTopology(), GetRRTNN(), HEURISTIC_RRT_STAR, InDynamicDomain(), INF, Trrt::m, NewRRTSampleRejection(), TRRTSampleInfo::samples, Trrt::si, Trrt::tp, TRUE, and Trrt::w. Referenced by BiRRTstar(), cBiRRT(), ccRRT(), ccTRRT(), and RRTstar().
Finds the sample in the tree that is closer (in the Euclidean distance) to the given point.
Definition at line 1546 of file rrt.c. References BOTHTREES, DistanceTopologyMin(), GOAL2START, INF, Trrt::m, Trrt::mode, NO_UINT, Trrt::ns, ONE_TREE, TRRTSampleInfo::samples, Trrt::si, SquaredDistanceTopology(), START2GOAL, Trrt::tp, TRRTSampleInfo::tree, TWO_TREES, and TWO_TREES_WITH_SWAP. Referenced by AddBranchToAtlasRRT(), AtlasBiRRTstar(), AtlasRRTValidateSample(), BiRRTstar(), cBiRRT(), New_AddBranchToAtlasRRT(), PathStart2GoalInRRT(), and RRTValidateSample().
Finds the set of samples inside a ball of radious 'r' centered at a given point.
Definition at line 1653 of file rrt.c. References BOTHTREES, DistanceTopologyMin(), GOAL2START, Trrt::m, MEM_DUP, Trrt::mode, NEW, Trrt::ns, ONE_TREE, TRRTSampleInfo::samples, Trrt::si, START2GOAL, Trrt::tp, TRRTSampleInfo::tree, TWO_TREES, and TWO_TREES_WITH_SWAP. Referenced by AtlasBiRRTstar(), AtlasRRTstar(), BiRRTstar(), and RRTstar().
Finds the sample in the given tree that is close to a given branch in another tree. The branch is defined by samples n1 and n2 where n1 is antecesor of n2.
Definition at line 1774 of file rrt.c. References BOTHTREES, DistanceTopologyMin(), Error(), FALSE, INF, Trrt::m, Trrt::mode, NO_UINT, Trrt::ns, ONE_TREE, TRRTSampleInfo::parent, TRRTSampleInfo::samples, Trrt::si, START2GOAL, Trrt::tp, TRRTSampleInfo::tree, and TWO_TREES_WITH_SWAP. Referenced by AtlasRRT().
A debug utility to add points to RRTs without checking for collisions nor moving slowly toward to q_rand. It just adds the point and links it to the parent (i_near)
Definition at line 1868 of file rrt.c. References AddEdgeToRRT(), ArrayPi2Pi(), BOTHTREES, TRRTSampleInfo::cn, TRRTSampleInfo::cost, TRRTSampleInfo::costp, CT_EPSILON, TRRTSampleInfo::ddr, DistanceTopology(), Error(), FALSE, TRRTSampleInfo::g, GetParameter(), Trrt::graph, INF, TRRTSampleInfo::m, Trrt::m, MEM_DUP, Trrt::mode, Trrt::ms, TRRTSampleInfo::n, NEW, NewRRTSample(), TRRTSampleInfo::nn, Trrt::ns, TRRTSampleInfo::parent, TRRTSampleInfo::samples, Trrt::si, START2GOAL, Trrt::tp, TRRTSampleInfo::tree, TWO_TREES, and TRRTSampleInfo::userInfo. Referenced by AddBranchToRRT(), AddSample2AtlasRRT(), AddStepToRRTstar(), and PathStart2GoalInRRT().
A version of ReWireRRTstar to be used when the RRT is in graph mode. This re-wire uses the neighbours and cost-to-neighbour stored in the RRT nodes and propagages the recursively propagates the updates to all the necessary nodes in the graph.
Definition at line 2144 of file rrt.c. References ChangeBiRRTSteps(), TRRTSampleInfo::cn, TRRTSampleInfo::cost, TRRTSampleInfo::costp, CT_EPSILON, DistanceTopology(), Error(), ExtractMinElement(), FirstInPair(), TRRTSampleInfo::g, GetHeapElement(), GetParameter(), Trrt::graph, HeapEmpty(), Trrt::m, Trrt::mode, TRRTSampleInfo::n, NewDoublePair(), TRRTSampleInfo::nn, NO_UINT, TRRTSampleInfo::parent, TRRTSampleInfo::samples, SetRRTCostAndParent(), Trrt::si, Trrt::tp, TRRTSampleInfo::tree, TWO_TREES_WITH_SWAP, UpdateCostAndTree(), and UpdateHeapElement(). Referenced by AtlasBiRRTstar(), AtlasRRTstar(), BiRRTstar(), and RRTstar().
Tries to determine an optimal path to the goal using the RRT* method by S. Karaman and E. Frazzoli "Sampling-based algorithms for optimal motion planning" International Journal of Robotics Research, 2011 but adapted to operate on manifolds. In this case the connections of the connection between points on the manifold is done using the method by Berenson, D., Srinivasa, S., and Kuffner, J. (2011). Task space regions: A framework for pose-constrained manipulation planning. International Journal of Robotics Research. doi 10.1177/0278364910396389. Note that in this case the RRT construction is not stopped when the goal is reached but continues refining the path for the maximum time allowed for the tree construction. If constant GAMMA is 0 this procedure only finds the first path to the goal and then stops (to attempt to improve the path is done).
Definition at line 2351 of file rrt.c. References AccumulateRRTStatistics(), AddStepToRRTstar(), Trrt::ambient, BiRRTstar(), CopyDoublePair(), TRRTSampleInfo::cost, CS_WD_ERROR_IN_SIMP_EQUATIONS, CS_WD_GENERATE_SIMPLIFIED_POINT, CS_WD_ORIGINAL_IN_COLLISION, CS_WD_REGENERATE_SOLUTION_POINT, CS_WD_SIMP_INEQUALITIES_HOLD, CT_EPSILON, CT_GAMMA, CT_MAX_PLANNING_ITERATIONS, CT_MAX_PLANNING_TIME, CT_SAMPLING, DeleteDoublePair(), DeleteHeap(), DeleteRRTStatistics(), DeleteStatistics(), Trrt::delta, DistanceTopology(), Error(), EXPLORATION_RRT, FALSE, GetElapsedTime(), GetParameter(), GetRRTNNInBall(), Trrt::graph, HEURISTIC_RRT_STAR, INF, InitHeap(), InitRRTStatistics(), InitStatistics(), Trrt::k, LessThanDoublePair(), Trrt::m, Trrt::mode, Trrt::ms, Trrt::n, Trrt::nCores, NEW, NewRRTSample(), NO_UINT, Trrt::ns, ONE_TREE, PointInBoxTopology(), PrintRRTStatistics(), ReconstructRRTPath(), RecursiveReWireRRTstar(), ReWireRRTstar(), RRTSample(), RRTstarCloseIteration(), RRTValidateSample(), TRRTSampleInfo::samples, Trrt::si, START2GOAL, Trrt::tp, TRUE, UpdateCostAndTree(), Trrt::w, and WireRRTstar(). Referenced by BiRRTstar(), and main().
This is the same as RRTstar but implements a bi-directional search.
Definition at line 2583 of file rrt.c. References AccumulateRRTStatistics(), AddEdgeToRRT(), AddStepToRRTstar(), Trrt::ambient, BiRRTstarCloseIteration(), BOTHTREES, ChangeBiRRTSteps(), ConnectSamples(), CopyDoublePair(), CopyRRTStep(), TRRTSampleInfo::cost, CT_GAMMA, CT_MAX_PLANNING_ITERATIONS, CT_MAX_PLANNING_TIME, CT_SAMPLING, DeleteDoublePair(), DeleteHeap(), DeleteRRTStatistics(), DeleteStatistics(), DeleteVector(), Trrt::delta, DistanceTopology(), Error(), EXPLORATION_RRT, FALSE, GetElapsedTime(), GetParameter(), GetRRTNN(), GetRRTNNInBall(), GOAL2START, Trrt::graph, HEURISTIC_RRT_STAR, INF, InitHeap(), InitRRTStatistics(), InitStatistics(), InitVector(), Trrt::k, LessThanDoublePair(), Trrt::m, Trrt::mode, Trrt::ms, Trrt::n, Trrt::nCores, NEW, NewRRTSample(), NO_UINT, Trrt::ns, ONE_TREE, PrintRRTStatistics(), RecursiveReWireRRTstar(), ReWireRRTstar(), RRTSample(), RRTstar(), RRTValidateSample(), TRRTSampleInfo::samples, Trrt::si, START2GOAL, Steps2PathinRRT(), Trrt::tp, TRRTSampleInfo::tree, TRUE, TWO_TREES_WITH_SWAP, UpdateBiRRTSteps(), Trrt::w, and WireRRTstar(). Referenced by RRTstar().
Adds as many branches as necessary to the RRT (using AddBranchToRRT) until a targed configuration is reached (approached at a small distance). The difference with respect ccRRT is that here we take into account a cost function using the strategy proposed in L. Jaillet, J. Cortes, T. Simeon, Sampling-based path planning on configuration-space costmaps IEEE Transactions on Robotics, Vol. 26(4), pp. 635 - 646, 2010. http://ieeexplore.ieee.org/xpls/abs_all.jsp?arnumber=5477164
Definition at line 2822 of file rrt.c. References AccumulateRRTStatistics(), AddBranchToRRT(), Trrt::ambient, TRRTSampleInfo::cost, CS_WD_ERROR_IN_SIMP_EQUATIONS, CS_WD_GENERATE_SIMPLIFIED_POINT, CS_WD_ORIGINAL_IN_COLLISION, CS_WD_REGENERATE_SOLUTION_POINT, CS_WD_SIMP_INEQUALITIES_HOLD, CT_EPSILON, CT_MAX_NODES_RRT, CT_MAX_PLANNING_TIME, CT_SAMPLING, DeleteRRTStatistics(), DeleteStatistics(), DistanceTopology(), Error(), EXPLORATION_RRT, FALSE, GetElapsedTime(), GetParameter(), GetRRTNode(), INF, InitRRTStatistics(), InitStatistics(), Trrt::m, Trrt::mode, Trrt::n, Trrt::nCores, NEW, NewRRTBranch(), NewRRTDistanceQrand(), NewRRTNoEmptyBranch(), NewRRTSample(), NO_UINT, Trrt::ns, ONE_TREE, PathStart2GoalInRRT(), PointInBoxTopology(), PrintRRTStatistics(), RRT_VERBOSE, RRTSample(), RRTValidateSample(), TRRTSampleInfo::samples, Trrt::si, START2GOAL, Trrt::tp, TRUE, Trrt::w, and Warning(). Referenced by main().
Adds as many branches as necessary to the RRT (using AddBranchToRRT) until a targed configuration is reached (approached at a small distance). The tree extension is performed using the strategy defined in Dalibard, S., Nakhaei, A., Lamiraux, F., and Laumond, J.-P. (2009). Whole-body task planning for a humanoid robot: a way to integrate collision avoidance. In IEEE-RAS International Conference on Humanoid Robots, pages 355-360.
Definition at line 2965 of file rrt.c. References AccumulateRRTStatistics(), AddBranchToRRT(), Trrt::ambient, CS_WD_ERROR_IN_SIMP_EQUATIONS, CS_WD_GENERATE_SIMPLIFIED_POINT, CS_WD_ORIGINAL_IN_COLLISION, CS_WD_REGENERATE_SOLUTION_POINT, CS_WD_SIMP_INEQUALITIES_HOLD, CT_EPSILON, CT_MAX_NODES_RRT, CT_MAX_PLANNING_TIME, CT_SAMPLING, DeleteRRTStatistics(), DeleteStatistics(), DistanceTopology(), Error(), EXPLORATION_RRT, FALSE, GetElapsedTime(), GetParameter(), INF, InitRRTStatistics(), InitStatistics(), Trrt::m, Trrt::mode, Trrt::n, Trrt::nCores, NEW, NewRRTBranch(), NewRRTDistanceQrand(), NewRRTNoEmptyBranch(), NewRRTSample(), NO_UINT, Trrt::ns, ONE_TREE, PathStart2GoalInRRT(), PointInBoxTopology(), PrintRRTStatistics(), RRT_VERBOSE, RRTSample(), RRTValidateSample(), TRRTSampleInfo::samples, Trrt::si, START2GOAL, Trrt::tp, TRUE, Trrt::w, and Warning(). Referenced by main().
Adds as many branches as necessary to the RRT (using AddBranchToRRT) until a targed configuration is reached (approached at a small distance). The tree extension is performed using the strategy defined in Berenson, D., Srinivasa, S., and Kuffner, J. (2011). Task space regions: A framework for pose-constrained manipulation planning. International Journal of Robotics Research. doi 10.1177/0278364910396389.
Definition at line 3098 of file rrt.c. References AccumulateRRTStatistics(), AddBranchToRRT(), Trrt::ambient, CS_WD_ERROR_IN_SIMP_EQUATIONS, CS_WD_GENERATE_SIMPLIFIED_POINT, CS_WD_ORIGINAL_IN_COLLISION, CS_WD_REGENERATE_SOLUTION_POINT, CS_WD_SIMP_INEQUALITIES_HOLD, CT_EPSILON, CT_MAX_PLANNING_TIME, CT_SAMPLING, DeleteRRTStatistics(), DeleteStatistics(), DistanceTopology(), Error(), FALSE, GetElapsedTime(), GetParameter(), GetRRTNN(), GOAL2START, INF, InitRRTStatistics(), InitStatistics(), Trrt::m, Trrt::mode, Trrt::n, Trrt::nCores, NEW, NewRRTBranch(), NewRRTDistanceQrand(), NewRRTNoEmptyBranch(), NewRRTNoEmptyTreeConnection(), NewRRTSample(), NewRRTTreeConnection(), Trrt::ns, PathStart2GoalInRRT(), PointInBoxTopology(), PrintRRTStatistics(), RRT_VERBOSE, RRTSample(), RRTValidateSample(), TRRTSampleInfo::samples, Trrt::si, START2GOAL, Trrt::tp, TRUE, TWO_TREES, Trrt::w, and Warning(). Referenced by main(). Produces a vector with the nodes connecting a given node with the root of the RRT. The vector is created inside this function but must be destroyed externally.
Definition at line 3276 of file rrt.c. References CopyRRTStep(), TRRTStep::cost, TRRTSampleInfo::costp, TRRTStep::id, InitVector(), NewVectorElement(), NO_UINT, TRRTSampleInfo::parent, and Trrt::si. Referenced by ChangeBiRRTSteps(), and ReconstructRRTPath().
Replaces a given path by another passing by two nodes in the two trees of a bidirectional RRT. Note that in this case the path is just a list of nodes to be visited in order. The actual path between them is not computed, but will be computed at the end of the planning (this saves time during planning).
Definition at line 3297 of file rrt.c. References ConcatVectors(), TRRTStep::cost, DeleteVector(), GetVectorElement(), TRRTStep::id, NewVectorElement(), ResetVector(), RRTPathSteps(), Trrt::si, START2GOAL, TRRTSampleInfo::tree, and VectorSize(). Referenced by AtlasBiRRTstar(), BiRRTstar(), RecursiveReWireRRTstar(), ReWireAtlasRRTstar(), ReWireRRTstar(), and UpdateBiRRTSteps(). Tries to incorporate the recent changes in the trees to the optimal path. The optimal paths in a BiRRT are defined from two nodes, each one in a different tree. This path is represented by a list of nodes. However, the optimal path can be improved taking into accont the wires and rewires in the trees. This functions takes the list of nodes that define the optimal path and incorporates the shortcuts discobered in the tree since the path was defined.
Definition at line 3356 of file rrt.c. References ChangeBiRRTSteps(), TRRTStep::cost, TRRTSampleInfo::cost, Error(), GetVectorElement(), TRRTStep::id, INF, NO_UINT, Trrt::si, TRRTSampleInfo::tree, UpdateCostAndTree(), and VectorSize(). Referenced by AtlasBiRRTstar(), and BiRRTstar().
Determines the path from start to goal using an RRT, if one exists.
Definition at line 3401 of file rrt.c. References AddNodeToRRT(), DeleteSamples(), Trrt::delta, DistanceTopology(), GetRRTNN(), Trrt::m, Trrt::mode, Trrt::ns, ONE_TREE, ReconstructRRTPath(), ReverseConcatSamples(), TRRTSampleInfo::samples, Trrt::si, START2GOAL, Trrt::tp, TRRTSampleInfo::tree, and TRUE. Referenced by AtlasRRT(), AtlasTRRT(), cBiRRT(), ccRRT(), and ccTRRT(). Identifies bidirectional RRTs.
Definition at line 3462 of file rrt.c. References Trrt::mode, and ONE_TREE.
Identifies mode of the RRTs.
Definition at line 3468 of file rrt.c. References Trrt::mode. Referenced by ReWireAtlasRRTstar(), and WireAtlasRRTstar(). Checks if a sample is in the dynamic domaiin of a given node. Random samples out of the dynamic domain should be rejected.
Definition at line 3473 of file rrt.c. References Trrt::dd, TRRTSampleInfo::ddr, DistanceTopology(), Trrt::m, TRRTSampleInfo::samples, Trrt::si, Trrt::tp, and TRUE. Referenced by AtlasRRTValidateSample(), and RRTValidateSample(). If the dynamic domain technique is used, and a problem is detected when extending a branch from a given node, we set the dynamic domain for this node so that new random samples outside the dynamic domain are rejected.
Definition at line 3481 of file rrt.c. References Trrt::dd, TRRTSampleInfo::ddr, MOV_AVG_DOWN, MOV_AVG_UP, and Trrt::si. Referenced by AddBranchToAtlasRRT(), AddBranchToRRT(), AddStepToRRTstar(), and New_AddBranchToAtlasRRT().
Return the dynamic domain radious for a given sample. If the dynamic domain technique is not active or the radiius for the sample has not been set yet, this function returns 0.
Definition at line 3513 of file rrt.c. References Trrt::dd, TRRTSampleInfo::ddr, and Trrt::si. Referenced by PrintAtlasRRTStatistics(), and PrintRRTStatistics(). TRUE if the dynamic domain technique is used. Using this technique the random sample are rejected if they are no in the dynamic domain of the nearest-neighbour sample.
Definition at line 3521 of file rrt.c. References Trrt::dd. Referenced by PrintAtlasRRTStatistics(), and PrintRRTStatistics().
Returns the number of nodes (samples) in the RRT.
Definition at line 3526 of file rrt.c. References Trrt::ns. Referenced by InitAtlasRRT(), and main().
Returns a pointer to the sample in the RRT with the given identifier.
Definition at line 3531 of file rrt.c. References Trrt::ns, TRRTSampleInfo::samples, and Trrt::si. Referenced by AddSample2AtlasRRT(), AtlasTRRT(), ccTRRT(), InitAtlasRRT(), and LoadAtlasRRTSampleInfo().
In bidirectional RRTs, identifies the tree including a given node.
Definition at line 3539 of file rrt.c. References Trrt::mode, NO_UINT, Trrt::ns, ONE_TREE, Trrt::si, START2GOAL, and TRRTSampleInfo::tree. Referenced by AddBranchToAtlasRRT(), AtlasBiRRTstar(), GetRRTNNInChart(), InitBranchStatus(), PlotAtlasRRT(), PopulateWithSamples(), ReWireAtlasRRTstar(), and WireAtlasRRTstar().
Returns the identifier of the parent for a given RRT node.
Definition at line 3552 of file rrt.c. References NO_UINT, Trrt::ns, TRRTSampleInfo::parent, and Trrt::si. Referenced by AddStepToAtlasRRTstar(), PlotAtlasRRT(), ReconstructAtlasRRTPath(), ReWireAtlasRRTstar(), SmoothPathInAtlasRRT(), and WireAtlasRRTstar().
Changes the parent for a given node in the RRT. By changing the parent we also change the tree of the node to that of its new parent.
Definition at line 3560 of file rrt.c. References Error(), Trrt::mode, NO_UINT, Trrt::ns, TRRTSampleInfo::parent, Trrt::si, TRRTSampleInfo::tree, and TWO_TREES_WITH_SWAP. Referenced by SmoothPathInAtlasRRT().
Returns the user info associated with a node.
Definition at line 3577 of file rrt.c. References Trrt::si, and TRRTSampleInfo::userInfo.
Changes the user info associated with a node.
Definition at line 3585 of file rrt.c. References Error(), Trrt::si, and TRRTSampleInfo::userInfo.
Returns the cost associated with a node.
Definition at line 3593 of file rrt.c. References TRRTSampleInfo::cost, and Trrt::si. Referenced by AddStepToAtlasRRTstar(), AtlasBiRRTstar(), AtlasRRTstar(), AtlasRRTstarCloseIteration(), ReWireAtlasRRTstar(), SmoothPathInAtlasRRT(), Steps2PathinAtlasRRT(), and WireAtlasRRTstar().
Returns the cost from the parent node.
Definition at line 3601 of file rrt.c. References TRRTSampleInfo::costp, and Trrt::si. Referenced by ReWireAtlasRRTstar(), and WireAtlasRRTstar().
Changes the cost associated with a node.
Definition at line 3609 of file rrt.c. References TRRTSampleInfo::cost, TRRTSampleInfo::costp, Error(), and Trrt::si. Referenced by AddStepToAtlasRRTstar(), AtlasTRRT(), and SmoothPathInAtlasRRT().
Changes the cost and the parent associated with a node.
Definition at line 3620 of file rrt.c. References TRRTSampleInfo::cost, TRRTSampleInfo::costp, Error(), Trrt::mode, TRRTSampleInfo::parent, Trrt::si, TRRTSampleInfo::tree, and TWO_TREES_WITH_SWAP. Referenced by RecursiveReWireRRTstar(), ReWireAtlasRRTstar(), ReWireRRTstar(), WireAtlasRRTstar(), and WireRRTstar().
Gives access to the topology for each variable stored in the RRT
Definition at line 3638 of file rrt.c. References Trrt::tp. Referenced by InitAtlasRRT(), and LoadAtlasRRT().
Computes the cost from a node to the root by adding the individual cost of the node-parent relations. During re-wires the cost of a node can change without being reflected in the cost associated with this node due to changes in the branch including the node that are not yet propagated. This function computes the true cost with full propagation given the current tree.
Definition at line 3643 of file rrt.c. References TRRTSampleInfo::costp, NO_UINT, TRRTSampleInfo::parent, and Trrt::si. Referenced by AtlasRRTstarCloseIteration(), RRTstarCloseIteration(), and UpdateCostToRoot().
Updates the cost from a node to the root by adding the individual cost of the node-parent relations.
Definition at line 3658 of file rrt.c. References TRRTSampleInfo::cost, CostToRoot(), and Trrt::si.
Checks the tree including the current node and assigns it to this tree. During re-wires the actual tree of a node can change due to changes along the branch including this tree that are not propagated to it. This functions makes sure there is no inconsistency at least for the selected node.
Definition at line 3663 of file rrt.c. References Error(), GOAL2START, Trrt::mode, NO_UINT, TRRTSampleInfo::parent, Trrt::si, START2GOAL, TRRTSampleInfo::tree, and TWO_TREES_WITH_SWAP. Referenced by PlotRRT().
A combination of UpdateCostToRoot and UpdateTree defined to gain some efficiency.
Definition at line 3692 of file rrt.c. References TRRTSampleInfo::cost, TRRTSampleInfo::costp, GOAL2START, NO_UINT, TRRTSampleInfo::parent, Trrt::si, START2GOAL, and TRRTSampleInfo::tree. Referenced by AtlasRRTstar(), RecursiveReWireRRTstar(), ReWireAtlasRRTstar(), ReWireRRTstar(), RRTstar(), UpdateBiRRTSteps(), WireAtlasRRTstar(), and WireRRTstar().
Computes the number of steps from a node to the root.
Definition at line 3719 of file rrt.c. References NO_UINT, TRRTSampleInfo::parent, and Trrt::si. Referenced by SmoothPathInAtlasRRT().
Plots a 3d projection of a RRT defined on a manifold. Although the ambient 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 3734 of file rrt.c. References Close3dObject(), ClosePlot3d(), CS_WD_REGENERATE_ORIGINAL_POINT, CT_CUT_X, CT_CUT_Y, CT_CUT_Z, DeleteColor(), FALSE, GetParameter(), GOAL2START, InitPlot3d(), M_2PI, Trrt::mode, NEW, NewColor(), Trrt::ns, ONE_TREE, TRRTSampleInfo::parent, PlotVect3d(), TRRTSampleInfo::samples, Trrt::si, START2GOAL, StartNew3dObject(), TRRTSampleInfo::tree, TWO_TREES_WITH_SWAP, UpdateTree(), and Trrt::w. Referenced by main(), and PlotAtlasRRT().
Stores the nodes of the RRT in the form of boxes.
Definition at line 3883 of file rrt.c. References CreateFileName(), CS_WD_GET_SYSTEM_VARS, CS_WD_REGENERATE_ORIGINAL_POINT, DeleteFileName(), Error(), GetFileFullName(), Trrt::ns, TRRTSampleInfo::samples, Trrt::si, SOL_EXT, SOL_WITH_DUMMIES_EXT, and Trrt::w. Referenced by main().
Stores the cost associated with the nodes of the RRT. This is typically used when dealing with molecules. In this case the cost is the energy.
Definition at line 3934 of file rrt.c. References TRRTSampleInfo::cost, COST_EXT, CreateFileName(), DeleteFileName(), Error(), GetFileFullName(), INF, Trrt::ns, and Trrt::si. Referenced by main().
Returns the approximated memory used (in bytes) by a given RRT.
Definition at line 3973 of file rrt.c. References Trrt::graph, Trrt::m, TRRTSampleInfo::nn, Trrt::ns, and Trrt::si. Referenced by AtlasRRTMemSize(), and main(). Stores all the information in the RRT in a file.
Definition at line 3990 of file rrt.c. References TRRTSampleInfo::cn, TRRTSampleInfo::cost, TRRTSampleInfo::costp, Trrt::dd, TRRTSampleInfo::ddr, Trrt::delta, Error(), TRRTSampleInfo::g, GetFileFullName(), Trrt::graph, Trrt::k, TRRTSampleInfo::m, Trrt::m, Trrt::mode, Trrt::ms, TRRTSampleInfo::n, Trrt::n, Trrt::nFail, TRRTSampleInfo::nn, Trrt::ns, TRRTSampleInfo::parent, TRRTSampleInfo::samples, Trrt::si, Trrt::temperature, and TRRTSampleInfo::tree. Referenced by main(), and SaveAtlasRRT().
Construct a RRT from the information previously stored in a file by SaveRRT. The user information stored in the node (see GetRRTNodeInfo and SetRRTNodeInfo) is lost when storing the RRT in a file. Right now we never store user info in the RRT nodes and, thus this limitation has no effect.
Definition at line 4041 of file rrt.c. References Trrt::ambient, TRRTSampleInfo::cn, TRRTSampleInfo::cost, TRRTSampleInfo::costp, CS_WD_GENERATE_SIMP_INITIAL_BOX, Trrt::dd, TRRTSampleInfo::ddr, Trrt::delta, Error(), FALSE, TRRTSampleInfo::g, GetBoxInterval(), GetBoxNIntervals(), GetFileFullName(), Trrt::graph, Trrt::k, LowerLimit(), TRRTSampleInfo::m, Trrt::m, Trrt::mode, Trrt::ms, TRRTSampleInfo::n, Trrt::n, Trrt::nCores, NEW, Trrt::nFail, TRRTSampleInfo::nn, Trrt::ns, Trrt::parallel, TRRTSampleInfo::parent, RRT_NN_TOPOLOGY, TRRTSampleInfo::samples, SetRRTTopology(), Trrt::si, START2GOAL, Trrt::temperature, Trrt::tp, TRRTSampleInfo::tree, TWO_TREES, UpperLimit(), TRRTSampleInfo::userInfo, and Trrt::w. Referenced by LoadAtlasRRT(), and main().
Deletes the information stored in the RRT.
Definition at line 4201 of file rrt.c. References Trrt::ambient, TRRTSampleInfo::cn, DeleteBox(), Trrt::graph, Trrt::mode, TRRTSampleInfo::n, Trrt::ns, TRRTSampleInfo::samples, Trrt::si, Trrt::tp, and TWO_TREES. Referenced by DeleteAtlasRRT(), and main(). |
Follow us!