Manuscript Offprint
arXiv:2611.05885Does RRT* Work on Uneven Terrain Meshes?
Ototong Jerome and Tiago Nascimento
Abstract—The optimal rapidly exploring random tree (RRT*) is proven asymptotically optimal on open subsets of Euclidean space with straight-line local planning. We ask whether it works on a triangle-mesh terrain, a two-dimensional surface in . First, the original RRT* cannot run on a mesh: the surface has zero volume, so uniform sampling never hits it, no clearance ball fits in it, and chords across a fold leave it. Second, the surface reformulation we call Mesh RRT*, with its naive edge, the chord costed by its length, solved every run on heightfields with slopes up to but minimises the wrong objective: its cost, the straight-line length of a polyline whose vertices lie on the surface while its segments may leave it by a tolerance , is the length of no route on the surface and lies strictly below the geodesic length on any curved mesh. In numeric simulation and after 30 000 iterations the reported cost is on average up to 2.7% below the exact geodesic, a cost no path attains, and the returned route on average 0.1–0.5% longer than it. Rewiring keeps the biased edges, the bias decays only linearly with the step on polyhedral surfaces, and shrinking trades bias for connectivity. Third, replacing each chord by a path on the surface above it, built from projected points joined across the mesh edges they straddle and costed by its own length, makes every edge cost the exact length of a feasible path; with no other change the exact length of the returned routes is on average within 0.07–0.16% of the geodesic at every roughness tested, two to 3.4 times closer than with chords on the rougher terrains. The planner is in MeshNav3D 0.2.0 (release pending).
Index Terms—Motion and path planning, constrained motion planning, field robots.
I. INTRODUCTION
Ground robots on rough terrain and surface-bound aerial vehicles plan on a surface, usually a triangle mesh, and the natural cost is geodesic length. The established tools are graph planners on the mesh (Dijkstra, A*, Theta*) and geodesic solvers such as the exact Mitchell–Mount–Papadimitriou (MMP) algorithm [1], fast marching [2] and the heat method [3]. Sampling-based optimal planners, led by the optimal rapidly exploring random tree (RRT*) of Karaman and Frazzoli [4], are rarely applied here, and their guarantees are stated for Euclidean free space. This paper is about one of their primitives, LINE, the routine that connects two tree nodes and prices the connection.
Jaillet and Porta extended RRT* to implicitly defined configuration manifolds such as closed kinematic chains, with local charts built by higher-dimensional continuation, and argued asymptotic optimality on the manifold [5], [6]; here the manifold is an explicit triangle mesh whose faces are the charts and whose geodesics can be computed exactly. Mesh
geodesics are a mature field [1], [3], [7]; exact MMP is our ground truth. Sampling-based mesh planning has been used for ground robots with the basic rapidly exploring random tree (RRT), where the geodesic computations between tree nodes are a heavy load that the method reduces [8]; surface-bound aerial vehicles have instead been steered along the mesh by Riemannian motion policies on a planar parametrisation of it [9]. A* on the mesh graph and Theta* [10] serve as graph-planner reference points. We know of no prior work measuring sampling-based mesh planners against exact geodesics or identifying the cost inconsistency studied here.
This paper keeps two quantities apart. The length of a route is geometry: how far it runs along the mesh surface, measured here exactly with a geodesic solver. The cost of a route is what the planner computes, optimises and reports: the number its LINE primitive assigns to each edge, summed along the route. In Karaman and Frazzoli's setting the two coincide, because an edge is a straight segment inside the free space and its cost is its length. On a mesh they coincide only if the primitive makes them: a straight chord between two surface points is not a path on the surface, so its length is the length of no route, and a planner that charges it optimises and reports a cost below the surface length of the route it returns. Whether that happens on terrain meshes, by how much, and with what effect on the returned route is what we measure.
We test the hypothesis that RRT* does not work on uneven terrain meshes in its literal and in its practical form. Literally, RRT* is the algorithm and guarantees of [4], defined on an open subset of , , with volume, uniform sampling and straight-line local planning. Practically, it is the reformulation an implementation on a mesh could make once the literal algorithm is found not to run there (Section III): sample the surface, steer along it and, in the naive form, connect nodes by straight chords costed by Euclidean length.
Our contributions are:
-
A structural argument that literal RRT* cannot run on a mesh, because a surface has zero volume in (Section III).
-
Mesh RRT*, which follows Algorithm 6 of [4] primitive by primitive, with two implementations of LINE, naive (chords costed by their length) and consistent (surface paths costed by their own length), all else identical (Section IV).
-
The chord-polyline cost (Definition 1) that the chord variant optimises, with proofs that it never exceeds the surface length of the same route (Proposition 1) and that its optimum lies strictly below the geodesic length whenever the geodesic bends (Proposition 2), and why rewiring keeps the biased edges (Section V).
-
Experiments against exact geodesics on terrains of controlled roughness: a dense-graph estimate of the chord
The authors are with the Laboratório de Engenharia de Sistemas e Robótica, Universidade Federal da Paraíba (UFPB), João Pessoa 58055-000, Paraíba, Brazil (e-mail: o.jerome@laser.ci.ufpb.br; tiagopn@ci.ufpb.br).
This work has been submitted to the IEEE for possible publication. Copyright may be transferred without notice, after which this version may no longer be accessible. Code: MeshNav3D 0.2.0 (release pending).
optimum , the dependence of the bias on the step and the tolerance , and the convergence of both variants (Sections VI–VII).
- An implementation in MeshNav3D 0.2.0 [11] (release pending).
Algorithm 6 of [4] grows a tree from with five primitives per iteration: SAMPLEFREE draws uniformly in ; NEAREST returns the closest tree vertex; STEER moves at most a step toward the sample; NEAR returns the vertices within radius
where is the number of tree vertices and a constant constrained by (2) below; and is the straight segment between points , checked by COLLISIONFREE. The new vertex is attached to the vertex among NEAR and the nearest vertex that has a collision-free connection and minimises , where is the cost of the tree path from to a vertex , and each vertex in NEAR is rewired through when that lowers its cost.
Karaman and Frazzoli prove two guarantees under these definitions. Probabilistic completeness (Definition 14 of [4]) needs a robustly feasible problem: a solution path with strong -clearance, i.e. every point of it has a closed ball of radius ; otherwise the success probability is zero “unless the samples are drawn from a singular distribution adapted to the problem”. Asymptotic optimality (Theorem 38) needs a robustly optimal solution and
being the volume of the unit d-ball. Assumption 27 (the union of all optimal paths has measure zero) only excludes hitting the exact optimum in finitely many samples; it holds here, two points of a terrain mesh being joined by finitely many shortest paths, and plays no further role.
The proofs rely on Euclidean balls, on volume-uniform sampling, and on being the exact length of a feasible path in : properties of the ambient space that the algorithm's control flow never uses.
III. WHY THE ORIGINAL RRT CANNOT RUN ON A MESH
Let be a triangle-mesh terrain, (or a bounding box) the ambient space and . Each of the following then fails.
-
Zero measure. in , so uniform sampling in hits with probability zero. The completeness limit is zero, the case the authors exclude unless the sampler is “adapted to the problem”.
-
No clearance. No ball fits inside a surface, so no problem on is robustly feasible; Theorems 23 and 38 of [4] have no content.
-
Straight lines leave the surface. For almost every pair of points on different non-coplanar faces, and every pair in the interiors of adjacent non-coplanar faces, . With , SAMPLEFREE, by definition the subsequence of uniform ambient samples falling in [4, Sec. 3.1], is empty almost surely (item 1), so Algorithm 6 never produces a candidate vertex. Even with the ambient samples used directly, every steered point would be off almost surely (a sample within of the root is returned unchanged; a farther one lands on the sphere of radius about the root, which meets in a null set of directions) and COLLISIONFREE would reject every edge.
None of this depends on how uneven the terrain is. Any fold triggers item 3; only a perfectly flat mesh escapes, and on a flat mesh the algorithm is planar RRT , so the literal hypothesis holds for structural reasons.
An implementation on a mesh can instead reformulate the problem on the surface: , a 2-manifold with geodesic metric , area as the measure, , and , and the primitives have natural counterparts (Table I). Area-uniform sampling is the singular distribution the paper allows for; clearance balls become geodesic disks, which exist on a terrain without holes, so robust feasibility returns. Only LINE, the geodesic between two arbitrary surface points, lacks an exact cheap counterpart.
Everything marked “approximation” in Table I converges to the manifold primitive as the scale shrinks, since geodesic disks are Euclidean to first order. The LINE row does not: the step does not shrink with n, so neither does the gap between a chord and the geodesic it stands for.
IV. MESH RRT AND THE LINE PRIMITIVE
Mesh RRT follows Algorithm 6 of [4], changing how the primitives are realised on a triangle mesh and departing from the listing in three details: the nearest vertex is also a rewiring candidate; a new vertex is inserted whenever any candidate parent has a valid edge, not only when its edge from the nearest vertex is valid; and a steered point that coincides with an existing vertex (in practice the goal, at every goal-biased sample once the goal is in the tree) is not inserted again, that vertex's parent is re-chosen over its near set and the rewiring step is skipped for that sample. Closest-point queries use a static cell locator built once over the mesh.
Sampling: A face is drawn with probability proportional to its area and a point uniformly inside it by barycentric coordinates; with probability the goal itself is drawn.
Nearest and Near: Euclidean distance in , with radius and
TABLE I PRIMITIVES OF ALGORITHM 6 OF [4] AND THEIR MESH COUNTERPARTS.
| Primitive in [4] | On the manifold | Chord implementation | Faithful? |
|---|---|---|---|
| SAMPLEFREE (uniform in ) | uniform by area on | area-weighted face, uniform barycentric point | yes |
| NEAREST (Euclidean) | geodesic nearest | Euclidean nearest | approximation; on a heightfield with slope , |
| STEER (move along a line) | move along the geodesic | chord step, projected back onto , pulled back to | approximation; node lies on |
| NEAR (ball, radius ) | geodesic disk, radius | Euclidean ball , same radius law, | superset of the geodesic disk () |
| LINE and its cost | geodesic segment, length | straight chord, length | no: not on , and below |
| COLLISIONFREE | segment inside | chord within a tolerance of , optional slope limit | proxy for holes and forbidden faces |
| (open set) | a point, reached exactly | goal-biased sampling | standard practice |
| Parent choice, rewiring | Algorithm 6, lines 9–16 | identical, except that the nearest vertex is also a rewiring candidate and a coincident steered point re-chooses the existing vertex's parent instead of adding a duplicate; cost propagation to descendants | yes |
, above the bound (2). A Euclidean ball of radius contains the geodesic disk of radius , so the near set is never too small.
Steer: Move at most from the nearest vertex toward the sample and project onto . Since projection can stretch the chord, the point is pulled back along it and re-projected (up to six times); a point still beyond is discarded, so every tree edge is at most one step long.
Edge validity: Points along the chord between two nodes must lie within a tolerance of ( unless stated); this rejects chords that tunnel through bumps or bridge gaps. The chord implementation tests uniformly spaced interior points per step length; the surface implementation tests every point at which it bisects the chord (below, and Section VII-E). An optional slope limit rejects edges steeper than a given angle.
Goal: The goal joins the tree only when a steered point lands on it exactly, which goal-biased sampling brings about once any node lies within of it. There is no straight connection from a distance.
Parent choice and rewiring: Lines 9–16 of Algorithm 6 of [4], with the nearest vertex added to the near set for rewiring as well as for the parent choice. Candidates are scanned in order of plus chord length, stopping once that lower bound cannot beat the best valid edge found. A rewire updates the costs of all descendants.
Step: defaults to the mean mesh edge length, 0.57 on the reference terrain.
A. Two implementations of LINE
RRT* is a single planner and LINE one routine inside it. Our two implementations differ only in what an edge is and what it costs, so that any difference in behaviour is attributable to this primitive alone.
-
Chord (naive). The straight segment between two surface points, costed by its Euclidean length: the obvious implementation, although the segment itself is not on the surface.
-
Surface (consistent). The edge is built from the chord's endpoints by bisection: the chord's midpoint is projected onto and the halves are treated recursively until consecutive points lie on one face or on two faces sharing an edge. Points on one face are joined by their segment; points on edge-adjacent faces by the shortest path across the shared edge, the straight line in the unfolding of the two faces, with the crossing point inserted (or, if that line misses the edge, through its nearer endpoint); points on faces sharing only a vertex are bisected further and joined through the vertex when it lies on the segment between them or when a cap of six bisections is reached. A projected point farther than from rejects the edge, as does a pair on faces sharing no vertex after six bisections, where the projection jumps because the chord passes beneath a ridge. Every vertex of the resulting polyline lies on and consecutive vertices share a face, so it is a path on , and its length, the edge cost, is its exact surface length. The returned path concatenates these polylines, so the reported cost is the exact length of the path returned.
The surface variant costs 1.2 times the chord's time per iteration on the reference terrain and 1.4 and 1.5 times at amplitudes 2 and 4 (Table VII).
V. ANALYSIS: WHAT EACH VARIANT OPTIMISES
A. The chord-polyline cost
Definition 1 makes the two quantities of the Introduction precise for a route of the chord variant: is its cost, the number the planner optimises, and is its length, the shortest distance a robot could travel on the surface through the same nodes.
Definition 1 (Admissible chord polyline and its two lengths). Let be a finite, connected triangle mesh (a compact connected polyhedral surface), a step and a tolerance. A chord polyline from to is a finite sequence of points of with and such that each segment has length at most and lies within distance of S at every point. Its chord cost is
and its surface length is
the length of the shortest route on S that visits the nodes in order. is the infimum of over admissible chord polylines and the geodesic distance.
The chord variant of Section IV grows a tree whose edges are these segments at their Euclidean lengths, with the distance condition checked at the interior points of Section IV rather than at every point (Section VII-E measures the effect of ), so its reported path cost is of the returned polyline; the shortest a robot could travel on through the same nodes is , the quantity measured in Section VII.
Proposition 1 (Chord cost versus surface length). For every admissible chord polyline , , with equality if and only if every segment lies on . Moreover .
Proof: On a compact connected surface a shortest path between any two points exists. The shortest path on from to is a rectifiable curve in with those endpoints, so its length is at least , with equality only if that path is the straight segment, the unique curve of minimal length between two points of , which then lies on . Conversely, a segment lying on is a path on of length equal to the chord. Summing over gives the first claim; the triangle inequality for gives .
Proposition 2 (The chord optimum lies below the geodesic). Let be a finite, connected triangle mesh, , , and let be a shortest path on from to , parametrised by arc length . If is not a single straight segment, then . If is a straight segment, then . (The dichotomy does not depend on the choice of : if one shortest path is straight then and every shortest path is that segment, so the first case is exactly .) In either case, every value is a cost that no path on from to attains.
Proof: is polygonal, and its tangent direction can change only where it crosses a mesh edge transversally with non-zero dihedral angle or passes through a vertex [1]; call a point where the direction does change a bend. A shortest path that is not a single straight segment has at least one bend. Suppose bends at arc length , and let be smaller than and than the two straight pieces adjacent to the bend. Form from the points of at every bend, at arc lengths and in place of , and at further points along the straight pieces so that consecutive nodes are at most apart. Every segment of other than lies on and is admissible. The exceptional segment has length strictly less than , because bends at , and every point of it lies within of one of its endpoints, which are on ; so is admissible, and
Hence . If is a straight segment, then for every polyline by the triangle inequality in , and subdividing into segments of length at most gives an admissible polyline with ; so . Finally, every path on from to has length at least , so no value below is attained.
Unless itself lies on , the first case of Proposition 2 applies; on a terrain without large flat regions this is typical for points more than a face diameter apart, and it holds for all 20 scenario pairs on the curved terrains of Section VI, whose geodesics exceed the straight-line distance by 2–29%. The chord variant thus optimises a quantity whose optimum is strictly below the length of every feasible path; with its sampled distance test it optimises over a superset of the admissible polylines, whose optimum satisfies and is the quantity Section VII estimates. The gap is a property of the cost, independent of the sampler, and Proposition 2 does not quantify it: how far below the optimum lies depends on and (Section V-D) and is estimated through in Section VII. With only segments on are admissible, so , but nodes on adjacent non-coplanar faces can then be joined only through a node exactly on their common edge, which area-uniform sampling never produces: in the dense-graph experiment of Section VII with only the 9–12% of candidate pairs within a single face are admissible and start and goal are disconnected in all ten rough-terrain scenarios.
B. Why rewiring does not remove the bias
The gap does not vanish as grows, although shrinks and short chords approximate geodesics well. Rewiring (line 15 of Algorithm 6 in [4]) replaces an edge only when a strictly cheaper alternative appears, and under a single chord of length up to that cuts below a bend is cheaper than any chain of short edges following the surface, because it omits the length it skips; the cutting chords are therefore the edges rewiring keeps. Any asymptotic-optimality guarantee that transfers to the surface does so for , the only cost the tree evaluates: the reported cost would converge to and the routes to -minimising polylines, whose length exceeds unless they are geodesics. We do not prove such a transfer (adapting Theorem 38 to the surface is open); Section VII estimates independently of the tree and shows the tree's cost approaching it.
C. Consistency and the surface primitive
A LINE primitive is consistent if the cost it charges for an edge is the length of a feasible path between its endpoints. The straight line in [4] is consistent by construction; the chord is not (Proposition 1). The surface primitive is consistent exactly: every vertex of its polyline lies on S and consecutive vertices share a face, so the polyline is a path on S, its length is that path's length, and the cost it charges can never fall below the surface distance between the edge's endpoints. The surface path through the projected points is not the geodesic between the endpoints; it is longer, by 0.002, 0.01 and 0.05% of on average on the routes returned at amplitudes 1, 2 and 4, and adding uniformly spaced samples along the chord lengthens it further, because a denser polyline follows the projection of the chord more closely. The planner brings the route to the geodesic by where it places nodes, so the primitive needs no sample count; bisection from the endpoints is enough (Section VII-E). Where the projection of a chord jumps between faces sharing no vertex, there is no surface path along that chord and the primitive rejects the edge; on the terrains tested this never happened. Every rejection was a tolerance failure at a bisection point, 1.2% of candidate edges at amplitude 4 and 0.1% at amplitude 2 against 1.4% and 0.1% for the chord's tolerance test, and on average the first solution came no later than the chord's (131 against 140 iterations at amplitude 4; Section VII).
D. Scaling with the step and with the tolerance
Smooth surfaces: For a geodesic of roughly constant curvature sampled at arc spacing , each chord falls short of its arc by , so the relative gap of the whole path is , provided the sagitta stays within .
Polyhedral surfaces: A mesh geodesic is a polyline that bends at mesh edges. A chord spanning a bend of turning angle at the middle of a step of length is shorter than the two arms by ; a bend splitting the step into arms gives , between 0 (bend at a node) and (centred), so per bend is an upper envelope over sampling phase. Summed over the bends a route crosses, whose number is fixed by the mesh, the gap is linear in as long as each step straddles at most one bend and the tolerance does not bind. The tolerance binds when the chord's deepest point exceeds ; for a centred crossing that point is at most from , with equality when the path crosses the edge perpendicularly, so it can bind only for , from that value on for perpendicular crossings and later for oblique ones; once it binds, the per-bend gap saturates near , where is the dihedral turning angle of the fold, which equals for a perpendicular crossing and exceeds it for an oblique one. With proportional to , as in our experiments, the cap is itself proportional to and the linear law persists. Halving the step therefore only halves the gap on a mesh, while RRT* in two dimensions needs roughly four times as many samples to cover the surface at half the spacing. Section VII-B measures the fixed-geodesic shortfall and finds a ratio of 1.5–2.3 per doubling of .
Tolerance: A chord of length that straddles a fold of turning angle symmetrically has its deepest point, on the bisector, at most from (equivalently when is the surface length of its two arms), with equality for a crossing perpendicular to the fold edge and less for oblique crossings, so it is admissible whenever . Asymmetric chords with one endpoint within of the fold are admissible at any
length up to , but the per-fold shortfall of any admissible chord is at most about , and the combined per-fold gap about ; both reduce to and for perpendicular crossings. Shrinking therefore shrinks the gap, but it removes the symmetric crossings that carry connectivity at a given sample density faster than it removes the bias, so at any finite sample density it trades one against the other (Section VII-C). The surface primitive has no such trade-off, because only guards the projection and the cost is the polyline's length for every admissible edge.
E. The flat case
On the flat control, a grid split along one diagonal so that every two edge-adjacent faces form a convex quadrilateral, every chord lies on and ; the two implementations charge the same cost for every edge except where the surface primitive's bisection cap routes through a vertex, both are planar RRT*, and both converge to the same cost (Section VII), so the discrepancy between them on curved terrain is caused by curvature.
VI. EXPERIMENTAL SETUP
Terrains: Synthetic egg-crate heightfields on a square, triangulated on a grid (529 vertices, 968 faces), with wavenumber , i.e. 1.5 periods per side; the amplitude A sets the roughness. A = 1 matches the grid, extent and height range of the terrain bundled with MeshNav3D, , which has 1.59 periods per side and a maximum slope against 1.5 and here (mean edge 0.57 in both); A = 4 has mean edge 1.01 and slopes up to ; A = 0 is a flat plane and is the control.
Ground truth: The exact geodesic between two mesh vertices from the MMP algorithm [1], [7] (pygeodesic), the engine of MeshNav3D's MMP planner.
Scenarios: Five random (start, goal) vertex pairs at least half the diagonal apart in the plane, drawn once and reused at every amplitude so that only roughness changes between terrains.
Planners: Mesh RRT* with the chord and with the surface implementation of LINE, step equal to the mean edge length, , three seeds per scenario, 30 000 iterations per run; the best cost after every iteration is recorded, so one run yields the whole convergence curve. Graph references: A* on the mesh edge graph and Theta* [10], both from MeshNav3D.
Metrics: Success; the planner's reported cost over ; the surface length of the returned route over ; the iteration of the first solution; and the fraction of candidate edges rejected by the tolerance test. For a chord route is computed exactly as in (4): the route's nodes are inserted as mesh vertices by splitting the triangles or edges they lie on, which leaves the surface unchanged, and MMP geodesics are summed between consecutive nodes. A surface route is measured the same way through its tree nodes; its reported cost, the polyline length, is the exact length of the returned path itself and therefore at least the geodesic length through the same nodes. For Theta* routes, whose nodes are mesh vertices, sums vertex-to-vertex MMP geodesics; A* routes run along mesh edges and are exact as returned.
Limit experiment: To estimate without the randomness of the tree, we sample points uniformly on the surface, connect every pair closer than that passes the edge test, weight each edge by the implementation's cost, and run Dijkstra between the scenario vertices; as this approaches the optimum of that cost over edges passing the same test, for either implementation.
Step-scaling experiment: The exact geodesic is resampled at spacing and its chord-polyline length compared with . This isolates the chord gap for a fixed path.
VII. RESULTS
Chord RRT* found a solution in every run and converges, but to a reported cost below the geodesic optimum; the surface variant converges to the optimum. Fig. 1 shows the mean reported cost against iterations for both LINE implementations at five roughness levels.
On the flat control both variants converge to the same cost, 1.0007 of the straight line, the planar behaviour proven in [4]. From amplitude 0.5 upward the chord curves cross below and keep falling as the tree densifies, to 0.996, 0.989 and 0.973 at amplitudes 1, 2 and 4, while the rings, the mean exact surface length of the returned routes, are 1.0008, 1.0014, 1.0033 and 1.0055 of at amplitudes 0.5, 1, 2 and 4: on average 0.1–0.5% longer than the geodesic; the excess grows with roughness (individual chord routes are 0.04–1.1% long and their reported costs reach 3.3% below ; individual surface routes are 0.03–0.5% long). The surface curves settle just above ; their final routes measure 1.0007, 1.0007, 1.0011 and 1.0016 of , two to 3.4 times closer to the geodesic than the chord routes at amplitudes 1–4 (1.2 times at amplitude 0.5, where both are within 0.1%), and their reported costs (1.0007, 1.0007, 1.0012 and 1.0021) lie at or above those exact lengths, as the length of a feasible path must. Two scenarios per rough terrain run to 60 000 iterations change the chord cost by at most of between 30 000 and 60 000 iterations (a plateau at ), while the surface cost still falls by up to .
A. What each implementation converges to
The dense-graph estimate of each optimum (, Table II) confirms that each tree converges to the optimum of its own cost. The chord optimum lies below , as Proposition 2 requires, and moves further below as the graph densifies: at amplitude 2 from 1.015 at to 0.986 at , while the exact surface length of the minimiser falls from 1.025 to 1.003 of as sparse-graph detours disappear, so the gap between what the cost reports and what the route measures widens with density. The surface optimum approaches from above (1.025 to 1.001 over the same range); its minimiser's exact length is within 0.24% of at every amplitude for , and the optimum lies at or above it (1.0020 against 1.0019, 1.0026 against 1.0024 and 1.0029 against 1.0019 at amplitudes 1, 2 and 4), as it must for a cost that is the length of a feasible path.
TABLE II
DENSE-GRAPH OPTIMUM OF EACH EDGE COST (, ) AND THE EXACT SURFACE LENGTH OF THE ROUTE ATTAINING IT, OVER . SHORTER OF THE TWO IN BOLD.
| Ampl. | Chord | Chord | Surf. opt./c* | Surf. |
|---|---|---|---|---|
| 1 | 0.9975 | 1.0025 | 1.0020 | 1.0019 |
| 2 | 0.9890 | 1.0043 | 1.0026 | 1.0024 |
| 4 | 0.9733 | 1.0044 | 1.0029 | 1.0019 |
TABLE III
CHORD SHORTFALL OF THE EXACT GEODESIC RESAMPLED AT SPACING , OVER (MEAN OF FIVE SCENARIOS).
| Ampl. | 0.25 | 0.5 | 1.0 | Ratio per doubling | |
|---|---|---|---|---|---|
| 0.5 | 0.0003 | 0.0007 | 0.0015 | 0.0034 | 2.1–2.3 |
| 1 | 0.0009 | 0.0018 | 0.0039 | 0.0091 | 1.9–2.3 |
| 2 | 0.0020 | 0.0042 | 0.0068 | 0.0145 | 1.6–2.1 |
| 4 | 0.0043 | 0.0077 | 0.0116 | 0.0211 | 1.5–1.8 |
B. The gap is linear in the step
Resampling the exact geodesic at spacing and summing the chords gives the shortfall in Table III, as a fraction of . The ratio per doubling of is about 2, whereas the smooth-surface expansion of Section V-D predicts 4; on a mesh, halving the step halves the gap at roughly four times the sampling cost.
C. Shrinking the tolerance trades bias for connectivity
Table V repeats the dense-graph estimate for the chord cost at four tolerances. Tightening from to moves toward but leaves it below (0.997 and 0.990 at amplitudes 2 and 4). At the estimate rises above , but the cost has not become consistent: 47–52% of the candidate edges are no longer admissible, the sparser graph detours, and the selected route's surface length worsens to 1.0–1.6%. At three quarters of the edges are gone and routes are 14–23% long. Doubling the sample density to restores connectivity at and the estimate drops back below (0.999 and 0.995 at amplitudes 2 and 4): tightening only raises the sample density at which the bias appears. No tolerance gives both a consistent cost and a well-connected graph, as Section V-D predicts.
The planner behaves the same way (Table IV). Tightening from to raises the share of rejected candidate edges from 0.1–1.4% to 58–63%, delays the first solution 28- to 61-fold (from 71–140 to 3900–4300 iterations on average), leaves only 1–2 of 15 runs solved after 2000 iterations, and still leaves the mean reported cost at or below after 30 000 iterations, while the exact length of the returned routes stays in the same 0.2–0.6% band as at .
D. Success is unaffected by roughness
Table VI reports success and time to first solution for the chord implementation. The surface implementation also solves every run, with the same mean first-solution iteration as the chord up to amplitude 2 and an earlier one at amplitude 4 (131 against 140, 385 at worst for both); its tolerance test at

Fig. 1. Mean reported cost over the exact geodesic against iterations (log scale), 5 scenarios 3 seeds per terrain; chord edges left, surface edges right. Rings: exact surface length of the final route. Below the dashed line the reported cost is shorter than any path on the surface.
TABLE IV
CHORD RRT* AT THREE TOLERANCES (5 SCENARIOS 3 SEEDS): REJECTED CANDIDATE EDGES, RUNS SOLVED AFTER 500 / 2000 / 5000 ITERATIONS, FIRST-SOLUTION ITERATION (MEAN / WORST), REPORTED COST AND EXACT SURFACE LENGTH OF THE FINAL ROUTE OVER .
| Ampl. | Rej. | Solved 500/2000/5000 | First sol. | Reported/c* | ||
|---|---|---|---|---|---|---|
| 2 | 0.15 | 0.1% | 15/15/15 | 71/120 | 0.9888 | 1.0033 |
| 2 | 0.05 | 21% | 5/14/15 | 734/2114 | 0.9938 | 1.0023 |
| 2 | 0.02 | 58% | 0/1/10 | 4318/8304 | 0.9999 | 1.0032 |
| 4 | 0.15 | 1.4% | 15/15/15 | 140/385 | 0.9729 | 1.0055 |
| 4 | 0.05 | 32% | 1/15/15 | 1168/1948 | 0.9870 | 1.0042 |
| 4 | 0.02 | 63% | 0/2/11 | 3889/6411 | 0.9963 | 1.0060 |
TABLE V
CHORD EDGES ON THE DENSE GRAPH () AT FOUR TOLERANCES: ADMISSIBLE EDGES, ESTIMATED AND EXACT SURFACE LENGTH OF ITS MINIMISER, OVER (MEAN OF FIVE SCENARIOS).
| Ampl. | Edges | |||
|---|---|---|---|---|
| 2 | 0.15 | 288 136 | 0.9890 | 1.0043 |
| 2 | 0.05 | 241 075 | 0.9966 | 1.0039 |
| 2 | 0.02 | 154 320 | 1.0066 | 1.0101 |
| 2 | 0.005 | 72 814 | 1.1429 | 1.1441 |
| 4 | 0.15 | 374 856 | 0.9733 | 1.0044 |
| 4 | 0.05 | 284 247 | 0.9898 | 1.0048 |
| 4 | 0.02 | 182 789 | 1.0069 | 1.0159 |
| 4 | 0.005 | 82 446 | 1.2264 | 1.2290 |
bisection points rejects 1.2% of candidate edges there against 1.4% for the chord's, and no edge was rejected for a projection jump. Roughness doubles the time to a first solution at 75° slopes but never prevents one, and at the tolerance test rejects on average at most 1.4% of candidate edges (2.0% in the worst single run).
E. Choice of the sample count
Both implementations may sample the chord at uniformly spaced points per step length, the chord for its tolerance test only, the surface primitive as extra starting points for its bisection; Table VII varies from 0 to 32 for both. For the surface primitive the reported cost is at or above the exact route length in all 360 runs, so does not affect consistency; route quality is flat or marginally best at small , since a denser polyline follows the projection of the chord, which is longer than the geodesic between the nodes; time is flat within the measurement's scatter up to and grows beyond it, to 2.0–2.4 times the chord's at ; and the
TABLE VI
CHORD RRT*, 15 RUNS PER AMPLITUDE: MAXIMUM FACE SLOPE, SUCCESSES AT 500 AND 2000 ITERATIONS, FIRST-SOLUTION ITERATION AND SHARE OF CANDIDATE EDGES REJECTED.
| Ampl. | Slope | 500 it. | 2000 it. | First sol. mean / worst | Rej. |
|---|---|---|---|---|---|
| 0 | 0° | 15/15 | 15/15 | 72 / 114 | 0 |
| 0.5 | 25° | 15/15 | 15/15 | 73 / 110 | 0 |
| 1 | 43° | 15/15 | 15/15 | 73 / 116 | 0 |
| 2 | 62° | 15/15 | 15/15 | 71 / 120 | 0.1% |
| 4 | 75° | 15/15 | 15/15 | 140 / 385 | 1.4% |
TABLE VII
BOTH LINE IMPLEMENTATIONS AGAINST THE SAMPLE COUNT : EXCESS EXACT ROUTE LENGTH IN UNITS OF , AND TIME PER ITERATION RELATIVE TO THE CHORD AT (5 SCENARIOS 3 SEEDS). BETTER OF THE TWO IN BOLD.
| Ampl. | 1 | 2 | 3 | 4 | 8 | 16 | 32 | ||
|---|---|---|---|---|---|---|---|---|---|
| 1 | surf. | 7 | 7 | 7 | 7 | 7 | 7 | 7 | 7 |
| surf. time | 1.23 | 1.23 | 1.26 | 1.31 | 1.31 | 1.44 | 1.62 | 1.95 | |
| chord | 14 | 14 | 14 | 14 | 14 | 14 | 14 | 14 | |
| chord time | 0.93 | 0.97 | 0.98 | 1.00 | 1.02 | 1.06 | 1.14 | 1.30 | |
| 2 | surf. | 11 | 11 | 12 | 11 | 11 | 12 | 12 | 12 |
| surf. time | 1.39 | 1.40 | 1.43 | 1.53 | 1.55 | 1.62 | 1.88 | 2.31 | |
| chord | 35 | 33 | 33 | 33 | 33 | 33 | 32 | 32 | |
| chord time | 0.94 | 0.96 | 0.98 | 1.00 | 1.02 | 1.06 | 1.13 | 1.30 | |
| 4 | surf. | 16 | 16 | 16 | 16 | 16 | 17 | 17 | 18 |
| surf. time | 1.52 | 1.45 | 1.43 | 1.40 | 1.47 | 1.55 | 1.85 | 2.38 | |
| chord | 85 | 61 | 61 | 55 | 55 | 49 | 48 | 47 | |
| chord time | 0.93 | 0.96 | 0.98 | 1.00 | 1.02 | 1.06 | 1.13 | 1.29 |
rejection share barely moves (1.2–1.5% at amplitude 4). The primitive therefore uses none. For the chord, matters most at the first step and materially only on the roughest terrain: with no tolerance test () tunnelling chords are admitted and the routes are 0.85% long, against 0.61% at and 0.55% at ; from to the route length moves by a further 0.07% of and the reported cost by 0.14 points, within 0.1% of and 0.2 points, at 1.3 times the cost, so the chord keeps . The surface primitive's remaining constant, the bisection cap of six, was varied from 2 to 10 at amplitude 4: a shallow cap routes pairs that are not yet edge-adjacent through a shared vertex and lengthens the edges (routes at 1.0022 of at depth 2 against 1.0016 at depth 6); from six to ten, route length, first solution and rejection share are unchanged to the precision reported (1.0016, 131 iterations, 1.2%), and no pair lacked a shared vertex at the cap.
TABLE VIII GRAPH PLANNERS OVER THE EXACT GEODESIC (MEAN OF FIVE SCENARIOS).
| Ampl. | A* length/c* | Theta* |
|---|---|---|
| 0 | 1.100 | 1.000 |
| 0.5 | 1.088 | 1.019 |
| 1 | 1.070 | 1.024 |
| 2 | 1.085 | 1.039 |
| 4 | 1.087 | 1.059 |
F. Graph references
A* on mesh edges is 7–10% long everywhere, the familiar graph-metric penalty, and Theta* with line-of-sight chords between vertices 2–6% long on the curved terrains (Table VIII); the RRT* routes are on average 0.1–0.5% long with chord edges and 0.07–0.16% with surface edges.
VIII. DISCUSSION AND LIMITATIONS
Implications: The chord variant's routes, on average 0.1–0.5% above the geodesic, are an order of magnitude better than A* on mesh edges; its reported cost is wrong by up to 2.7% on average, in the direction no feasible path can have. On meshes the reported cost should be the surface length of the route and the LINE primitive consistent in the sense of Section V. The consistent primitive costs 1.2 to 1.5 times the chord's time per iteration, converges at the same rate in iterations and finds its first solution no later than the chord on average (131 against 140 iterations on the roughest terrain). Graph planners remain two to three orders of magnitude faster for a single query on meshes of this size; RRT* remains worth having on a mesh for its anytime behaviour, because its start and goal need not be mesh vertices, and because it extends, like other sampling-based planners, to differential and kinodynamic constraints.
Limitations: All terrains are heightfields without holes or overhangs. On general meshes the Euclidean nearest neighbour can pick a node on an adjacent fold and closest-point projection can be ill-defined where a chord is far from the surface; the tolerance test rejects such edges, which keeps the result valid but wastes samples. Neither probabilistic completeness nor asymptotic optimality on the surface is proven for either variant: completeness rests only on the 75 of 75 successful runs, and optimality is argued from comparing geodesic disks with Euclidean balls under a slope bound and from the convergence of the surface-polyline cost to the geodesic as edges shrink. The meshes are small (529 vertices) and from one terrain family; three seeds per scenario are enough for the convergence means but too few for tail statistics.
Future work: A proof of asymptotic optimality for the surface primitive on heightfields; a variant that steers by exact geodesic tracing on the polyhedral surface, so that every parent edge is a geodesic segment; and experiments on scanned terrains and closed objects.
IX. CONCLUSION
A surface has no volume in , so RRT* as Karaman and Frazzoli define it cannot run on a terrain mesh. Mesh
RRT*, the reformulation on the surface that an implementation could make, solved every run on our heightfields, but with the naive chord edges it minimises the chord-polyline cost , which is strictly below the length of every feasible path; on the terrains tested the mean reported cost ends up as much as 2.7% short of the true optimum, the shortfall grows with roughness, shrinks only linearly with the step, and cannot be removed by tightening the tolerance without disconnecting the graph, while the routes themselves are on average 0.1–0.5% suboptimal. When each edge is instead a path on the surface through its projected points, charged its own length, the bias disappears, since the reported cost is the exact length of the route returned, which exceeds the geodesic by 0.07–0.16% on average on every terrain tested, without any other modification to the algorithm.
REFERENCES
[1] J. S. B. Mitchell, D. M. Mount, and C. H. Papadimitriou, "The discrete geodesic problem," SIAM Journal on Computing, vol. 16, no. 4, pp. 647–668, 1987. [2] R. Kimmel and J. A. Sethian, "Computing geodesic paths on manifolds," Proceedings of the National Academy of Sciences, vol. 95, no. 15, pp. 8431–8435, 1998. [3] K. Crane, C. Weischedel, and M. Wardetzky, "Geodesics in heat: A new approach to computing distance based on heat flow," ACM Transactions on Graphics, vol. 32, no. 5, 2013. [4] S. Karaman and E. Frazzoli, "Sampling-based algorithms for optimal motion planning," The International Journal of Robotics Research, vol. 30, no. 7, pp. 846–894, 2011. [5] L. Jaillet and J. M. Porta, "Asymptotically-optimal path planning on manifolds," in Robotics: Science and Systems VIII, Sydney, Australia, 2012. [6] —, "Efficient asymptotically-optimal path planning on manifolds," Robotics and Autonomous Systems, vol. 61, no. 8, pp. 797–807, 2013. [7] V. Surazhsky, T. Surazhsky, D. Kirsanov, S. J. Gortler, and H. Hoppe, "Fast exact and approximate geodesics on meshes," ACM Transactions on Graphics, vol. 24, no. 3, pp. 553–560, 2005. [8] C. Mthabela, "Path planning approach for ground robots in 3D environments using sampling-based algorithms," Master's thesis, University of the Witwatersrand, Johannesburg, 2021, https://wiredspace.wits.ac.za/items/4f666d52-75b8-4975-ba30-1c9939126044. [9] M. Pantic, L. Ott, C. Cadena, R. Siegwart, and J. Nieto, "Mesh manifold based Riemannian motion planning for omnidirectional micro aerial vehicles," IEEE Robotics and Automation Letters, vol. 6, no. 3, pp. 4790–4797, 2021. [10] K. Daniel, A. Nash, S. Koenig, and A. Felner, "Theta*: Any-angle path planning on grids," Journal of Artificial Intelligence Research, vol. 39, pp. 533–579, 2010. [11] O. Jerome, C. Bassey, C. Okeme, A. Maloletov, and G. Kulathunga, "MeshNav3D: Software for visualizing and benchmarking uneven terrain planning algorithms," Journal of Open Research Software, 2025.