Skip to content

Commit aee3420

Browse files
author
David Butterworth
committed
In GetLinearCollisionCheckPts() handle unknown sampling methods.
1 parent aa8cd6e commit aee3420

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

src/prpy/util.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1303,14 +1303,19 @@ def GetLinearCollisionCheckPts(robot, traj, norm_order=2, sampling_order=None):
13031303
traj_duration = temp_traj.GetDuration()
13041304

13051305
# Sample the trajectory using the specified sequence
1306+
if sampling_order == None:
1307+
sampling_order = 'linear'
13061308
seq = None
13071309
if sampling_order == 'van_der_corput':
13081310
# An approximate Van der Corput sequence, between the
13091311
# start and end points
13101312
seq = VanDerCorputSampleGenerator(0, traj_duration, step=2)
1311-
else: # sampling_order='linear'
1313+
elif sampling_order == 'linear':
13121314
# (default) Linear sequence, from start to end
13131315
seq = SampleTimeGenerator(0, traj_duration, step=2)
1316+
else:
1317+
error = "Unknown sampling_order '" + sampling_order + "' "
1318+
raise ValueError(error)
13141319

13151320
# Sample the trajectory in time
13161321
# and return time value and joint positions

0 commit comments

Comments
 (0)