AORRTC always returns zero-length path on RealVectorStateSpace (OMPL 2.0.0 Python bindings)

Abierto
#1,420 1 comentario 0 reacciones 1 asignado Ver en GitHub

@zkingston ya está trabajando en esto.

Desde el 4/5/2026.

  • #1471 de @chenzhike110 — abierto
  • #1481 de @sea-bass — abierto

Evaluación

Este issue todavía no se ha evaluado.

Descripción

Summary

In OMPL 2.0.0, og.AORRTC consistently fails on RealVectorStateSpace problems with a trivial validity checker. Its internal post-search simplification reduces every initial path to "cost 0.00000", and solve() then aborts with:

Error:   AORRTC: Zero-length path found. May have a common start/goal.

The same problems are solved correctly by og.RRTConnect, og.BITstar, and og.RRTstar under identical setup.

Environment
  • OMPL: 2.0.0 (installed via pip install ompl==2.0.0)
  • Python: 3.12.3
  • OS: Linux 6.17 / glibc 2.39 / x86_64
Minimal reproducer
from ompl import base as ob, geometric as og

DIM = 14
space = ob.RealVectorStateSpace(DIM)
bounds = ob.RealVectorBounds(DIM)
for i in range(DIM):
    bounds.setLow(i, -3.14159); bounds.setHigh(i, 3.14159)
space.setBounds(bounds)

si = ob.SpaceInformation(space)
si.setStateValidityChecker(lambda s: True)
si.setup()

start = space.allocState()
goal = space.allocState()
for i in range(DIM):
    start[i] = 0.0
    goal[i] = 0.5  # euclidean distance ~1.87

pdef = ob.ProblemDefinition(si)
pdef.setStartAndGoalStates(start, goal)
pdef.setOptimizationObjective(ob.PathLengthOptimizationObjective(si))

planner = og.AORRTC(si)
planner.setProblemDefinition(pdef)
planner.setup()
solved = planner.solve(2.0)
print("solved:", bool(solved))
print("path:", pdef.getSolutionPath())
Observed output
Debug:   AOXRRTConnect: Planner range detected to be 4.701905
Info:    AOXRRTConnect: Started planning with 1 states. Seeking a solution better than inf.
Info:    AOXRRTConnect: Found a solution of cost 0.00000
Info:    AOXRRTConnect: Created 3 states (1 start + 2 goal)
Info:    AORRTC: Initial search simplified to cost 0.00000
Error:   AORRTC: Zero-length path found. May have a common start/goal.
solved: False
path: None
Reproducibility scope

The failure is systematic — observed across all combinations tested:

dim goal coord euclidean dist inner-search cost simplified cost result
2 0.1 0.14 0.0 0.0 FAIL
2 2.0 2.83 3.55 0.0 FAIL
3 2.0 3.46 4.35 0.0 FAIL
7 2.0 5.29 6.65 0.0 FAIL
14 0.5 1.87 0.0 0.0 FAIL
14 2.0 7.48 9.40 0.0 FAIL

setRange() to 0.1 / 0.3 / 0.5 / 1.0 does not change the outcome — the inner search reports correct nonzero costs in those cases, but the post-search simplification step (AORRTC: Initial search simplified to cost 0.00000) collapses every solution to zero length, after which solve() returns INVALID.

Expected behavior

og.AORRTC should return a non-degenerate PathGeometric whose length is approximately the euclidean start-to-goal distance, matching what og.RRTConnect and og.BITstar produce on the same problem.

Likely root cause

The Initial search simplified to cost 0.00000 log line consistently appears regardless of whether the inner search produced cost 0 (for distances within the planner range) or a correct nonzero cost (for distances exceeding the planner range). This points at the post-search simplification step in AORRTC.cpp (around line 210, where the "Zero-length path found" error is thrown) rather than at the underlying AOXRRTConnect search.

Lenguaje dominante
C++
Estrellas
2.2k
Forks
718
Merge medio
16 h 12 min
PR fusionados (30 d)
1

Preparar el entorno

Este proyecto no incluye contenedor de desarrollo, Dockerfile ni guía de contribución, así que la configuración corre por tu cuenta: empieza por su README y consulta nuestra guía para la primera contribución para los pasos generales.

Primeros pasos

  1. Lee el issue completo y luego la guía de contribución del proyecto.
  2. Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
  3. Haz un fork del repositorio y trabaja en una rama.
  4. Abre un pull request que haga referencia al número del issue.

Más de ompl/ompl

Todos los issues de ompl/ompl

Issues similares

Más issues de C++

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.