Rigorous testing of operational-space methods
Maintainer thường phản hồi trong vòng 1 ngày
Đá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
- 25/100
Hướng nghiên cứu
Start by reading tests/test_fknm_fallback.py for the Spong 2R anchor and its sign-convention mapping, then tests/test_blocks.py and the _x methods (inertia_x, coriolis_x, gravload_x, accel_x). Create tests/test_operational_space_closed_form.py with the closed-form 2R Jacobian and its hand-derived derivative, and check F = J⁺ᵀτ against the RTB methods over several q, q̇, q̈. Done when the test passes for scalar and trajectory inputs.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
Summary
The operational-space methods (inertia_x, coriolis_x, gravload_x, accel_x) have no independent ground truth in the test suite, unlike rne, which is anchored to the closed-form Spong equation. coriolis_x carried a wrong equation and a wrong Jacobian derivative until #796, undetected.
Where the tests stand
rnehas an independent anchor:tests/test_fknm_fallback.pyhas Spong, Hutchinson and Vidyasagar eq. 7.87 for the planar 2R arm, which shares no code withrne.- The
_xmethods are tested by:- stored matrices (
Mr) produced by the code itself, which catch change but not error; - shape and finiteness checks (
test_accel_x_redundant_robot_returns_cartesian_acceleration); tests/test_blocks.py, which compares each block with the method it wraps (circular).
- stored matrices (
- The tests in #796 and #797 compare with inverse dynamics, a real independent check, but anchored to Spong only through
rne.
Derivation (to go in the test module docstring)
Joint-space dynamics M q̈ + C q̇ + g = τ, task velocity ẋ = J q̇ with J the analytical Jacobian, and τ = Jᵀ F. Then:
ẍ = J q̈ + J̇ q̇ so q̈ = J⁻¹ (ẍ − J̇ q̇)
F = J⁻ᵀ τ
= J⁻ᵀ M J⁻¹ ẍ + J⁻ᵀ (C − M J⁻¹ J̇) q̇ + J⁻ᵀ g
= Mx ẍ + [ J⁻ᵀ C J⁻¹ − Mx J̇ J⁻¹ ] ẋ + gx
with Mx = J⁻ᵀ M J⁻¹, q̇ = J⁻¹ ẋ and gx = J⁻ᵀ g. Hence
Mx = J⁻ᵀ M J⁻¹Cx = J⁻ᵀ C J⁻¹ − Mx J̇ J⁻¹gx = J⁻ᵀ gẍ = Mx⁻¹ (F − Cx ẋ − gx)
This is Khatib's operational-space form (his μ = J̄ᵀ b − Λ J̇ q̇) with the Coriolis term written as a matrix. The factorisation of Cx is not unique, only Cx ẋ is. J̇ must be the derivative of the same Jacobian that defines ẋ, so for an analytical representation it is the derivative of the analytical Jacobian, not the geometric one. For a redundant robot J⁻¹ is the pseudo-inverse, and the identity is exact only for minimum-norm motion (q̇ = J⁺ ẋ).
Proposal
A closed-form test on the planar 2R arm, tests/test_operational_space_closed_form.py:
D(q),C(q, q̇),g(q)from Spong's equations.J = [[−l1 s1 − l2 s12, −l2 s12], [l1 c1 + l2 c12, l2 c12], [0, 0], [0, 0], [0, 0], [1, 1]]forrpy/xyz, andJ̇differentiated by hand.- Check
F = J⁺ᵀ τ_spong = Mx ẍ + Cx ẋ + gxusing the RTB methods, over severalq,q̇,q̈, plus trajectory (matrix) inputs. - With two joints the Jacobian has full column rank, so
J⁺J = Iand the pseudo-inverse form is exact for anyq̇,q̈. - TwoLink's sign convention is the mirror of Spong's (
τ_rtb(q, qd, qdd) = −τ_spong(−q, −qd, −qdd), as calibrated intest_fknm_fallback.py), so apply the same mapping.
The 6-joint square path stays anchored through rne, as now; a closed-form 6R case would be possible but much heavier.
Related
- #796 (
coriolis_xequation), #797 (gravload_x) - the ets and robot groups of the typing pass
- Ngôn ngữ chính
- C++
- Star
- 3.5k
- Fork
- 639
- Merge trung bình
- 1 ngày 13 giờ
- Pull request đã merge (30 ngày)
- 98
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
-
help wanted
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 48/100
petercorke/robotics-toolbox-python#839 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
enhancement help wanted
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 52/100
petercorke/robotics-toolbox-python#825 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
feat(ets): numerical inverse kinematics for planar ETS2Có thể đã có người làm @qwist1233-cpu đã nhận 2 ngày trước. Đang mởenhancement help wanted
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 68/100
petercorke/robotics-toolbox-python#824 ·
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 10/100
petercorke/robotics-toolbox-python#803 ·
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 83/100
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 88/100
justcallmekoko/ESP32Marauder#1635 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
3.7.6-dev commit 80481ea - files not centered when resolution differs and zoom = "pixel-to-pixel"Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
grizzlypeak3d/DJV#931 ·
-
bug 🔥 pharesee
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100
Maintainer thường phản hồi trong vòng 1 ngày
-
bug tooling
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 76/100