public class ForceTargetTerm extends LeastSquaresTermBase
| Modifier and Type | Field and Description |
|---|---|
static boolean |
DEFAULT_NORMALIZE_H |
static double |
DEFAULT_WEIGHT |
static PropertyList |
myProps |
DEFAULT_ENABLED, defaultWeight| Constructor and Description |
|---|
ForceTargetTerm(TrackingController controller) |
ForceTargetTerm(TrackingController controller,
double weight) |
| Modifier and Type | Method and Description |
|---|---|
ForceTarget |
addForceTarget(BodyConnector con)
Adds a target to track the reaction force of the specified body connector
|
ForceTarget |
addForceTarget(BodyConnector con,
double weight)
Adds a target to track the reaction force of the specified body connector
|
ForceTarget |
addForceTarget(BodyConnector con,
VectorNd targetLambda)
Adds a target to track the reaction force of the specified body connector
|
ForceTarget |
addForceTarget(BodyConnector con,
VectorNd targetLambda,
double weight)
Adds a target to track the reaction force of the specified body connector
|
void |
clearTargets()
Removes all force targets
|
PropertyList |
getAllPropertyInfo()
Returns a list giving static information about all properties exported by
this object.
|
SparseBlockMatrix |
getForceJacobian()
XXX This Jacobian needs to be re-computed at each time step
OR it needs to be transformed to global co-ordinates so that the
tracking controller can use it properly, since it does not change
as the model moves
|
java.util.ArrayList<ForceTarget> |
getForceTargets() |
boolean |
getNormalizeH()
Returns whether or not we're normalizing this term's contribution to
H and b. |
int |
getRowSize()
Returns the number of rows.
|
VectorNd |
getTargetWeights() |
void |
getTargetWeights(VectorNd out) |
int |
getTerm(MatrixNd H,
VectorNd b,
int rowoff,
double t0,
double t1)
Fills
H and b with this motion term |
boolean |
isEnabled()
Returns that enabled status of this term, for use if term is
an inequality / equality constraint
|
void |
setEnabled(boolean enabled) |
void |
setNormalizeH(boolean enable)
Sets whether or not to normalize the contribution to
H
and b by the Frobenius norm of this term's H block. |
void |
setTargetWeights(VectorNd wgts) |
void |
setWeight(double w)
Weight used to scale the contribution of this term in the quadratic optimization problem
|
void |
updateTargetForce(double t0,
double t1) |
addRows, getQP, setSizedispose, getProperty, getSize, getWeightequals, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetPropertypublic static final double DEFAULT_WEIGHT
public static boolean DEFAULT_NORMALIZE_H
public static PropertyList myProps
public ForceTargetTerm(TrackingController controller)
public ForceTargetTerm(TrackingController controller, double weight)
public PropertyList getAllPropertyInfo()
HasPropertiesgetAllPropertyInfo in interface HasPropertiesgetAllPropertyInfo in class LeastSquaresTermBasepublic void updateTargetForce(double t0,
double t1)
public boolean isEnabled()
LeastSquaresTermisEnabled in interface LeastSquaresTermisEnabled in class LeastSquaresTermBasepublic void setEnabled(boolean enabled)
setEnabled in class LeastSquaresTermBasepublic SparseBlockMatrix getForceJacobian()
public ForceTarget addForceTarget(BodyConnector con)
con - body connector to trackpublic ForceTarget addForceTarget(BodyConnector con, double weight)
con - body connector to trackweight - used in error trackingpublic ForceTarget addForceTarget(BodyConnector con, VectorNd targetLambda)
con - body connector to tracktargetLambda - target reaction force for the connectorpublic ForceTarget addForceTarget(BodyConnector con, VectorNd targetLambda, double weight)
con - body connector to tracktargetLambda - target reaction force for the connectorweight - used in error trackingpublic void clearTargets()
public int getTerm(MatrixNd H, VectorNd b, int rowoff, double t0, double t1)
H and b with this motion termgetTerm in interface LeastSquaresTermgetTerm in class LeastSquaresTermBaseH - LHS matrix to fillb - RHS vector to fillrowoff - row offset to start filling termt0 - starting time of time stept1 - ending time of time steppublic void setWeight(double w)
setWeight in interface QPTermsetWeight in class QPTermBasepublic void setTargetWeights(VectorNd wgts)
public void getTargetWeights(VectorNd out)
public VectorNd getTargetWeights()
public void setNormalizeH(boolean enable)
H
and b by the Frobenius norm of this term's H block.
This is for scaling purposes when damping is important. If set to false,
then the damping term's scale will depend on the time and spatial scales.
However, if set to true, we will likely scale this term differently every
time step.enable - if true, enables normalizationpublic boolean getNormalizeH()
H and b. See setNormalizeH(boolean)H and bpublic int getRowSize()
LeastSquaresTermpublic java.util.ArrayList<ForceTarget> getForceTargets()