comparison python/prediction.py @ 665:15e244d2a1b5

corrected bug with circular import for VideoFilenameAddable, moved to base module
author Nicolas Saunier <nicolas.saunier@polymtl.ca>
date Wed, 20 May 2015 13:57:47 +0200
parents 72174e66aba5
children 9a258687af4c
comparison
equal deleted inserted replaced
664:455f9b93819c 665:15e244d2a1b5
1 #! /usr/bin/env python 1 #! /usr/bin/env python
2 '''Library for motion prediction methods''' 2 '''Library for motion prediction methods'''
3 3
4 import moving 4 import moving
5 import math 5 from utils import LCSS
6 import random 6
7 import math, random
7 import numpy as np 8 import numpy as np
8 from utils import LCSS 9
9 10
10 class PredictedTrajectory: 11 class PredictedTrajectory(object):
11 '''Class for predicted trajectories with lazy evaluation 12 '''Class for predicted trajectories with lazy evaluation
12 if the predicted position has not been already computed, compute it 13 if the predicted position has not been already computed, compute it
13 14
14 it should also have a probability''' 15 it should also have a probability'''
15 16
292 savePredictedTrajectoriesFigure(currentInstant, obj1, obj2, predictedTrajectories1, predictedTrajectories2, timeHorizon) 293 savePredictedTrajectoriesFigure(currentInstant, obj1, obj2, predictedTrajectories1, predictedTrajectories2, timeHorizon)
293 294
294 return currentInstant, collisionPoints, crossingZones 295 return currentInstant, collisionPoints, crossingZones
295 296
296 297
297 class PredictionParameters: 298 class PredictionParameters(object):
298 def __init__(self, name, maxSpeed): 299 def __init__(self, name, maxSpeed):
299 self.name = name 300 self.name = name
300 self.maxSpeed = maxSpeed 301 self.maxSpeed = maxSpeed
301 302
302 def __str__(self): 303 def __str__(self):