javax.robotics.engine.controllers
Class PDGravityCompensation

java.lang.Object
  extended by javax.robotics.engine.JRoboOp
      extended by javax.robotics.engine.controllers.PDGravityCompensation
All Implemented Interfaces:
Controller, JointController

public class PDGravityCompensation
extends JRoboOp
implements JointController

This class implements Proportional derivative with gravity compensation joints position controller. The scheme of the control:
scheme proportional derivative control with
 gravity compensation

Wrapper class for C++ library ROBOOP.

Since:
1.0.0
Version:
7/10/2005
Author:
Carmine Lia

Field Summary
 
Fields inherited from class javax.robotics.engine.JRoboOp
ID, Version
 
Fields inherited from interface javax.robotics.engine.controllers.JointController
WRONG_SIZE
 
Constructor Summary
PDGravityCompensation(Robot robot, DMatrix Kp, DMatrix Kd)
          Proportional Derivative with gravity compensation joints position controller class constructor.
PDGravityCompensation(Robot robot, double[] Kp, double[] Kd)
          Proportional Derivative with gravity compensation joints position controller class constructor.
 
Method Summary
 short getID()
          Gets Controller class ID.
 DMatrix getKd()
          Gets the velocity error gain matrix.
 DMatrix getKp()
          Gets the position error gain matrix.
 short getRobotID()
          Gets Robot class ID linked to controller.
 short setKd(DMatrix Kd)
          Sets the velocity error gain matrix.
 short setKd(double[] Kd)
          Sets the velocity error gain matrix.
 short setKp(DMatrix Kp)
          Sets the position error gain matrix.
 short setKp(double[] Kp)
          Sets the position error gain matrix.
 double[] torqueCmd(double[]... qd)
          Sets the output torque for a desired joint position.
 RVector torqueCmd(RVector... qd)
          Sets the output torque for a desired joint position and velocity.
 
Methods inherited from class javax.robotics.engine.JRoboOp
acceleration, acceleration, createComputedTorqueMethod, createGravityCompensation, createImpedance, createPDGravityComp, createProportionalDerivative, createResolveRateAcceleration, createRobot, createRobot, createRobot, createRobot, createRobustControl, createSplinePath, createSplineQuaternion, dTdqi, getAvDof, getConverge, getDof, getError, getGravity, getPosErrorGCOMP, getPosErrorRRA, getQ, getQ, getQMax, getQMin, getQOffset, getQp, getQpp, getQuatErrorGCOMP, getQuatErrorRRA, impedanceControl, inertia, interpolate, interpolatePathQuat, interpolateQuat, invKine, invKine, jacobian, jacobian, jacobianDLSinv, jacobianDot, jacobianDot, kine, kine, setGravity, setKdCTM, setKdPD, setKdPDG, setKdRC, setKpCTM, setKpPD, setKpPDG, setKpRC, setQ, setQ, setQp, setQpp, torque, torque, torqueCmdCTM, torqueCmdGCOMP, torqueCmdGCOMP, torqueCmdPD, torqueCmdPDG, torqueCmdRC, torqueCmdRRA, torqueCmdRRA, torqueCoriolis, torqueCoulombFriction, torqueGravity, torqueViscousFriction
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PDGravityCompensation

public PDGravityCompensation(Robot robot,
                             double[] Kp,
                             double[] Kd)
Proportional Derivative with gravity compensation joints position controller class constructor.

Parameters:
robot - Robot class.
Kp - diagonal matrix joint position error gain matrix.
Kd - diagonal matrix joint velocity error gain matrix.

PDGravityCompensation

public PDGravityCompensation(Robot robot,
                             DMatrix Kp,
                             DMatrix Kd)
Proportional Derivative with gravity compensation joints position controller class constructor.

Parameters:
robot - Robot class.
Kp - diagonal matrix joint position error gain matrix.
Kd - diagonal matrix joint velocity error gain matrix.
Method Detail

getID

public final short getID()
Gets Controller class ID.

Specified by:
getID in interface Controller
Specified by:
getID in class JRoboOp
Returns:
ID

getRobotID

public final short getRobotID()
Description copied from interface: Controller
Gets Robot class ID linked to controller.

Specified by:
getRobotID in interface Controller
Returns:
ID

getKp

public final DMatrix getKp()
Description copied from interface: JointController
Gets the position error gain matrix.

Specified by:
getKp in interface JointController
Returns:
position error gain diagonal matrix

getKd

public final DMatrix getKd()
Description copied from interface: JointController
Gets the velocity error gain matrix.

Specified by:
getKd in interface JointController
Returns:
velocity error gain diagonal matrix

setKp

public short setKp(double[] Kp)
Sets the position error gain matrix.

Parameters:
Kp - position error gain diagonal matrix
Returns:
0 or WRONG_SIZE

setKd

public short setKd(double[] Kd)
Sets the velocity error gain matrix.

Parameters:
Kd - velocity error gain diagonal matrix
Returns:
0 or WRONG_SIZE

setKp

public short setKp(DMatrix Kp)
Description copied from interface: JointController
Sets the position error gain matrix.

Call C++ method

set_Kp(const DiagonalMatrixr &Kp)

Specified by:
setKp in interface JointController
Parameters:
Kp - position error gain diagonal matrix
Returns:
0 or WRONG_SIZE

setKd

public short setKd(DMatrix Kd)
Description copied from interface: JointController
Sets the velocity error gain matrix.

Call C++ method

set_Kd(const DiagonalMatrixr &Kd)

Specified by:
setKd in interface JointController
Parameters:
Kd - velocity error gain diagonal matrix
Returns:
0 or WRONG_SIZE

torqueCmd

public double[] torqueCmd(double[]... qd)
Sets the output torque for a desired joint position.

Specified by:
torqueCmd in interface JointController
Parameters:
qd - array of desired joint position.
Returns:
torque.

torqueCmd

public RVector torqueCmd(RVector... qd)
Sets the output torque for a desired joint position and velocity.

Specified by:
torqueCmd in interface JointController
Parameters:
qd - the vector of desired joint position.
Returns:
torque.