Exemplo n.º 1
0
        public void TestWithIkJumpThreshold()
        {
            var builder    = new TaskSpacePlanParameters.Builder();
            var parameters = new TaskSpacePlanParameters(builder);

            Assert.Equal(5, parameters.WithIkJumpThreshold(5).IkJumpThreshold);
            Assert.Equal(-3, parameters.WithIkJumpThreshold(-3).IkJumpThreshold);
        }
Exemplo n.º 2
0
        public void TestWithMaxDeviation()
        {
            var builder    = new TaskSpacePlanParameters.Builder();
            var parameters = new TaskSpacePlanParameters(builder);

            Assert.Equal(5, parameters.WithMaxDeviation(5).MaxDeviation);
            Assert.Equal(-3, parameters.WithMaxDeviation(-3).MaxDeviation);
        }
Exemplo n.º 3
0
        public void TestWithSampleResolution()
        {
            var builder    = new TaskSpacePlanParameters.Builder();
            var parameters = new TaskSpacePlanParameters(builder);

            Assert.Equal(5, parameters.WithSampleResolution(5).SampleResolution);
            Assert.Equal(-3, parameters.WithSampleResolution(-3).SampleResolution);
        }
Exemplo n.º 4
0
        public void TestWithCollision()
        {
            var builder    = new TaskSpacePlanParameters.Builder();
            var parameters = new TaskSpacePlanParameters(builder);

            Assert.True(parameters.WithCollisionCheck(true).CollisionCheck);
            Assert.False(parameters.WithCollisionCheck(false).CollisionCheck);
        }
Exemplo n.º 5
0
        public void TestScaleAcceleration()
        {
            var builder = new TaskSpacePlanParameters.Builder
            {
                MaxAngularAcceleration = 1000,
                MaxXYZAcceleration     = -4
            };

            Assert.Throws <ArgumentOutOfRangeException>(() => builder.ScaleAcceleration(1.1));
            Assert.Throws <ArgumentOutOfRangeException>(() => builder.ScaleAcceleration(-0.1));
            Assert.Equal(250, builder.ScaleAcceleration(0.25).MaxAngularAcceleration);
            Assert.Equal(-0.25, builder.ScaleAcceleration(0.25).MaxXYZAcceleration);
        }
Exemplo n.º 6
0
        public void TestScaleVelocity()
        {
            var builder = new TaskSpacePlanParameters.Builder
            {
                MaxAngularVelocity = 1000,
                MaxXYZVelocity     = -4
            };

            Assert.Throws <ArgumentOutOfRangeException>(() => builder.ScaleVelocity(1.1));
            Assert.Throws <ArgumentOutOfRangeException>(() => builder.ScaleVelocity(-0.1));
            Assert.Equal(250, builder.ScaleVelocity(0.25).MaxAngularVelocity);
            Assert.Equal(-0.25, builder.ScaleVelocity(0.25).MaxXYZVelocity);
        }