java.lang.Object
com.marginallyclever.ro3.node.nodes.limbsolver.ApproximateJacobian
Direct Known Subclasses:
ApproximateJacobianFiniteDifferences, ApproximateJacobianScrewTheory

public abstract class ApproximateJacobian extends Object
ApproximateJacobian is used to calculate the Jacobian matrix for a robot arm. Each implementation can derive this class and fill in the jacobian matrix.

This class provides several functionalities:

  • It can get the inverse Jacobian matrix.
  • It can get the joint velocity from the Cartesian velocity.
  • It can get the Cartesian velocity from the joint velocity.
  • It can get the Jacobian matrix.
  • It can get the time derivative of the Jacobian matrix.
  • It can get the Coriolis term.
  • Method Details

    • getJointFromCartesian

      public double[] getJointFromCartesian(double[] cartesianVelocity) throws Exception
      Use the Jacobian to get the joint velocity from the cartesian velocity.
      Parameters:
      cartesianVelocity - 6 doubles - the XYZ translation and UVW rotation forces on the end effector. The rotation component is in radians.
      Returns:
      joint velocity in degrees. Will be filled with the new velocity.
      Throws:
      Exception - if joint velocities have NaN values
    • getCartesianFromJoint

      public double[] getCartesianFromJoint(double[] joint)
      Use the jacobian to convert joint velocity to cartesian velocity.
      Parameters:
      joint - joint velocity in degrees.
      Returns:
      6 doubles containing the XYZ translation and UVW rotation forces on the end effector. The rotation component is in radians.
    • getJacobian

      public double[][] getJacobian()
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • getTimeDerivative

      public double[][] getTimeDerivative(double[] jointVelocities)
      The time derivative is calculated by multiplying the jacobian by the joint velocities. You can do this by taking the derivative of each element of the Jacobian matrix individually.
      Parameters:
      jointVelocities - joint velocities in radians. In classical notation this would be qDot.
      Returns:
      the time derivative of the Jacobian matrix.
    • getCoriolisTerm

      public double[] getCoriolisTerm(double[] jointVelocities)
      Calculate the coriolis term.
      Parameters:
      jointVelocities - joint velocities in radians. In classical notation this would be qDot.
      Returns:
      the coriolis term.