def testSplineTrajectories():
    for i in range(100):
        t = randomTimeSequence()
        p = TimeSeries(t, randomPositionSequence(t))
        r = TimeSeries(t, randomRotationSequence(t))
        T = SplinedTrajectory(SampledTrajectory(p, r), smoothRotations=False)
        yield checkTrajectory, T, p, r
        T = SplinedTrajectory(SampledTrajectory(p, r), smoothRotations=True)
        yield checkTrajectory, T, p, TimeSeries(t, r.values.smoothed())
def testVectorSpline():
    for order in (1, 3, 5):
        for i in range(10):
            x = randomTimeSequence()
            y = randomPositionSequence(x)
            yield checkVectorSpline, UnivariateVectorSpline, x, y, order
            validity = randomValidity(x)
            yn = invalidate(y, validity)
            yield checkVectorSpline, PartialInputVectorSpline, x, yn, order
Example #3
0
def testSplineTrajectories():
    for i in range(100):
        t = randomTimeSequence()
        p = TimeSeries(t, randomPositionSequence(t))
        r = TimeSeries(t, randomRotationSequence(t))
        T = SplinedTrajectory(SampledTrajectory(p, r), smoothRotations=False)
        yield checkTrajectory, T, p, r
        T = SplinedTrajectory(SampledTrajectory(p, r), smoothRotations=True)
        yield checkTrajectory, T, p, TimeSeries(t, r.values.smoothed())
def testVectorSpline():
    for order in (1, 3, 5):
        for i in range(10):
            x = randomTimeSequence()
            y = randomPositionSequence(x)
            yield checkVectorSpline, UnivariateVectorSpline, x, y, order
            validity = randomValidity(x)
            yn = invalidate(y, validity)
            yield checkVectorSpline, PartialInputVectorSpline, x, yn, order