Migrated from tech-debt.md (deleted, see repo history via git log -- tech-debt.md).
Link.__deepcopy__ silently drops coal CollisionObject instances because the coal library doesn't support pickling. The current workaround warns at runtime when shapes are lost.
Root cause: a fresh DHLink can reach the coal objects of an unrelated URDF robot through shared class-level state in Link or Robot (exact attribute TBD). This means:
- Copied DH links that happen to run after URDF robot tests lose nothing (DH links have no collision shapes), so the warning path is never exercised in isolation.
- If the shared reference is ever followed for other purposes (iteration, serialisation) it could cause similar failures or unexpected aliasing.
Proper fix: obtain the full deepcopy traceback with --tb=long when running test_ERobot.py followed by test_Link.py::TestDHLink::test_copy, trace which attribute chain connects the fresh DHLink to a coal object, and remove or weak-ref that shared state.
Migrated from
tech-debt.md(deleted, see repo history viagit log -- tech-debt.md).Link.__deepcopy__silently drops coalCollisionObjectinstances because the coal library doesn't support pickling. The current workaround warns at runtime when shapes are lost.Root cause: a fresh
DHLinkcan reach the coal objects of an unrelated URDF robot through shared class-level state inLinkorRobot(exact attribute TBD). This means:Proper fix: obtain the full
deepcopytraceback with--tb=longwhen runningtest_ERobot.pyfollowed bytest_Link.py::TestDHLink::test_copy, trace which attribute chain connects the freshDHLinkto a coal object, and remove or weak-ref that shared state.