javax.robotics.engine.controllers
Class ProportionalDerivative

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

public class ProportionalDerivative
extends JRoboOp
implements JointController

This class implements Proportional Derivative joints position controller.

Wrapper class for C++ library ROBOOP.

Since:
1.0.0
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
ProportionalDerivative(Robot robot, DMatrix Kp, DMatrix Kd)
          Proportional Derivative joints position controller class constructor.
ProportionalDerivative(Robot robot, double[] Kp, double[] Kd)
          Proportional Derivative 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 and velocity.
 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

ProportionalDerivative

public ProportionalDerivative(Robot robot,
                              double[] Kp,
                              double[] Kd)
Proportional Derivative 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.

ProportionalDerivative

public ProportionalDerivative(Robot robot,
                              DMatrix Kp,
                              DMatrix Kd)
Proportional Derivative 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 and velocity.

Specified by:
torqueCmd in interface JointController
Parameters:
qd - array of desired joint position and desired joint velocity.
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 - array of desired joint position and desired joint velocity.
Returns:
torque.