# HG changeset patch # User Mohamed Gomaa # Date 1367509044 14400 # Node ID 480c8edf177ec3181deb10df26ea1d33a48f5f42 # Parent e1f3b789c632630caf62a38c3f154921a6090046 condition to make the minTTC is zero not 1 -need to refine- diff -r e1f3b789c632 -r 480c8edf177e python/prediction.py --- a/python/prediction.py Thu May 02 11:35:45 2013 -0400 +++ b/python/prediction.py Thu May 02 11:37:24 2013 -0400 @@ -204,6 +204,7 @@ Index=np.unravel_index(distance.argmin(), distance.shape) involvedPosition1= p1[Index[0]] involvedPosition2= p2[Index[1]] + t=[0 if t==1 else t][0] # condition to make the minimum value equal zero (Need to refine) return t, involvedPosition1, involvedPosition2 else: t = 1 @@ -213,6 +214,7 @@ p1 = predictedTrajectory1.predictPosition(t) p2 = predictedTrajectory2.predictPosition(t) t += 1 + t=[0 if t==1 else t][0] # condition to make the minimum value equal zero (Need to refine) return t, p1, p2 def computeCrossingsCollisionsAtInstant(currentInstant, obj1, obj2, predictionParameters, collisionDistanceThreshold, timeHorizon, computeCZ = False, debug = False, asWholeVehicle=False):