Your message
This commit is contained in:
@@ -27,7 +27,7 @@ test('Handgelenk Position', () => {
|
||||
|
||||
});
|
||||
|
||||
test('Winkel Oberarm/Unterarm Dreieckck', () => {
|
||||
test('Winkel Oberarm/Unterarm Dreieck', () => {
|
||||
|
||||
robot = new Robot(300,300,30)
|
||||
|
||||
@@ -38,6 +38,24 @@ test('Winkel Oberarm/Unterarm Dreieckck', () => {
|
||||
robot.theta = 0;
|
||||
robot.calculateAngles3D();
|
||||
|
||||
expect(Math.abs(robot.alpha*2 + robot.beta - Math.PI)).toBeLessThanOrEqual(0.0001)
|
||||
});
|
||||
|
||||
test('Winkel Oberarm/Unterarm Dreieckck', () => {
|
||||
|
||||
robot = new Robot(300,300,30)
|
||||
|
||||
robot.x = robot.l1 + robot.l3;
|
||||
robot.y = 0;
|
||||
robot.z = robot.l2;
|
||||
|
||||
robot.theta = 0;
|
||||
robot.calculateAngles3D();
|
||||
|
||||
expect(Math.abs(robot.alpha*2 + robot.beta - Math.PI)).toBeLessThanOrEqual(0.0001)
|
||||
|
||||
expect(Math.abs(robot.alpha - Math.PI/4)).toBeLessThanOrEqual(0.0001)
|
||||
expect(Math.abs(robot.beta - Math.PI/2)).toBeLessThanOrEqual(0.0001)
|
||||
|
||||
console.log("alpha=", robot.alpha*180/Math.PI, " beta=", robot.beta*180/Math.PI);
|
||||
console.log(robot);
|
||||
});
|
||||
Reference in New Issue
Block a user