# HG changeset patch # User Nicolas Saunier # Date 1360616355 18000 # Node ID ba29bd82bd04d54a811bb987940b0e28aeccc04a # Parent 1f253f218b9f67b6293d1d5475dbf110e9628aa0 added option to disable computation of crossing zones diff -r 1f253f218b9f -r ba29bd82bd04 python/prediction.py --- a/python/prediction.py Fri Feb 08 18:35:24 2013 -0500 +++ b/python/prediction.py Mon Feb 11 15:59:15 2013 -0500 @@ -190,7 +190,7 @@ t += 1 return t, p1, p2 -def computeCrossingsCollisionsAtInstant(currentInstant, obj1, obj2, predictionParameters, collisionDistanceThreshold, timeHorizon, debug = False): +def computeCrossingsCollisionsAtInstant(currentInstant, obj1, obj2, predictionParameters, collisionDistanceThreshold, timeHorizon, computeCZ = False, debug = False): '''returns the lists of collision points and crossing zones Check: Predicting all the points together, as if they represent the whole vehicle''' @@ -205,7 +205,7 @@ if t <= timeHorizon: collisionPoints.append(SafetyPoint((p1+p2).multiply(0.5), et1.probability*et2.probability, t)) - else: # check if there is a crossing zone + elif computeCZ: # check if there is a crossing zone # TODO? zone should be around the points at which the traj are the closest # look for CZ at different times, otherwise it would be a collision # an approximation would be to look for close points at different times, ie the complementary of collision points