javax.robotics.engine.controllers
Class GravityCompensation

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

public class GravityCompensation
extends JRoboOp
implements EndEffController

This class implements position controller with gravity compensation. The scheme of the control:
scheme of gravity compensation control

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
 
Constructor Summary
GravityCompensation(Robot robot, double Kdp, double Kpp)
          Gravity compensation controller class constructor with positional jacobian.
GravityCompensation(Robot robot, double Kdp, double Kpp, double Kdo, double Kpo)
          Gravity compensation controller class constructor.
 
Method Summary
 short getID()
          Gets Controller class ID.
 RVector3d getOrientationError()
          Gets the current orientation error.
 RVector3d getPositionError()
          Gets the position error.
 short getRobotID()
          Gets Robot class ID linked to controller.
 double[] torqueCmd(double[] pd, double[] quatd)
          Sets the output torque for a desired end effector position and angular position.
 RVector torqueCmd(RVector pd)
          Sets the output torque for a desired end effector position.
 RVector torqueCmd(RVector3d pd)
          Sets the output torque for a desired end effector position.
 RVector torqueCmd(RVector3d pd, Quaternion quatd)
          Sets the output torque for a desired end effector position and angular position.
 RVector torqueCmd(RVector3d pdpp, RVector3d pdp, RVector3d pd)
          Sets the output torque for a desired end effector position.
 RVector torqueCmd(RVector3d pdpp, RVector3d pdp, RVector3d pd, RVector3d wdp, RVector3d wd, Quaternion quatd)
          Sets the output torque for a desired end effector position and angular position.
 
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

GravityCompensation

public GravityCompensation(Robot robot,
                           double Kdp,
                           double Kpp,
                           double Kdo,
                           double Kpo)
Gravity compensation controller class constructor.

Parameters:
robot - Robot class.
Kdp - end effector velocity gain
Kpp - end effector position error gain
Kdo - end effector orientation angular rate gain
Kpo - end effector orientation error gain

GravityCompensation

public GravityCompensation(Robot robot,
                           double Kdp,
                           double Kpp)
Gravity compensation controller class constructor with positional jacobian.

Parameters:
robot - Robot class.
Kdp - end effector velocity gain
Kpp - end effector position error gain
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

getPositionError

public RVector3d getPositionError()
Description copied from interface: EndEffController
Gets the position error.

Specified by:
getPositionError in interface EndEffController
Returns:
the position error vector.

getOrientationError

public RVector3d getOrientationError()
Description copied from interface: EndEffController
Gets the current orientation error. The error is computed form quaternion as:

η(q)&epsilond - &etad&epsilon(q) - S(&epsilond)&epsilon(q)

where η and ε are the vector and the scalar components of quaternion respectively.

Specified by:
getOrientationError in interface EndEffController
Returns:
the orientation error vector.

torqueCmd

public double[] torqueCmd(double[] pd,
                          double[] quatd)
Sets the output torque for a desired end effector position and angular position.

Parameters:
pd - desired position
quatd - desired vector angular position: quaternion (s,v1,v2,v3)
Returns:
the output torque

torqueCmd

public RVector torqueCmd(RVector3d pd,
                         Quaternion quatd)
Sets the output torque for a desired end effector position and angular position.

Parameters:
pd - desired position
quatd - desired vector angular position: quaternion (s,v1,v2,v3)
Returns:
the output torque

torqueCmd

public RVector torqueCmd(RVector3d pd)
Sets the output torque for a desired end effector position.

Parameters:
pd - desired position
Returns:
the output torque

torqueCmd

public RVector torqueCmd(RVector pd)
Sets the output torque for a desired end effector position.

Parameters:
pd - desired position
Returns:
the output torque

torqueCmd

public RVector torqueCmd(RVector3d pdpp,
                         RVector3d pdp,
                         RVector3d pd,
                         RVector3d wdp,
                         RVector3d wd,
                         Quaternion quatd)
Sets the output torque for a desired end effector position and angular position. The function call @link #torqueCmd(RVector3d, Quaternion)

Specified by:
torqueCmd in interface EndEffController
Parameters:
pdpp - null vector
pdp - null vector
pd - desired position
wdp - null vector
quatd - desired vector angular position: quaternion (s,v1,v2,v3)
wd - desired angular velocity
Returns:
the output torque

torqueCmd

public RVector torqueCmd(RVector3d pdpp,
                         RVector3d pdp,
                         RVector3d pd)
Sets the output torque for a desired end effector position. The function call @link #torqueCmd(RVector3d).

Specified by:
torqueCmd in interface EndEffController
Parameters:
pdpp - null vector
pdp - null vector
pd - desired position
Returns:
the output torque