Repository navigation
fix(robot): preserve link topology when copying robots - #732
huxiaoyi-ovo wants to merge 5 commits into
Conversation
Up to standards ✅🟢 Issues
|
| Metric | Results |
|---|---|
| Complexity | 0 |
| Duplication | -2 |
NEW Get contextual insights on your PRs based on Codacy's metrics, along with PR and Jira context, without leaving GitHub. Enable AI reviewer
TIP This summary will be updated as you push new changes.
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## main #732 +/- ##
=====================================
Coverage 0.00% 0.00%
=====================================
Files 146 146
Lines 17295 17304 +9
=====================================
- Misses 17295 17304 +9 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
|
Thank you for this, and for the careful test. I reproduced the problem: on
A test that |
Use one deepcopy memo for all arm and gripper links. Register each link before copying its parent, leaving the child graph to be reconstructed by the robot constructor. Restore the gripper tool and joint state. Preserve nofriction topology while delegating coefficient changes to Link.nofriction. Add a Panda gripper and FK regression test. Co-Authored-By: ChatGPT (GPT-6) <chatgpt@openai.com>
5a6b0b8 to
328a616
Compare
Preserve current main's typing and maintenance updates. Reapply only the memo-based graph copy, gripper state, friction and targeted tests. Co-Authored-By: ChatGPT (GPT-6) <chatgpt@openai.com>
mypy reports three unused-ignore errors after the graph-copy update. Remove only these obsolete annotations; there is no runtime change. Co-Authored-By: ChatGPT (GPT-6) <chatgpt@openai.com>
|
Hi @petercorke, thanks for the detailed review. I've updated the branch to address all three points: shared I also added regression tests for the parent graph, RNE/Coriolis and Panda gripper FK consistency. The revised head is ChatGPT assisted with code review and test preparation. |
Summary
Fixes #730.
Copied URDF/ETS robots can retain references to links in the original robot, causing
copy().rne()to fail. The same problem affectscoriolis()becausenofriction()replaces the copied robot's links with another set of disconnected copies.This PR addresses both root causes:
BaseRobot.__deepcopy__()using the existing parent-name resolution mechanism.nf._links.The test verifies correct parent/child references, unchanged original topology, matching inverse dynamics results, and successful
coriolis()calculations.Validation
Validated commit
fbc9474in [fork CI PR #2](huxiaoyi-ovo#2).Only three files changed. No public API signatures or inverse dynamics equations were modified.