Hacktoberfest 2026: những issue maintainer đã đánh dấu cho tháng Mười, đang mở và phù hợp người mới. Xem issue Hacktoberfest

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

Đang mở
#785 2 bình luận 0 reaction 0 người được giao Xem trên GitHub

Maintainer thường phản hồi trong vòng 1 ngày

@kVinsom đang làm issue này rồi.

Từ ngày 15/10/2026.

  • #791 của @kVinsom — đang mở

Đánh giá

Độ khó
4/5
Thời gian dự kiến
3-5 ngày
Mức phù hợp với người mới
30/100
Loại issue
Tái cấu trúc
Độ rõ ràng
Khá rõ ràng
Mức độ hoạt động
Sôi nổi
Công nghệ
python

Hướng nghiên cứu

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.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

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.
Ngôn ngữ chính
C++
Star
3.5k
Fork
639
Merge trung bình
1 ngày 22 giờ
Pull request đã merge (30 ngày)
73

Chuẩn bị môi trường

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của petercorke/robotics-toolbox-python

Tất cả issue của petercorke/robotics-toolbox-python

Issue tương tự

Thêm issue về C++

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.