public class IKProbe extends NumericControlProbe
Probe.ExportProps, Probe.ImportExportFileInfo
ModelComponent.NavpanelVisibility
Modifier and Type | Field and Description |
---|---|
static boolean |
DEFAULT_BODIES_NON_DYNAMIC_IF_ACTIVE |
static PropertyList |
myProps |
EXPLICIT_TIME
mySmallDisplay
useOldSaveMethod, writeStartStopTimeInSeconds
enforceUniqueCompositeNames, enforceUniqueNames, myNumber, NULL_OBJ, useCompactPathNames
COPY_REFERENCES, REST_POSITION
Constructor and Description |
---|
IKProbe()
Empty constructor required for write/scan.
|
IKProbe(java.lang.String name,
MechModel mech,
java.util.Collection<FrameMarker> mkrs,
VectorNd wgts,
double startTime,
double stopTime) |
IKProbe(java.lang.String name,
MechModel mech,
java.util.Collection<FrameMarker> mkrs,
VectorNd wgts,
java.lang.String fileName) |
Modifier and Type | Method and Description |
---|---|
void |
applyData(VectorNd vec,
double t,
double trel)
Applies the current numeric data of this probe, as input in the argument
vec , and uses it to update the simulation for either
the current absolute time t or probe relative time
trel . |
ModelComponent |
copy(int flags,
java.util.Map<ModelComponent,ModelComponent> copyMap)
Create a copy of this component.
|
PropertyList |
getAllPropertyInfo()
Returns a list giving static information about all properties exported by
this object.
|
boolean |
getBodiesNonDynamicIfActive()
Queries whether the
dynamic property of the bodies associated
with this probe is set false/true depending on whether the probe
is active/inactive. |
double |
getConvergenceTol()
Queries the convergance tolerance used in each IK solve step.
|
java.util.ArrayList<FrameMarker> |
getMarkers()
Returns the markers used by this IKProbe
|
double |
getMassRegularization()
Queries the mass regulaization coefficient for this IKProbe.
|
int |
getMaxIterations()
Queries the maximum number of iterations allowed in each IK solve step.
|
IKSolver |
getSolver()
Returns the IKSolver used by this probe.
|
boolean |
isSettable() |
int |
numMarkers()
Returns the number of markers used by this IKProbe.
|
boolean |
postscanItem(java.util.Deque<ScanToken> tokens,
CompositeComponent ancestor) |
boolean |
scanItem(ReaderTokenizer rtok,
java.util.Deque<ScanToken> tokens) |
void |
setActive(boolean enable) |
void |
setBodiesDynamic(boolean dynamic)
Sets the
dynamic property of all the bodies associated
with this probe. |
void |
setBodiesNonDynamicIfActive(boolean enable)
Sets whether the
dynamic property of the bodies associated with
this probe is set false/true depending on whether the probe is
active/inactive. |
void |
setConvergenceTol(double tol)
Sets the convergance tolerance
tol used in each IK solve step. |
void |
setData(double t) |
void |
setMassRegularization(double c)
Sets the mass regulaization coefficient for this IKProbe.
|
void |
setMaxIterations(int maxi)
Set the maximum number of iterations allowed in each IK solve step.
|
void |
writeItems(java.io.PrintWriter pw,
NumberFormat fmt,
CompositeComponent ancestor)
Write probe attributes to a PrintWriter
|
addData, addData, addData, addData, addData, addData, apply, clone, getCopyReferences, getExtendData, getInput, isInput, load, loadEmpty, postscan, read, save, scan, setAttachedFileName, setAttachedFileName, setExtendData, setVsize, write
createState, getDataFunction, getInitialState, getState, hasState, isCloneable, isDuplicatable, setDataFunction, setState
applyDefaultDisplayRanges, clearData, decreaseDisplayRanges, dispose, export, getAttachedProperties, getData, getDefaultDisplayMax, getDefaultDisplayMin, getDefaultDisplayRange, getDisplay, getDrivers, getExportFileInfo, getExportProps, getFormat, getInterpolation, getInterpolationOrder, getLegend, getMatlabName, getMinMaxValues, getNumericList, getOrderedTraceIndex, getPlotTraceInfo, getRotationRep, getRotationSubvecOffsets, getTraceColor, getTraceLabel, getTraceManager, getValues, getVariables, getVisibleMinMaxValues, getVisibleRange, getVisibleRange, getVsize, importData, importText, increaseDisplayRanges, isDisplayable, isEmpty, isPrintable, isSmallDisplayVisible, isTraceVisible, isValidVariableName, isWritable, loadFromMatlab, print, removeDisplay, removeLegend, resetTraceColors, resetTraceOrder, saveToMatlab, scaleNumericList, setDefaultDisplayRange, setDefaultDisplayRange, setFormat, setInterpolation, setInterpolationOrder, setLegend, setLegendLabels, setScale, setSmallDisplayVisible, setTraceColor, setTraceLabel, setTraceOrder, setTraceVisible, setValues, setValues, smoothWithMovingAverage, smoothWithSavitzkyGolay, swapPlotTraceOrder, updateDisplays, updateDisplays, updateDisplaysForPropertyChanges, updateDisplaysWithoutAutoRanging, writeText
getAttachedFile, getAttachedFileName, getChildren, getClippedVirtualTime, getDefaultScale, getDefaultStartTime, getDefaultStopTime, getDefaultUpdateInterval, getDuration, getExportFile, getExportFileName, getFileFromPath, getImportFile, getImportFileInfo, getImportFileName, getPathFromFile, getProperty, getScale, getStartTime, getStopTime, getTimelineTime, getTrack, getUpdateInterval, getVirtualTime, hasAttachedFile, hasChildren, isAttachedFileRelative, isEditable, isEventTime, isScalable, nextEventTime, setExportFileName, setImportFileName, setInterval, setName, setScalable, setStartStopTimes, setStartTime, setStopTime, setTrack, setUpdateInterval
finalize, getModel, initialize, isActive, setModel, setModelFromComponent, write
checkFlag, checkName, checkNameUniqueness, clearFlag, connectToHierarchy, createTempFlag, disconnectFromHierarchy, getGrandParent, getHardReferences, getName, getNameRange, getNavpanelVisibility, getNavpanelVisibility, getNumber, getParent, getSoftReferences, isFixed, isMarked, isScanning, isSelected, makeValidName, makeValidName, notifyParentOfChange, printReferences, recursivelyContained, recursivelyContains, removeTempFlag, setFixed, setFlag, setMarked, setNavpanelVisibility, setNavpanelVisibility, setNumber, setParent, setScanning, setSelected, setWritable, updateReferences
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
connectToHierarchy, disconnectFromHierarchy, getHardReferences, getName, getNavpanelVisibility, getNumber, getParent, getSoftReferences, isFixed, isMarked, isSelected, notifyParentOfChange, setFixed, setMarked, setName, setNumber, setParent, setSelected, setWritable, updateReferences
getProperty
getChildren, hasChildren
isWritable, write
public static final boolean DEFAULT_BODIES_NON_DYNAMIC_IF_ACTIVE
public static PropertyList myProps
public IKProbe()
public IKProbe(java.lang.String name, MechModel mech, java.util.Collection<FrameMarker> mkrs, VectorNd wgts, double startTime, double stopTime)
public IKProbe(java.lang.String name, MechModel mech, java.util.Collection<FrameMarker> mkrs, VectorNd wgts, java.lang.String fileName) throws java.io.IOException
java.io.IOException
public PropertyList getAllPropertyInfo()
HasProperties
getAllPropertyInfo
in interface HasProperties
getAllPropertyInfo
in class NumericControlProbe
public double getMassRegularization()
setMassRegularization(double)
public void setMassRegularization(double c)
IKSolver.setMassRegularization(double)
for details.c
- mass regulaization coefficientgetMassRegularization()
public int getMaxIterations()
setMaxIterations(int)
public void setMaxIterations(int maxi)
maxi
- maximum number of solve iterationsgetMaxIterations()
public double getConvergenceTol()
public void setConvergenceTol(double tol)
tol
used in each IK solve step.
See IKSolver.setConvergenceTol(double)
for details.
#see #getConvergenceToltol
- convergence tolerancepublic boolean getBodiesNonDynamicIfActive()
dynamic
property of the bodies associated
with this probe is set false/true
depending on whether the probe
is active/inactive.true
if bodies are set non-dynamic/dynamic depending
on if the probe is active/inactivepublic void setBodiesNonDynamicIfActive(boolean enable)
dynamic
property of the bodies associated with
this probe is set false/true
depending on whether the probe is
active/inactive.enable
- if true
, ensures bodies are set non-dynamic/dynamic
depending on if the probe is active/inactivepublic IKSolver getSolver()
public void setActive(boolean enable)
setActive
in class ModelAgentBase
public void applyData(VectorNd vec, double t, double trel)
NumericControlProbe
vec
, and uses it to update the simulation for either
the current absolute time t
or probe relative time
trel
. The size of
vec
will equal the vector size of the probe (as returned by
NumericProbeBase.getVsize()
. Probe relative time is determined
from the probe's start time and scale factor
using trel = (t - startTime)/scale.
applyData
in class NumericControlProbe
vec
- supplies the current numeric datat
- absolute time (seconds)trel
- probe relative timepublic void setData(double t)
setData
in class NumericControlProbe
public void setBodiesDynamic(boolean dynamic)
dynamic
property of all the bodies associated
with this probe.dynamic
- setting for each body's dynamic
propertypublic boolean isSettable()
isSettable
in class NumericControlProbe
public boolean scanItem(ReaderTokenizer rtok, java.util.Deque<ScanToken> tokens) throws java.io.IOException
scanItem
in class NumericControlProbe
java.io.IOException
public boolean postscanItem(java.util.Deque<ScanToken> tokens, CompositeComponent ancestor) throws java.io.IOException
java.io.IOException
public void writeItems(java.io.PrintWriter pw, NumberFormat fmt, CompositeComponent ancestor) throws java.io.IOException
Probe
writeItems
in class NumericControlProbe
pw
- writer to which components are writtenfmt
- format for floating point numbersancestor
- ancestor component which respect to which references are
expressedjava.io.IOException
- if an I/O error occurredpublic ModelComponent copy(int flags, java.util.Map<ModelComponent,ModelComponent> copyMap)
CopyableComponent
COPY_REFERENCES
is set in flags
, then any component referenced
by this component should itself be set to a copy. This
should be done first checking copyMap
for an
existing copy of the referenced component. If there is no existing
copy, then a copy should be created by calling copy
recursively and adding the new copy to copyMap
.copy
in interface CopyableComponent
copy
in class NumericControlProbe
flags
- flags to control the copyingcopyMap
- map to possible existing instances of referenced
componentspublic java.util.ArrayList<FrameMarker> getMarkers()
public int numMarkers()