org.ode4j.ode
Interface DAMotorJoint

All Superinterfaces:
DJoint

public interface DAMotorJoint
extends DJoint


Nested Class Summary
static class DAMotorJoint.AMotorMode
          angular motor mode numbers
 
Nested classes/interfaces inherited from interface org.ode4j.ode.DJoint
DJoint.DJointFeedback, DJoint.PARAM, DJoint.PARAM_GROUPS, DJoint.PARAM_N
 
Field Summary
 
Fields inherited from interface org.ode4j.ode.DJoint
P_OFS_1, P_OFS_2, P_OFS_3
 
Method Summary
 void addTorques(double torque1, double torque2, double torque3)
          Applies torque0 about the AMotor's axis 0, torque1 about the AMotor's axis 1, and torque2 about the AMotor's axis 2.
 double getAngle(int anum)
          Get the current angle for axis.
 double getAngleRate(int anum)
          Get the current angle rate for axis anum.
 void getAxis(int anum, DVector3 result)
          Get the AMotor axes.
 int getAxisRel(int anum)
          Get axis.
 DAMotorJoint.AMotorMode getMode()
          Get the angular motor mode.
 int getNumAxes()
          Get the number of angular axes that will be controlled by the AMotor.
 double getParam(DJoint.PARAM_N parameter)
          Get joint parameter.
 double getParamFMax()
           
 double getParamFMax2()
           
 double getParamFMax3()
           
 double getParamVel()
           
 double getParamVel2()
           
 double getParamVel3()
           
 void setAngle(int anum, double angle)
          Tell the AMotor what the current angle is along axis anum.
 void setAxis(int anum, int rel, double x, double y, double z)
          Set axis.
 void setAxis(int anum, int rel, DVector3C a)
          Set axis.
 void setMode(DAMotorJoint.AMotorMode mode)
          Set mode.
 void setNumAxes(int num)
          Set the nr of axes.
 void setParam(DJoint.PARAM_N parameter, double value)
          Set joint parameter.
 void setParamFMax(double d)
           
 void setParamFMax2(double d)
           
 void setParamFMax3(double d)
           
 void setParamHiStop(double d)
           
 void setParamHiStop2(double d)
           
 void setParamHiStop3(double d)
           
 void setParamLoStop(double d)
           
 void setParamLoStop2(double d)
           
 void setParamLoStop3(double d)
           
 void setParamVel(double d)
           
 void setParamVel2(double d)
           
 void setParamVel3(double d)
           
 
Methods inherited from interface org.ode4j.ode.DJoint
attach, DESTRUCTOR, disable, enable, getBody, getData, getFeedback, getNumBodies, isEnabled, setData, setFeedback
 

Method Detail

setMode

void setMode(DAMotorJoint.AMotorMode mode)
Set mode.


getMode

DAMotorJoint.AMotorMode getMode()
Get the angular motor mode. Mode must be one of the following constants:
  • dAMotorUser The AMotor axes and joint angle settings are entirely controlled by the user. This is the default mode.
  • dAMotorEuler Euler angles are automatically computed. The axis a1 is also automatically computed. The AMotor axes must be set correctly when in this mode, as described below.
  • When this mode is initially set the current relative orientations of the bodies will correspond to all euler angles at zero.


    setNumAxes

    void setNumAxes(int num)
    Set the nr of axes.

    Parameters:
    num - 0..3

    getNumAxes

    int getNumAxes()
    Get the number of angular axes that will be controlled by the AMotor.

    Num can range from 0 (which effectively deactivates the joint) to 3. This is automatically set to 3 in dAMotorEuler mode.


    setAxis

    void setAxis(int anum,
                 int rel,
                 double x,
                 double y,
                 double z)
    Set axis.


    setAxis

    void setAxis(int anum,
                 int rel,
                 DVector3C a)
    Set axis.


    getAxis

    void getAxis(int anum,
                 DVector3 result)
    Get the AMotor axes.

    Parameters:
    anum - selects the axis to change (0,1 or 2).
  • 0: The axis is anchored to the global frame.
  • 1: The axis is anchored to the first body.
  • 2: The axis is anchored to the second body.
  • result - Each axis can have one of three ``relative orientation'' modes.

    getAxisRel

    int getAxisRel(int anum)
    Get axis.

    Remark:
    The axis vector is always specified in global coordinates regardless of the setting of rel.
    There are two GetAMotorAxis functions, one to return the axis and one to return the relative mode.

    For dAMotorEuler mode:

  • Only axes 0 and 2 need to be set. Axis 1 will be determined automatically at each time step.
  • Axes 0 and 2 must be perpendicular to each other.
  • Axis 0 must be anchored to the first body, axis 2 must be anchored to the second body.

  • setAngle

    void setAngle(int anum,
                  double angle)
    Tell the AMotor what the current angle is along axis anum.

    This function should only be called in dAMotorUser mode, because in this mode the AMotor has no other way of knowing the joint angles. The angle information is needed if stops have been set along the axis, but it is not needed for axis motors.


    getAngle

    double getAngle(int anum)
    Get the current angle for axis.

    Remark:
    In dAMotorUser mode this is simply the value that was set with dJointSetAMotorAngle(). In dAMotorEuler mode this is the corresponding euler angle.

    getAngleRate

    double getAngleRate(int anum)
    Get the current angle rate for axis anum.

    Remark:
    In dAMotorUser mode this is always zero, as not enough information is available. In dAMotorEuler mode this is the corresponding euler angle rate.

    addTorques

    void addTorques(double torque1,
                    double torque2,
                    double torque3)
    Applies torque0 about the AMotor's axis 0, torque1 about the AMotor's axis 1, and torque2 about the AMotor's axis 2.

    Remark:
    If the motor has fewer than three axes, the higher torques are ignored. This function is just a wrapper for dBodyAddTorque().

    getParamFMax

    double getParamFMax()

    getParamFMax2

    double getParamFMax2()

    getParamFMax3

    double getParamFMax3()

    getParamVel

    double getParamVel()

    getParamVel2

    double getParamVel2()

    getParamVel3

    double getParamVel3()

    setParamFMax

    void setParamFMax(double d)

    setParamFMax2

    void setParamFMax2(double d)

    setParamFMax3

    void setParamFMax3(double d)

    setParamLoStop

    void setParamLoStop(double d)

    setParamLoStop2

    void setParamLoStop2(double d)

    setParamLoStop3

    void setParamLoStop3(double d)

    setParamHiStop

    void setParamHiStop(double d)

    setParamHiStop2

    void setParamHiStop2(double d)

    setParamHiStop3

    void setParamHiStop3(double d)

    setParamVel

    void setParamVel(double d)

    setParamVel2

    void setParamVel2(double d)

    setParamVel3

    void setParamVel3(double d)

    setParam

    void setParam(DJoint.PARAM_N parameter,
                  double value)
    Set joint parameter.

    Specified by:
    setParam in interface DJoint

    getParam

    double getParam(DJoint.PARAM_N parameter)
    Get joint parameter.

    Specified by:
    getParam in interface DJoint