Skip to content

Commit 672650f

Browse files
committed
add a link copy method
1 parent 8bb9ac5 commit 672650f

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

roboticstoolbox/robot/ELink.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,13 @@ def __str__(self):
6060
parent = f" [{self.parent.name}]"
6161
return f"{name}[{self.name}({parent}): {self.ets()}] "
6262

63+
def copy(self):
64+
new = super().copy()
65+
# invalidate references to parent, child
66+
new._parent = None
67+
new._children = []
68+
return new
69+
6370
@property
6471
def v(self):
6572
"""

0 commit comments

Comments
 (0)