Closed JRegimbal closed 1 year ago
Below are parameters that can be adjusted for different force performance in the worker files
var rBall = 0.02; // ball
var mBall = 0.15; // mass (kg)
var kBall = 800; // spring constant (N/m)
var bBall = 3.7; // damping coefficient (kg/s)
var bAir = 0.0; // air damping coefficient (kg/s)
var kDot = 2500; // spring constant (N/m)
var bDot = 5; // damping coefficient (kg/s)
var rDot = 0.001;
var distBtwnRows = 0.005;
var distBtwnCols = 0.005;
var start = new Vector(-14 * distBtwnCols, 9 * distBtwnRows);
//preferably not above (-0.07, 0.045)
var end = new Vector(14 * distBtwnCols, 26 * distBtwnRows);
// preferably not below (0.07, 0.13)
// magnitude of the force
var kp = 0.15; // kp += 0.01;
var ki = 1.2; // ki += 0.00001;
var kd = 1.5; // kd += 0.1;
fCalc.x = constrain(kp * error.x + ki * cumError.x + kd * diff.x, -4, 4) * -1;
fCalc.y = constrain(kp * error.y + ki * cumError.y + kd * diff.y, -4, 4);
// may adjust the max and min value of the constrain force
// how randy looks like in js file
randy.x = randGen(-0.07, 0.05);
randy.y = randGen(0.045, 0.1);
var kp = 0.06; // kp += 0.01;
var ki = 3.1; // ki += 0.00001;
var kd = 4.5; // kd += 0.1;
const starArray = [
[0.0, 0.03], [0.01, 0.05], [0.03, 0.06], [0.01, 0.07], [0.0, 0.09],
[-0.01, 0.07], [-0.03, 0.06], [-0.01, 0.05], [0.0, 0.03]
]
var bAir = 0; // air
var bTopLeft = 0; // top left quadrant
var bTopRight = 1.2; // top right quadrant
var bBotLeft = 0; // bottom left quadrant
var bBotRight = 1.2; // bottom right quadrant
var posWallVer = new Vector(0.0, 0.12);
var posWallHor = new Vector(0.07, 0.07);
fCalc.x = constrain(0.4*fEnv.x + 0.3*fEnvLast.x + 0.2*fEnvLastLast.x + 0.1*fEnvLastLastLast.x, -6, 6) * -1;
fCalc.y = constrain(0.4*fEnv.y + 0.3*fEnvLast.y + 0.2*fEnvLastLast.y + 0.1*fEnvLastLastLast.y, -6, 6);
var bAir = 0; // air
var bTopLeft = 1; // top left quadrant
var bTopRight = 4; // top right quadrant
var bBotLeft = 1; // bottom left quadrant
var bBotRight = 4; // bottom right quadrant
var posWallVer = new Vector(0.0, 0.12);
var posWallHor = new Vector(0.07, 0.07);
fCalc.x = constrain(0.4*fEnv.x + 0.3*fEnvLast.x + 0.2*fEnvLastLast.x + 0.1*fEnvLastLastLast.x, -6, 6) * -1;
fCalc.y = constrain(0.4*fEnv.y + 0.3*fEnvLast.y + 0.2*fEnvLastLast.y + 0.1*fEnvLastLastLast.y, -6, 6);
var kp = 0.06; // kp += 0.01;
var ki = 3.1; // ki += 0.00001;
var kd = 4.5; // kd += 0.1;
const pArray1 = [[-0.05, 0.035], [0.05, 0.06]]
const pArray2 = [[0.05, 0.075], [-0.05, 0.1]]
fCalc.x = constrain(kp * error.x + ki * cumError.x + kd * diff.x, -4, 4) * -1;
fCalc.y = constrain(kp * error.y + ki * cumError.y + kd * diff.y, -4, 4);
var kWall = 1500; // spring constant (N/m)
var bWall = 20; // damping coefficient (kg/s)
var kWall = 3500; // spring constant (N/m)
var bWall = 5; // damping coefficient (kg/s)
var distBtwnWalls = 0.005;
Below are files that are not tested with version 3 Haptic. I change some parameters to make them work with version 3 Haptic; some parameters can vary in a range to give a different experience.
var kDot = 380-1200;
var bDot = 0.5;
kDot
can vary from 380-1200 to experience the different magnitudes of the force.
380-600
: the user can experience a slight bumping feeling when moving across the dots. If the user releases the end effector, it will shake slightly and stop.600-1000
: the user can experience a moderate bumping feeling. If the user releases the end effector, it will shake moderately and stop.1000-1200
: the user can experience a substantial bumping feeling; it becomes tough to follow a straight line. If the user releases the end effort, it will shake substantially and will not stop.kDot
value by around 150-200 can have distinct feelings. var bTopLeft = 0; // top left quadrant
var bTopRight = 0.7-1.1; //bottom left quadrant
var bBotRight = 0.7-1.1; // bottom right quadrant
bTopRight
and bBotRight
can change from 0.7-0.9 to experience different levels of skidding. Sometimes, the end effect may suddenly accelerate from left to right.
var bTopRight = 0.7-0.9; var bBotRight = 0.7-0.9;
: when the user moves from left to right very fast, the user can experience an acceleration, which will not make the end effector reach its boundary. var bTopRight = 0.9-1.1; var bBotRight = 0.9-1.1;
: when the user moves from left to right at a moderate speed, the user can experience an acceleration, which will not make the end effector reach its boundary. When the user moves from left to right fast, the user can experience more significant acceleration, making the end effector get its edge. If the user moves back and forth quickly on the right side, the acceleration will make the end effector hard to controlkDot
value by around 0.1
can have distinct feelings, but if the moving speed is not big enough, no matter how large the 'kDot` is, the user will not experience the acceleration.var bTopLeft = 0.6-1.8;
var bTopRight = 0.6-1.8;
var bBotLeft = 0.6-1.8;
var bBotRight = 0.6-1.8;
All parameters above can vary in the 0.6-1.8 range to experience a "jelly" feeling; the more significant the difference between the right and left parameters, the more viscosity the user can feel.
0.6-1.0
: The user will have a different feeling than moving on normal texture, but this feeling is not apparent.1.0-1.4
: The user will find moving more challenging than the first level, and the feeling is apparent.1.0-1.8
: The user will find moving more challenging than the first level, and the feeling is apparent.bTopLeft
or bTopRight
or bBotLeft
or bBotRight
by around 0.3 will give the user distinct feelings.var kWall = 1000 - 3500;
var bWall = 1;
The value of kWall
can vary from 1000 - 3500; the more significant the bumping force the user can feel when passing through the stripes.
var kWall = 1000 - 1500;
: if the user moves slowly, the user will feel the bumping force will get over a stripe. If the user is moving fast, the user will not feel anythingvar wall = 1500-2000;
: if the user moves slowly, the user will feel the bumping force, and the end effector will fluctuate. If the user is moving fast, the bumping force is not distinct.var wall = 2000-3500;
: if the user moves slowly, the user will feel the bumping force, bringing the end effector to the next stripe. If the user is moving fast, the bumping force becomes more distinct.kWall
by 300 will give the user distinct feelings.@hanzili could you please add some more information about how these effects feel with parameters adjusted within these ranges?
@hanzili would you mind clarifying how distinguishable the values are in these ranges and, if possible, how many discrete values can be felt within them?
@hanzili would you mind clarifying how distinguishable the values are in these ranges and, if possible, how many discrete values can be felt within them?
Done! I have added different levels of feelings for each example and how much should be changed to produce different feelings. ;)
Excellent, thank you Hanzi!
Not all the examples were able to be tested with the new 2diy model. These should all be tested and their parameters should be adjusted to determine usable ranges and levels. This is especially true for the untested examples that are checked in to use the old model (
newPantograph = 0
).Updates and conclusions should be posted in response to this issue. A PR may be necessary for changes to defaults to accommodate the new hardware. This issue will be completed when all examples have been tested.