Skip to content

Commit 29f7683

Browse files
committed
Changed GetDuration=0.0 error to warning.
Currently, there are multiple non-compliant algorithms in the post-processing pipeline that generate multiple-waypoint trajectories. We will need to keep this as a warning until they are updated.
1 parent e0a2067 commit 29f7683

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/prpy/base/robot.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -459,7 +459,10 @@ def ExecuteTrajectory(self, traj, defer=False, timeout=None, period=0.01, **kwar
459459

460460
# Verify that the trajectory is timed.
461461
if traj.GetDuration() <= 0.0:
462-
raise ValueError('Attempted to execute untimed trajectory.')
462+
import warnings
463+
warnings.warn('Executing zero-length trajectory. Please update the'
464+
' function that produced this trajectory to return a'
465+
' single-waypoint trajectory.', FutureWarning)
463466

464467
# TODO: Check if this trajectory contains the base.
465468
needs_base = util.HasAffineDOFs(traj.GetConfigurationSpecification())

0 commit comments

Comments
 (0)