Example #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);
        }
Example #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);
        }
Example #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);
        }
Example #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);
        }
Example #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);
        }
Example #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);
        }