39 lines
1.1 KiB
JavaScript
Executable File
39 lines
1.1 KiB
JavaScript
Executable File
module.exports = class RobotMotorPosition{
|
|
|
|
|
|
constructor(x, y, z, a, b, c, e = 0.0){
|
|
this.x = x; // X-Motor
|
|
this.y = y; // Y-Motor
|
|
this.z = z;
|
|
|
|
this.a = a; // A-Motor: Ellbow-LowerArm turner
|
|
this.b = b; // B-Motor: Hand up-down
|
|
this.c = c; // C-Motor: Hand twist
|
|
|
|
this.e = e; // Finger open
|
|
|
|
// Handgelenk-Punkt-Koordinaten (für Speed-Berechnung)
|
|
this.pX = 0; // Handgelenk X-Position in mm
|
|
this.pY = 0; // Handgelenk Y-Position in mm
|
|
this.pZ = 0; // Handgelenk Z-Position in mm
|
|
|
|
this.time = Date.now();
|
|
|
|
this.xMotorChanged = false;
|
|
this.yMotorChanged = false;
|
|
this.zMotorChanged = false;
|
|
this.aMotorChanged = false;
|
|
this.bMotorChanged = false;
|
|
this.cMotorChanged = false;
|
|
this.eMotorChanged = false;
|
|
|
|
// Geschwindigkeiten in Einheiten pro Minute
|
|
this.speeds = {x: 0, y: 0, z: 0, a: 0, b: 0, c: 0, e: 0};
|
|
|
|
// Feedrate in mm/min
|
|
this.feedrate = 0;
|
|
}
|
|
|
|
}
|
|
|