LatticePlanner: integer headings, and motion primitives with finer turn steps (design first)
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 23/10/2026.
Đánh giá
- Độ khó
- 5/5
- Thời gian dự kiến
- Hơn một tuần
- Mức phù hợp với người mới
- 25/100
Hướng nghiên cứu
Start by reading the current LatticePlanner implementation, its query and collision-checking paths, and desiderata.md; the issue gives no file paths for these entry points. Draft a design covering integer states, primitive input and costs, snapping, collision checks, .mprim support, and compatibility tests. Done means the design answers all six questions; wait for agreement before sending a PR.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
Help wanted. Please comment with a design first, and do not send a PR before it is agreed.
Today
LatticePlanner plans on a lattice of poses reached by three moves from each pose: straight (SE2(1, 0, 0)), left and right (SE2(1, ±1, ±π/2)). The turn is always a quarter turn and the moves are fixed in the code; the constructor takes only the costs and the root.
- A vertex stores a float
(x, y, theta)fromSE2multiplication. In practice every x and y is within about 4e-16 of an integer and every heading is a multiple of π/2, so the state space is exactly (integer x, integer y, one of four headings). The integer quarter-turn count only appears in the debug strings (icoord()). - A duplicate is found with
graph.closest(xyt)and a tolerance of 0.01, inside the loop over every candidate move. That scans every vertex, soplan()is roughly quadratic: 97, 372 and 780 vertices take about 0.00, 0.07 and 0.38 s. - The floats drift, and some headings come out as
-2.449e-16instead of 0. That makes pgraph'sbuild_kdtreeraise (petercorke/pgraph-python#85), which is why #889 indexes PRM roadmaps but not lattices.
Idea
- Store the state as integers
(ix, iy, k), withka heading index moduloN(N = 4today), and derivecoordexactly astheta = 2πk/Nwrapped to(-π, π]. Duplicates become a dictionary lookup, so planning is linear and needs no spatial index, and the drift disappears.query()then snaps an arbitrary start or goal with an explicit rule (round x and y to the nearest cell, the heading to the nearestk), which could raise when a pose is far from the lattice. Today it silently snaps to the nearest vertex. - Allow finer turn steps with a table of motion primitives, one list for each start heading, each entry an end point
(dx, dy, dk)in cells and heading steps, with a cost and, optionally, the intermediate poses used for collision checking. Symmetry means the primitives for one octant give the rest by integer rotation. WithN = 4and the current three moves, the table reproduces today's planner, and the default behavior must not change.
Prior art is SBPL (Likhachev), whose lattices work this way: typically 16 headings, and a node's successors turn by a small range of headings, not a full circle. Its .mprim text files hold a header (resolution_m, numberofangles, totalnumberofprimitives) and then, for each primitive, primID, startangle_c, endpose_c: dx dy dtheta, additionalactioncostmult, intermediateposes: n followed by n lines of x y theta. For example matlab/mprim/pr2.mprim has 112 primitives for 16 angles. The project itself has had no commit on its default branch since 2018, and its Python wrapper pysbpl none since 2021, so do not depend on either. The file format is simple enough to read directly, and a LatticePlanner.from_mprim(file) would give people a way to use the existing files. Check the licence of any file before copying one into RTB.
What a design should cover
- The state representation, and how
coordand thepgraphvertices are kept consistent. - How primitives are given: for example an argument that takes a list of lists of end-point tuples, one list per heading, and how costs and intermediate poses are supplied or generated.
- The rule for snapping a start or goal in
query(), and what happens for a pose far from the lattice. - How
plan(iterations=)and the occupancy-grid collision check work with primitives other than the three arcs. - Testing:
N = 4with the default moves must give the same vertices, edges and paths as now, and the plan time should be shown. - Whether reading
.mprimfiles is included, and a small example file.
Things to know
- #889 (PRM indexing) and petercorke/pgraph-python#85 are related, but neither is needed. The aim is that the lattice does not need pgraph's spatial index at all.
- The aim of stateless robots and planners, in
desiderata.md, is a reason to prefer an immutable table of primitives. - If an AI assistant wrote or helped with the change, say so in the PR, as
AGENTS.mdasks. - One change per PR.
- Ngôn ngữ chính
- C++
- Star
- 3.6k
- Fork
- 645
- Merge trung bình
- 1 ngày 8 giờ
- Pull request đã merge (30 ngày)
- 145
Chuẩn bị môi trường
- Không có Dockerfile hay tệp Docker Compose
- Có mẫu pull request
- Đọc hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- 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.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của petercorke/robotics-toolbox-python
-
plt.pause(0) waits for ever: PoseGraph.plot_scan(pause=0) and Vehicle animation may hangCó thể đã có người làm @huxiaoyi-ovo đã nhận hôm nay. Đang mởbug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
petercorke/robotics-toolbox-python#876 · 1 bình luận · 1 người được giao ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100
petercorke/robotics-toolbox-python#709 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Isaac Sim backendĐang mởenhancement
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 25/100
petercorke/robotics-toolbox-python#903 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Backend registry: single name → constructor dispatchCó thể đã có người làm @petercorke đã nhận hôm nay. Đang mởenhancement
petercorke/robotics-toolbox-python#902 · 1 người được giao ·
Maintainer thường phản hồi trong vòng 1 ngày
-
tech-debt
Độ khó 4/5 1-2 ngày Mức phù hợp với người mới 55/100
petercorke/robotics-toolbox-python#898 ·
Maintainer thường phản hồi trong vòng 1 ngày
Tất cả issue của petercorke/robotics-toolbox-python
Issue tương tự
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
KhronosGroup/Vulkan-Tutorial#534 ·
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 65/100
Maintainer thường phản hồi trong vòng 2 ngày
-
bug IO
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 65/100
MrNeRF/LichtFeld-Studio#3824 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
pnnx: manual tanh GELU fusion loses the approximation modeCó thể đã có người làm @ktz03 đã nhận hôm nay. Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
Tencent/ncnn#7175 · 1 reaction ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 77/100
throneproj/Throne#2043 ·
Maintainer thường phản hồi trong vòng 2 ngày