Skip to content

Commit 2b42eb0

Browse files
committed
[coordinates] Add copy method to coordinates
1 parent 17972d8 commit 2b42eb0

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

robot/coordinates.py

+5
Original file line numberDiff line numberDiff line change
@@ -229,7 +229,12 @@ def rotate(self, theta, axis=None, wrt="local"):
229229
raise ValueError('wrt {} not supported'.format(wrt))
230230
return self.newcoords(self.rot, self.pos)
231231

232+
def copy(self):
233+
return self.copy_coords()
234+
232235
def copy_coords(self):
236+
"""Returns a deep copy of the Coordinates.
237+
"""
233238
return Coordinates(pos=copy.deepcopy(self.worldpos()),
234239
rot=copy.deepcopy(self.worldrot()))
235240

0 commit comments

Comments
 (0)