Skip to content

Commit d56878e

Browse files
committed
Allow translation of SE(n) to be set directly
1 parent 01568eb commit d56878e

1 file changed

Lines changed: 6 additions & 0 deletions

File tree

spatialmath/pose3d.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -832,6 +832,12 @@ def t(self):
832832
else:
833833
return np.array([x[:3, 3] for x in self.A])
834834

835+
@t.setter
836+
def t(self, v):
837+
if len(self) > 1:
838+
raise ValueError("can only assign translation to length 1 object")
839+
v = base.getvector(v, 3)
840+
self.A[:3, 3] = v
835841
# ------------------------------------------------------------------------ #
836842

837843
def inv(self):

0 commit comments

Comments
 (0)