coriolis() and Robot.copy().rne() fail for URDF/ETS robots: copied links keep their original parent
Maintainer thường phản hồi trong vòng 1 ngà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
- 25/100
Hướng nghiên cứu
Start with Robot.copy() and Robot.__deepcopy__, then Robot.rne where self.links.index(joint.parent) fails, and trace how coriolis reaches nofriction(). Check linked PR #732 first, since it already targets this fix. Done means each copied link's parent and children point to copied links, and copy().rne(q, qd, qdd) matches the original robot's result.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
robot.coriolis(q, qd) raises ValueError: Link(...) is not in list for every URDF-based Robot I tried: UR5, KinovaGen3, LBR, and a two-link URDF with full inertials. DH robots are unaffected.
coriolis calls nofriction(), which calls copy(). The same error occurs for robot.copy().rne(q, qd, qdd) directly, while rne on the original robot works. Cause: after copy() each link's parent (and the joint's parent) still refers to the original robot's link object, so self.links.index(joint.parent) in Robot.rne (group_of_link_idx.get(...)) fails.
Repro (any URDF with dynamics):
import numpy as np
from roboticstoolbox.models.URDF.URDFRobot import URDFRobot
r = URDFRobot("/path/to/two_links_robot.urdf") # two revolute joints, with <inertial> elements
q, qd = np.array([0.3, -0.5]), np.array([0.1, 0.2])
r.rne(q, qd, np.zeros(2)) # OK
r.copy().rne(q, qd, np.zeros(2)) # ValueError: Link(...) is not in list
r.coriolis(q, qd) # ValueError: Link(...) is not in list
Notes
- #722 lists
coriolis->ValueErrorunder "models with no dynamic parameters". That attribution is wrong: this is the error, and it happens on models that do have dynamics. - Same family as #705: state that does not survive
copy(). - Workaround:
C(q, qd) qd = rne(q, qd, 0) - gravload(q) + friction(qd). Checked againstcoriolison the DH Puma 560 (max difference 4e-15), and against a Christoffel-symbol calculation from the mass matrix on the URDF robot.
Fix: have Robot.__deepcopy__ remap each link's parent (and children) onto the copied links, and add a regression test that copy() then rne equals the original.
Found while answering Adineh94's question in discussion #158.
- Ngôn ngữ chính
- C++
- Star
- 3.5k
- Fork
- 630
- Merge trung bình
- 2 ngày 14 giờ
- Pull request đã merge (30 ngày)
- 65
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
-
Độ 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
-
tech-debt
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 22/100
petercorke/robotics-toolbox-python#773 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
CI: a PR influx is serialised by 'require up to date' plus a 12 minute CI; consider a merge queueĐang mởtech-debt
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 15/100
petercorke/robotics-toolbox-python#758 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
needs investigation tech-debt
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 18/100
petercorke/robotics-toolbox-python#755 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
tech-debt
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 58/100
petercorke/robotics-toolbox-python#753 ·
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ự
-
agent:WSL bug linux LOW
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 70/100
Maintainer thường phản hồi trong vòng 1 ngày
-
Build failure: limoĐang mở0.kind: build failure
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 Dưới một giờ Mức phù hợp với người mới 72/100
finalburnneo/FBNeo#2803 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
ai_p1 comp-message-queues
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
ClickHouse/ClickHouse#125890 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 78/100
carla-simulator/carla#9973 ·
Maintainer thường phản hồi trong vòng 1 ngày