use of artisynth.core.probes.NumericOutputProbe in project artisynth_core by artisynth.
the class ForceTargetDemo method addConForceProbe.
public void addConForceProbe(double duration, double interval) {
ArrayList<Property> props = new ArrayList<Property>();
for (BodyConnector rbc : mech.bodyConnectors()) {
if (rbc.isEnabled() && rbc.getProperty("activation") != null) {
props.add(rbc.getProperty("activation"));
}
}
Property[] proparray = new Property[props.size()];
for (int i = 0; i < props.size(); i++) {
proparray[i] = props.get(i);
}
String name = "conforce";
NumericOutputProbe p = new NumericOutputProbe(proparray, interval);
p.setStartStopTimes(0, duration);
p.setName(name);
p.setAttachedFileName(name + "_output.txt");
p.setDefaultDisplayRange(-0.1, 0.1);
addOutputProbe(p);
}
use of artisynth.core.probes.NumericOutputProbe in project artisynth_core by artisynth.
the class FemMuscleArm method addProbes.
public void addProbes() {
NumericInputProbe ip;
NumericOutputProbe op;
double rate = 0.01;
try {
ip = new NumericInputProbe(model, "models/muscle:excitation", 0, 2.0);
ip.addData(new double[] { 0, 0, 1, 0.5, 2, 0 }, NumericInputProbe.EXPLICIT_TIME);
ip.setName("Muscle Activation");
addInputProbe(ip);
op = new NumericOutputProbe(model, "frameMarkers/endPoint:displacement", 0, 2, -1);
op.setName("End Point Displacement");
addOutputProbe(op);
} catch (Exception e) {
System.out.println(e.getMessage());
}
}
Aggregations