Mercurial > hg > nsaunier > traffic-intelligence
comparison python/tests/prediction.txt @ 945:05d4302bf67e
working motion pattern prediction with rotation and features
| author | Nicolas Saunier <nicolas.saunier@polymtl.ca> |
|---|---|
| date | Thu, 20 Jul 2017 14:29:46 -0400 |
| parents | ab13aaf41432 |
| children | 933670761a57 |
comparison
equal
deleted
inserted
replaced
| 944:84ebe1b031f1 | 945:05d4302bf67e |
|---|---|
| 52 >>> absolute(et.initialSpeed - proto.getVelocityAt(10).norm2()*0.9) < 1e-5 | 52 >>> absolute(et.initialSpeed - proto.getVelocityAt(10).norm2()*0.9) < 1e-5 |
| 53 True | 53 True |
| 54 >>> for t in xrange(int(proto.length())): x=et.predictPosition(t) | 54 >>> for t in xrange(int(proto.length())): x=et.predictPosition(t) |
| 55 >>> traj = et.getPredictedTrajectory() | 55 >>> traj = et.getPredictedTrajectory() |
| 56 >>> traj.computeCumulativeDistances() | 56 >>> traj.computeCumulativeDistances() |
| 57 >>> (absolute(array(traj.distances) - et.initialSpeed) < 1e-5).all() | 57 >>> absolute(array(traj.distances).mean() - et.initialSpeed < 1e-3) |
| 58 True | 58 True |
| 59 | 59 |
| 60 >>> et = PredictedTrajectoryPrototype(proto.getPositionAt(10)+moving.Point(0.6, 0.6), proto.getVelocityAt(10)*0.7, proto, False) | 60 >>> et = PredictedTrajectoryPrototype(proto.getPositionAt(10)+moving.Point(0.6, 0.6), proto.getVelocityAt(10)*0.7, proto, False) |
| 61 >>> absolute(et.initialSpeed - proto.getVelocityAt(10).norm2()*0.7) < 1e-5 | 61 >>> absolute(et.initialSpeed - proto.getVelocityAt(10).norm2()*0.7) < 1e-5 |
| 62 True | 62 True |
