Enhancement: SE3 constructor should accept an (N, 4, 4) ndarray as N poses
Maintainer thường phản hồi trong vòng 1 ngày
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 3/5
- Thời gian dự kiến
- 1-2 ngày
- Mức phù hợp với người mới
- 66/100
- Loại issue
- Tính năng
- Độ rõ ràng
- Đặc tả rõ ràng
- Mức độ hoạt động
- Sôi nổi
- Công nghệ
- numpy, python
- Lĩnh vực
- backend-api-design
Hướng nghiên cứu
Start by reading the SE3 constructor and its existing tests for single matrices and lists of matrices. Run those tests, then add coverage for stacked (N, 4, 4) arrays and unsupported shapes, including the check=False behavior. Done means stacked arrays produce N poses like SE3(list(arr)), while unsupported shapes raise a useful error.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
Summary
SE3 can be built from a single 4x4 array, from a list of 4x4 arrays (its own internal representation for a sequence of poses), or from other SE3 objects, but not from a stacked (N, 4, 4) ndarray. That is the natural way to hold a pose sequence in NumPy-based code (for example the output of np.stack, or a trajectory loaded from a file), and it is the form that a number of Robotics Toolbox for Python (RTB) functions accept for pose trajectories.
Reproduction
import numpy as np
from spatialmath import SE3
A = SE3.Rx(0.3).A
arr = np.array([A, A, A]) # shape (3, 4, 4)
SE3(arr)
# ValueError: bad argument to constructor
s = SE3(arr, check=False)
len(s), s.A.shape
# (1, (3, 4, 4)) <- silently a malformed object: length 1, but .A is (3, 4, 4)
len(SE3([A, A, A])) # 3, a list of matrices works
Tested with spatialmath-python 1.1.18.
Why it matters
- With the default
check=Truethe error message does not say what is accepted. - With
check=Falsethe constructor silently returns a malformed object. In RTB this turned a user's(N, 4, 4)trajectory into an object that failed deep inside an IK solver withValueError: operands could not be broadcast together with shapes (3,4) (3,), far from the cause.
Suggested behaviour
- Accept an ndarray with
ndim == 3andshape[1:] == (4, 4)as a sequence of N poses, equivalent toSE3(list(arr)). - For other unsupported shapes, raise an error that says which forms are accepted. Ideally this validation of the array shape (not the matrix contents) would also happen with
check=False, which would skip only the expensive checks that the matrices are valid SE(3).
This is an enhancement request, not a regression. RTB works around it by converting the array to a list of matrices before calling the constructor, so there is no urgency.
- Ngôn ngữ chính
- Python
- Star
- 643
- Fork
- 102
- Merge trung bình
- 11 phút
- Pull request đã merge (30 ngày)
- 1
Chuẩn bị môi trường
Dự án này không cung cấp dev container, Dockerfile hay hướng dẫn đóng góp, nên bạn cần tự thiết lập môi trường: hãy bắt đầu từ README và xem hướng dẫn đóng góp lần đầu của chúng tôi để biết các bước chung.
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 rai-opensource/spatialmath-python
-
documentation
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 74/100
rai-opensource/spatialmath-python#235 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
enhancement
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 65/100
rai-opensource/spatialmath-python#32 · 4 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
enhancement
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 68/100
rai-opensource/spatialmath-python#234 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Line3.isparallel()/__or__ still scale-dependent, like the distance() bug fixed in #224Có thể đã có người làm @Doribelove đã nhận 12 ngày trước. Đang mở
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 72/100
rai-opensource/spatialmath-python#231 ·
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 50/100
rai-opensource/spatialmath-python#177 ·
Maintainer thường phản hồi trong vòng 1 ngày
Tất cả issue của rai-opensource/spatialmath-python
Issue tương tự
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 70/100
NVIDIA/earth2studio#1241 ·
Maintainer thường phản hồi trong vòng 3 ngày
-
docs(types): update the collection binding note now that typed collections shipped in pycubrid 1.9.0Đang mởdocumentation priority: low size: S
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 75/100
cubrid-lab/sqlalchemy-cubrid#768 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
--csv-bom was never wired up: PR #850 added an unused helper parameter, so #846 is not fixedĐang mởbug help wanted
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 75/100
Maintainer thường phản hồi trong vòng 1 ngày
-
Broken link in index.rstĐang mởdocumentation
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 65/100
ansys/pydpf-core#3547 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
good first issue
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
OktoLabsAI/okto-pulse#114 ·
Maintainer thường phản hồi trong vòng 1 ngày