public class ForceTargetTerm extends LeastSquaresTermBase
Modifier and Type | Field and Description |
---|---|
static double |
DEFAULT_Kd |
static double |
DEFAULT_Kp |
static boolean |
DEFAULT_NORMALIZE_H |
static boolean |
DEFAULT_USE_PD_CONTROL |
static VectorNd |
DEFAULT_WEIGHTS |
static PropertyList |
myProps |
defaultWeight
Constructor and Description |
---|
ForceTargetTerm(TrackingController trackingController) |
Modifier and Type | Method and Description |
---|---|
void |
addForceTarget(BodyConnector con) |
void |
addForceTarget(BodyConnector con,
VectorNd lam) |
void |
clearTargets()
Removes targets
|
PropertyList |
getAllPropertyInfo()
Returns a list giving static information about all properties exported by
this object.
|
VectorNd |
getCurrentVel() |
double |
getDerr() |
SparseBlockMatrix |
getForceJacobian() |
java.util.ArrayList<ForceTarget> |
getForceTargets() |
double |
getKd() |
double |
getKp()
Returns the Proportional gain for PD controller.
|
boolean |
getNormalizeH()
Returns whether or not we're normalizing this term's contribution to
H and b . |
double |
getPerr() |
int |
getRowSize()
Returns the number of rows.
|
RenderProps |
getSourceRenderProps()
Render props for the sources
|
int |
getTargetForSize() |
RenderProps |
getTargetRenderProps() |
int |
getTargetSize() |
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 |
void |
initSourceRenderProps() |
void |
initTargetRenderProps() |
boolean |
isEnabled() |
void |
setEnabled(boolean enabled) |
void |
setKd(double k) |
void |
setKp(double k)
Proportional gain for PD controller
|
void |
setNormalizeH(boolean set)
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 |
updateTarget(double t0,
double t1) |
void |
updateTargetForce() |
addRows, getQP, setSize
dispose, getProperty, getSize, getWeight
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getProperty
public static final boolean DEFAULT_USE_PD_CONTROL
public static boolean DEFAULT_NORMALIZE_H
public static double DEFAULT_Kd
public static double DEFAULT_Kp
public static VectorNd DEFAULT_WEIGHTS
public static PropertyList myProps
public ForceTargetTerm(TrackingController trackingController)
public PropertyList getAllPropertyInfo()
HasProperties
getAllPropertyInfo
in interface HasProperties
getAllPropertyInfo
in class QPTermBase
public void updateTarget(double t0, double t1)
public void updateTargetForce()
public boolean isEnabled()
public void setEnabled(boolean enabled)
public VectorNd getCurrentVel()
public void initTargetRenderProps()
public void initSourceRenderProps()
public SparseBlockMatrix getForceJacobian()
public void addForceTarget(BodyConnector con)
public void addForceTarget(BodyConnector con, VectorNd lam)
public void clearTargets()
public int getTargetForSize()
public int getTargetSize()
public int getTerm(MatrixNd H, VectorNd b, int rowoff, double t0, double t1)
H
and b
with this motion termgetTerm
in interface LeastSquaresTerm
getTerm
in class LeastSquaresTermBase
H
- 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 QPTerm
setWeight
in class QPTermBase
public RenderProps getTargetRenderProps()
public void setTargetWeights(VectorNd wgts)
public void setKp(double k)
public double getKp()
setKp(double)
.public void setKd(double k)
public double getKd()
public double getPerr()
public double getDerr()
public void getTargetWeights(VectorNd out)
public VectorNd getTargetWeights()
public RenderProps getSourceRenderProps()
public void setNormalizeH(boolean set)
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.set
- public boolean getNormalizeH()
H
and b
. See setNormalizeH(boolean)
H
and b
public int getRowSize()
LeastSquaresTerm
public java.util.ArrayList<ForceTarget> getForceTargets()