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

paycap crashes for robots with n != 6 and its docstring does not match its behaviour

Đã đóng
#728 1 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

@huxiaoyi-ovo đang làm issue này rồi.

Từ ngày 10/10/2026.

  • #731 của @huxiaoyi-ovo — đã merge

Đá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
18/100
Loại issue
Lỗi
Độ rõ ràng
Khá rõ ràng
Mức độ hoạt động
Đình trệ
Công nghệ
python
Lĩnh vực
documentation, robotics

Hướng nghiên cứu

Start from Dynamics.paycap and its docstring, and compare the wmax allocation with the per-joint assignment that fails for n != 6. Uncomment test_paycap in tests/test_DHRobot.py, then run the Panda repro from the issue. Done means n != 6 works, the return value matches the docstring, and the signature and frame docs are corrected. Pull request #731 already targets this, so check it before starting.

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

Mô tả

bug

Dynamics.paycap allocates wmax = np.zeros((trajn, 6)) but assigns an n-element per-joint vector, so any robot with n != 6 raises:

ValueError: could not broadcast input array from shape (7,) into shape (6,)

Repro: rtb.models.DH.Panda().paycap([0, 0, -1, 0, 0, 0], tauR, q=q) with tauR an (n, 2) array of joint torque limits.

For n = 6 it works but returns per-joint scale factors, not the 6-vector wrench the docstring describes. The maximum load along w is wmax.min() and joint is the limiting joint. On a DH Puma 560 at qr, with w = [0, 0, -1, 0, 0, 0], this gave 4392 N limited by joint 2, and recomputing the joint torques at that load put joint 2 exactly at its limit.

Other problems:

  • The docstring signature paycap(q, w, f, tauR) does not match the code paycap(w, tauR, frame=1, q=None), and the frame description ('base'/'ee') does not match the int argument.
  • w is normalised, so it is only a direction, which the docs do not say.
  • It uses gravload, so it gives nonsense on models with zero dynamics such as the default URDF-based Panda. This should be documented or detected.
  • tests/test_DHRobot.py::test_paycap is commented out.

Raised from discussion #430.

Ngôn ngữ chính
C++
Star
3.5k
Fork
639
Merge trung bình
1 ngày 16 giờ
Pull request đã merge (30 ngày)
88

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.