Mercurial > hg > nsaunier > traffic-intelligence
comparison python/prediction.py @ 860:07c5eab11eba
fixing bug, thanks to Ryan Louie <[email protected]>
| author | Nicolas Saunier <nicolas.saunier@polymtl.ca> |
|---|---|
| date | Sat, 29 Oct 2016 16:34:05 -0400 |
| parents | 8b74a5176549 |
| children | 8ba82b371eea |
comparison
equal
deleted
inserted
replaced
| 859:a8de3c93f6b7 | 860:07c5eab11eba |
|---|---|
| 413 self.maxAcceleration, | 413 self.maxAcceleration, |
| 414 self.maxSteering) | 414 self.maxSteering) |
| 415 | 415 |
| 416 def generatePredictedTrajectories(self, obj, instant): | 416 def generatePredictedTrajectories(self, obj, instant): |
| 417 predictedTrajectories = [] | 417 predictedTrajectories = [] |
| 418 if self.useFeatures and obj.hadFeatures(): | 418 if self.useFeatures and obj.hasFeatures(): |
| 419 features = [f for f in obj.getFeatures() if f.existsAtInstant(instant)] | 419 features = [f for f in obj.getFeatures() if f.existsAtInstant(instant)] |
| 420 positions = [f.getPositionAtInstant(instant) for f in features] | 420 positions = [f.getPositionAtInstant(instant) for f in features] |
| 421 velocities = [f.getVelocityAtInstant(instant) for f in features] | 421 velocities = [f.getVelocityAtInstant(instant) for f in features] |
| 422 else: | 422 else: |
| 423 positions = [obj.getPositionAtInstant(instant)] | 423 positions = [obj.getPositionAtInstant(instant)] |
