Hacktoberfest 2026: le issue che i maintainer hanno segnato per ottobre, aperte e adatte ai principianti. Sfoglia le issue Hacktoberfest

mobile: the occupancy grid should draw the planner background, and planners should agree on units

Chiusa
#785 2 commenti 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

@kVinsom ci sta già lavorando.

Dal 15/10/2026.

  • #791 di @kVinsom — aperta

Valutazione

Difficoltà
4/5
Tempo stimato
3-5 giorni
Idoneità per principianti
30/100
Tipo di issue
Refactoring
Chiarezza
Abbastanza chiara
Stato di attività
Attiva
Stack tecnologico
python

Direzione di ricerca

Start with PlannerBase.plot_bg and BaseOccupancyGrid.plot(), then compare how DistanceTransformPlanner.plan(goal), PRMPlanner and validate_endpoint interpret the goal coordinates. The unit convention is not yet decided, so agree it with the maintainer first and record it in the mobile section of desiderata.md. Done means the planners share one convention, unit-cell output is unchanged, and new tests cover a 0.5 cell size and a non-zero origin.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

tech-debt

Summary

Drawing a planner's background (the occupancy grid, the distance field, the colorbar, the cell labels) is done by PlannerBase.plot_bg, in cell numbers. The occupancy grid object, which knows its own workspace, cellsize and origin, only draws the obstacles. The two should be one thing: the map draws itself, and a planner hands it an optional overlay.

Why

  • The planners disagree about units. plot_bg draws in cell numbers (axes labelled "x (cells)") and DistanceTransformPlanner.plan(goal) uses the goal as a row/column index, while PRMPlanner takes world coordinates. For a grid with one cell = 1 unit starting at 0, which is everything in the book, they are the same. For a grid with 0.5-unit cells, or one that starts at (10, 20), a goal in world units gives IndexError for the distance transform and a misplaced picture.
  • validate_endpoint tests a point against the grid in world coordinates, then the planner uses the same number as a cell index.
  • Every planner repeats the background logic through the base class, and RRTPlanner draws a PolygonMap by another route.

Proposal

  1. BaseOccupancyGrid.plot() takes an optional overlay field and its options (field, colorbar, colorbar_style, labels, label_style, cmap, inflated), and draws in world coordinates using its own geometry.
  2. PlannerBase.plot_bg shrinks to "supply the distance field and the inflated image" and calls the map.
  3. Decide whether every planner takes world coordinates and converts to cells itself (my suggestion), and document it in a mobile section of desiderata.md (the design principles file at the repo root).
  4. Keep the output identical for unit cells, since all the book examples use them; add tests for a 0.5 cell size and a non-zero origin.

Not in scope

  • The block argument convention (tracked separately).
  • Animation arguments.

Related

  • plot(labels=True), colorbar_style and friends are now arguments of plot() (the PR that adds labels), which this builds on.
Lingua principale
C++
Stelle
3.5k
Fork
639
Merge medio
1g 13h
PR unite (30g)
98

Preparare l'ambiente

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di petercorke/robotics-toolbox-python

Tutte le issue di petercorke/robotics-toolbox-python

Issue simili

Altre issue su C++

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.