javax.robotics.engine.clik
Class JointStrokeConstraint

java.lang.Object
  extended by javax.robotics.engine.clik.JointStrokeConstraint
All Implemented Interfaces:
ConstraintVelocity

public class JointStrokeConstraint
extends java.lang.Object
implements ConstraintVelocity

This class implements the constraint on joints stroke.
q0'=k0*grad(w(q))
where
w(q)

Since:
1.0.2
Author:
Carmine Lia

Constructor Summary
JointStrokeConstraint(double k0, RVector qMax, RVector qMin)
          Define the constraint with minimum and maximum position for each joint and the constraint gain.
 
Method Summary
 RVector compute(RVector q)
          Computes the constraint velocity function.
 double getK0()
          Gets the velocity constraint gain.
 void setK0(double k0)
          Sets the velocity constraint gain.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

JointStrokeConstraint

public JointStrokeConstraint(double k0,
                             RVector qMax,
                             RVector qMin)
Define the constraint with minimum and maximum position for each joint and the constraint gain.

Parameters:
k0 - the constraint velocity gain.
qMax - the vector of maximum positions.
qMin - the vector of minimum positions.
Method Detail

getK0

public final double getK0()
Description copied from interface: ConstraintVelocity
Gets the velocity constraint gain.

Specified by:
getK0 in interface ConstraintVelocity
Returns:
the gain value.

setK0

public final void setK0(double k0)
Description copied from interface: ConstraintVelocity
Sets the velocity constraint gain.

Specified by:
setK0 in interface ConstraintVelocity
Parameters:
k0 - the gain value to set.

compute

public RVector compute(RVector q)
Computes the constraint velocity function.
q0'=k0*grad(w(q))
where
w(q).

Specified by:
compute in interface ConstraintVelocity
Parameters:
q - the joints position.
Returns:
the current value of constraint.