Skip to content

Commit 5cf96d8

Browse files
committed
Pass se3_log_map in two pieces
1 parent af9b677 commit 5cf96d8

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

diffdrr/pose.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,9 @@ def convert(*args, parameterization, convention=None) -> RigidTransform:
111111
quaternion = rotation_10d_to_quaternion(rotation)
112112
return convert(quaternion, translation, parameterization="quaternion")
113113
elif parameterization == "se3_log_map":
114-
matrix = se3_exp_map(args[0]).mT
114+
rotation, translation = args
115+
params = torch.concat([translation, rotation], axis=-1)
116+
matrix = se3_exp_map(params).mT
115117
else:
116118
raise ValueError(f"Must be in {PARAMETERIZATIONS}, not {parameterization}")
117119

notebooks/api/06_pose.ipynb

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -219,7 +219,9 @@
219219
" quaternion = rotation_10d_to_quaternion(rotation)\n",
220220
" return convert(quaternion, translation, parameterization=\"quaternion\")\n",
221221
" elif parameterization == \"se3_log_map\":\n",
222-
" matrix = se3_exp_map(args[0]).mT\n",
222+
" rotation, translation = args\n",
223+
" params = torch.concat([translation, rotation], axis=-1)\n",
224+
" matrix = se3_exp_map(params).mT\n",
223225
" else:\n",
224226
" raise ValueError(f\"Must be in {PARAMETERIZATIONS}, not {parameterization}\")\n",
225227
"\n",

0 commit comments

Comments
 (0)