Skip to content

Commit e5804b5

Browse files
committed
Workaround for bug in OpenRAVE.
1 parent 4e395b7 commit e5804b5

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

src/prpy/base/robot.py

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -281,6 +281,14 @@ def do_postprocess():
281281

282282
if prpy.util.HasAffineDOFs(cspec):
283283
affine_dofs = (DOFAffine.X | DOFAffine.Y | DOFAffine.RotationAxis)
284+
285+
# Bug in OpenRAVE ExtractUsedIndices function makes
286+
# dof_indices = affine_dofs. Temporary workaround for that bug.
287+
dof_indices = []
288+
logger.warning(
289+
'Trajectory contains affine DOFs. Any regular DOFs'
290+
' will be ignored.'
291+
)
284292
else:
285293
affine_dofs = 0
286294

@@ -291,7 +299,7 @@ def do_postprocess():
291299
cloned_robot.GetName(), list(dof_indices), affine_dofs
292300
)
293301

294-
if dof_indices and affine_dofs:
302+
if len(dof_indices) and affine_dofs:
295303
raise ValueError(
296304
'Trajectory contains both affine and regular DOFs.')
297305
# Special case for timing affine-only trajectories.

0 commit comments

Comments
 (0)