Search in sources :

Example 11 with NumericInputProbe

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());
    }
}
Also used : NumericInputProbe(artisynth.core.probes.NumericInputProbe) NumericOutputProbe(artisynth.core.probes.NumericOutputProbe) IOException(java.io.IOException)

Example 12 with NumericInputProbe

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();
    }
}
Also used : NumericInputProbe(artisynth.core.probes.NumericInputProbe)

Example 13 with NumericInputProbe

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());
    }
}
Also used : NumericInputProbe(artisynth.core.probes.NumericInputProbe) NumericOutputProbe(artisynth.core.probes.NumericOutputProbe) IOException(java.io.IOException)

Example 14 with NumericInputProbe

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();
    }
}
Also used : NumericInputProbe(artisynth.core.probes.NumericInputProbe)

Example 15 with NumericInputProbe

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;
}
Also used : NumericInputProbe(artisynth.core.probes.NumericInputProbe) NumericOutputProbe(artisynth.core.probes.NumericOutputProbe) Probe(artisynth.core.probes.Probe) NumericInputProbe(artisynth.core.probes.NumericInputProbe)

Aggregations

NumericInputProbe (artisynth.core.probes.NumericInputProbe)19 NumericOutputProbe (artisynth.core.probes.NumericOutputProbe)9 IOException (java.io.IOException)8 Property (maspack.properties.Property)5 File (java.io.File)4 ArrayList (java.util.ArrayList)3 ModelComponent (artisynth.core.modelbase.ModelComponent)2 WayPoint (artisynth.core.probes.WayPoint)2 ControlPanel (artisynth.core.gui.ControlPanel)1 Displayable (artisynth.core.gui.Displayable)1 AddComponentsCommand (artisynth.core.gui.editorManager.AddComponentsCommand)1 InputNumericProbeEditor (artisynth.core.gui.probeEditor.InputNumericProbeEditor)1 NumericProbeEditor (artisynth.core.gui.probeEditor.NumericProbeEditor)1 OutputNumericProbeEditor (artisynth.core.gui.probeEditor.OutputNumericProbeEditor)1 TargetPoint (artisynth.core.inverse.TargetPoint)1 CollisionManager (artisynth.core.mechmodels.CollisionManager)1 Frame (artisynth.core.mechmodels.Frame)1 MechModel (artisynth.core.mechmodels.MechModel)1 Point (artisynth.core.mechmodels.Point)1 NumericProbeBase (artisynth.core.probes.NumericProbeBase)1