Skip to content

Commit d2b5ca0

Browse files
committed
add aliases for common RPY ordering
1 parent c3274f1 commit d2b5ca0

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

spatialmath/base/transforms3d.py

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2416,6 +2416,15 @@ def trprint(
24162416

24172417
# print the angular part in various representations
24182418

2419+
# define some aliases for rpy conventions for arms, vehicles and cameras
2420+
aliases = {
2421+
'arm': 'rpy/xyz',
2422+
'vehicle': 'rpy/zyx',
2423+
'camera': 'rpy/yxz'
2424+
}
2425+
if orient in aliases:
2426+
orient = aliases[orient]
2427+
24192428
a = orient.split("/")
24202429
if a[0] == "rpy":
24212430
if len(a) == 2:

0 commit comments

Comments
 (0)