ADOPT-CHILDREN (NEW-PARENT OLD-PARENT)
HELPER FUINCTION: removes the children of old-parent and the new-parent takes all of them.
CONNECT (PARENT CHILD)
connect two nodes as a parent and a child.
DISCONNECT (PARENT CHILD)
disconnect a parent and its child. signals CHILD-NOT-FOUND < SIMPLE-CONDITION.
MAP-RRT-TREE-CONTENT-RECURSIVELY (NODE FN)
Map over the contents of RRT-TREE-NODEs of the tree and return each result in a nested tree with the same structure as the original random-tree.
MAP-RRT-TREE-NODE-RECURSIVELY (NODE FN)
Map over the RRT-TREE-NODEs of the tree and return the results in a nested cons tree with the same structure as that of the original random-tree.
MAPC-RRT-TREE-CONTENT-RECURSIVELY (NODE FN)
Mapc over the contents of RRT-TREE-NODEs ofthe tree and returns nil. Only for the side effect.
MAPC-RRT-TREE-NODE-RECURSIVELY (NODE FN)
Mapc over the RRT-TREE-NODEs of the tree and returns nil. Only for the side effect.
HELPER FUNCTION: disconnect all children from the specified parent
TREE -> TREE Destructively modifies and return an RRT-TREE. If the `tree' has a finish node, it finds a path from the root to the end and then replace the root with the next node in that path. Otherwise it choose one child of the root at random and replace the root with it. In both cases the new root is orphanized.
HELPER FUNCTION: ensure a node doesn't have a parent
TREE -> (list (node V)) Returns a list of C-space points of the computed paths from the root to the end. Returns nil if the path was not found. The list contains the root of the tree.
TREE -> (list V) Returns the nodes of the computed path in a list, from the root to the end. Returns nil if the path was not found. The list contains the root of the tree.
Identical to =(make-instance 'rrt-tree-node :content content)=
RRT-SEARCH (RANDOM-GENERATOR NEW-V-GENERATOR EDGE-PROHIBITED-P FINISH-P &KEY START-V TREE (TREE-CLASS 'RRT-TREE-TREE) (MAX-NODES 15) (MAX-ITERATION 30) RUN-ON-NODE)
RRT-search function. let V as a type variable. + V :: a vector class which represents the point in C-space. (configuration-space-distance V V) should return a number. + (node V) :: an rrt-tree-node instance whose `content' slot is V. non-holonomic parameters like velocity and acceralation should be stored within (node V), not in V. `rrt-search' returns the result tree as its primary value. The secondaly value is the total number of the nodes, and third value is the number of iteration done in the search. the arguments should be of types as listed in the following : + start-v : V + random-generator: (no args) -> V + new-v-generator: V, V -> V ; nearest, random -> actual + edge-prohibited-p: V, V -> bool ; nearest, new -> result + finish-p: V -> bool ; new -> result + run-on-node: V, V -> t ; nearest, new ->
%NEAREST-NODE-LIST (TARGET-CONTENT LST)
CONFIGURATION-SPACE-DISTANCE (POINT1 POINT2)
V, V -> NUMBER This generic function should provide a method to measure the distance between two points in C-space (configuration space).
TREE -> FIXNUM This generic function should provide a method to count the number of leafs.
INSERT (CONTENT TREE)
V, TREE -> TREE This generic function is allowed provide an additional procedure during the insertion of a `content' to the `tree'. The code in this method does something other than the linking of the parent and child nodes, and optimizes nearest-search. For example, if you want to use B-tree for the nearest search, here you can add codes for inserting a content into a B-tree. Always returns `tree' as a result of :around method of rrt-tree-mixin.
TREE -> (list (node V)) This generic function should provide a method to accumulate all leafs into a list. A leaf is a node with no children.
NEAREST-NODE (TARGET TREE)
V, tree -> (node V), NUMBER, V This generic function should implement a method which finds the nearest node in a `tree' to the `target'. It returns multiple-values. 1. The first return value should be the nearest node. 2. The second value should be the distance between the target and the nearest node. 3. The third value should be the content of the node.
SETFFINISH-NODE (NEW-VALUE OBJECT)
SETFCHILDREN (NEW-VALUE OBJECT)
SETFCONTENT (NEW-VALUE OBJECT)
SETFNODES (NEW-VALUE OBJECT)
SETFPARENT (NEW-VALUE OBJECT)
SETFROOT (NEW-VALUE OBJECT)
an rrt-tree implementation which uses a simple linear search method for nearest-search.
The abstract interface mixin class of rrt-tree. User do not create an instance of it, but rather inherit it. It has three slots and accessors with the same names: + root : the root node of the tree. of type rrt-tree-node. + finish : a slot which contains the last node of the computed path. It is bound to nil, it means the previous search has failed to find a path which satisfies the goal condition.
Node class of Random Tree.
an rrt-tree implementation which seaches from the root in nearest-search.