use of artisynth.core.probes.NumericInputProbe in project artisynth_core by artisynth.
the class MuscleArm method addProbes.
public void addProbes() {
NumericInputProbe ip;
NumericOutputProbe op;
double rate = 0.01;
try {
String path = ArtisynthPath.getHomeRelativePath("src/artisynth/demos/mech/", ".");
ip = new NumericInputProbe(model, "axialSprings/muscle:excitation", path + "muscleArmActivation.txt");
ip.setStartStopTimes(0, 10.0);
ip.setName("Muscle Activation");
// ip.setActive (false);
addInputProbe(ip);
// op = new NumericOutputProbe(model,
// "axialSprings/muscle/forceNorm",
// "muscleForce.txt", rate);
// op.setName("Muscle Force");
// op.setStartStopTimesSec (0, 10.0);
// addOutputProbe(op);
// op = new NumericOutputProbe(model,
// "frameMarkers/endPoint/displacement",
// "displacement.txt", rate);
// op.setName("End Point Displacement");
// op.setStartStopTimesSec (0, 10.0);
// addOutputProbe(op);
} catch (Exception e) {
System.out.println(e.getMessage());
}
}
use of artisynth.core.probes.NumericInputProbe in project artisynth_core by artisynth.
the class NetDemo method addPanProbe.
public void addPanProbe() {
try {
NumericInputProbe inprobe = new NumericInputProbe(this, "viewerEye", 0, 6);
double z = 0.8;
inprobe.addData(computePanData(-38, 24, 180.0, 6.0, 16), NumericInputProbe.EXPLICIT_TIME);
addInputProbe(inprobe);
} catch (Exception e) {
e.printStackTrace();
}
}
use of artisynth.core.probes.NumericInputProbe in project artisynth_core by artisynth.
the class WrappedMuscleArm method addProbes.
public void addProbes() {
NumericInputProbe ip;
NumericOutputProbe op;
double rate = 0.01;
try {
String path = ArtisynthPath.getHomeRelativePath("src/artisynth/demos/mech/", ".");
ip = new NumericInputProbe(model, "multiPointSprings/muscle:excitation", path + "muscleArmActivation.txt");
ip.setStartStopTimes(0, 10.0);
ip.setName("Muscle Activation");
// ip.setActive (false);
addInputProbe(ip);
} catch (Exception e) {
System.out.println(e.getMessage());
}
}
use of artisynth.core.probes.NumericInputProbe in project artisynth_core by artisynth.
the class NetDemoWithPan method addPanProbe.
public void addPanProbe() {
try {
NumericInputProbe inprobe = new NumericInputProbe(this, "viewerEye", 0, 6);
double z = 0.8;
inprobe.addData(computePanData(-38, 24, 180.0, 6.0, 16), NumericInputProbe.EXPLICIT_TIME);
addInputProbe(inprobe);
} catch (Exception e) {
e.printStackTrace();
}
}
use of artisynth.core.probes.NumericInputProbe in project artisynth_core by artisynth.
the class InverseManager method findOrCreateInputProbe.
public static NumericInputProbe findOrCreateInputProbe(RootModel root, String name) {
NumericInputProbe inProbe;
Probe p = root.getInputProbes().get(name);
if (p != null && p instanceof NumericInputProbe) {
inProbe = (NumericInputProbe) p;
} else {
inProbe = new NumericInputProbe();
inProbe.setName(name);
root.addInputProbe(inProbe);
}
return inProbe;
}
Aggregations