Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 903c9e8

Browse filesBrowse files
committed
Translation ordering convention.
1 parent e5daa93 commit 903c9e8
Copy full SHA for 903c9e8

File tree

Expand file treeCollapse file tree

1 file changed

+7
-2
lines changed
Filter options
Expand file treeCollapse file tree

1 file changed

+7
-2
lines changed

‎spatialmath/pose3d.py

Copy file name to clipboardExpand all lines: spatialmath/pose3d.py
+7-2Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1169,7 +1169,7 @@ def yaw_SE2(self, order: str = "zyx") -> SE2:
11691169
:param order: angle sequence order, default to 'zyx'
11701170
:type order: str
11711171
:return: SE(2) with same rotation as the yaw angle using the roll-pitch-yaw convention,
1172-
and translation in x,y.
1172+
and translation along the roll-pitch axes.
11731173
:rtype: SE2 instance
11741174
11751175
Roll-pitch-yaw corresponds to successive rotations about the axes specified by ``order``:
@@ -1186,7 +1186,12 @@ def yaw_SE2(self, order: str = "zyx") -> SE2:
11861186
11871187
"""
11881188
if len(self) == 1:
1189-
return SE2(self.x, self.y, self.rpy(order = order)[2])
1189+
if order in "zyx":
1190+
return SE2(self.x, self.y, self.rpy(order = order)[2])
1191+
elif order in "xyz":
1192+
return SE2(self.z, self.y, self.rpy(order = order)[2])
1193+
elif order in "yxz":
1194+
return SE2(self.z, self.x, self.rpy(order = order)[2])
11901195
else:
11911196
return SE2([e.yaw_SE2() for e in self])
11921197

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.