com.yobotics.simulationconstructionset
Class UniversalJoint

java.lang.Object
  extended by com.yobotics.simulationconstructionset.Joint
      extended by com.yobotics.simulationconstructionset.OneDegreeOfFreedomJoint
          extended by com.yobotics.simulationconstructionset.PinJoint
              extended by com.yobotics.simulationconstructionset.UniversalJoint
All Implemented Interfaces:
java.io.Serializable, CommonJoint

public class UniversalJoint
extends PinJoint

See Also:
Serialized Form

Field Summary
 
Fields inherited from class com.yobotics.simulationconstructionset.Joint
MAX_ROT_ACCEL, MAX_TRANS_ACCEL
 
Constructor Summary
UniversalJoint(java.lang.String jname1, java.lang.String jname2, javax.vecmath.Vector3d offset, Robot rob, Axis firstAxis, Axis secondAxis)
           
 
Method Summary
 void addCameraMount(CameraMount mount)
          Adds the specified camera mount to this joint.
 void addExternalForcePoint(ExternalForcePoint point)
          Adds the specified ExternalForcePoint.
 void addGroundContactPoint(GroundContactPoint point)
          Adds the specified GroundContactPoint to this joint.
 void addIMUMount(IMUMount mount)
          Adds the specified imu mount to this joint.
 void addJoint(Joint nextJoint)
          Adds the specified joint as a child of this joint.
 void addKinematicPoint(KinematicPoint point)
          Adds the specified KinematicPoint to this joint.
 void getRotationToWorld(javax.vecmath.Matrix3d rotation)
          Retrieves the rotational component of the transform between world space and this joint space.
 void getRotationToWorld(javax.vecmath.Quat4d rotation)
          Retrieves the quaternion representation of the rotational component of the transform between world space and this joint space.
 void getState(double[] state)
          Inserts the given position and velocity of this pin joint into the provided array.
 void getTranslationToWorld(javax.vecmath.Vector3d translation)
          Retrieves the translational component of the transform between world space and this joint space in vector form.
 void setDamping(double b_damp)
          Specifies the overall damping constant for this joint.
 void setDamping(int axis, double b_damp)
           
 void setInitialState(double q1_init, double qd1_init, double q2_init, double qd2_init)
           
 void setLimitStops(int axis, double q_min, double q_max, double k_limit, double b_limit)
           
 void setLink(Link l)
          Sets the link for this joint.
 
Methods inherited from class com.yobotics.simulationconstructionset.PinJoint
addTau, getDamping, getQ, getQD, getQDD, getTau, getTorqueLimit, getVelocityLimit, setDampingParameterOnly, setInitialState, setLimitStops, setQ, setQd, setQdd, setTau, setTorqueLimits, setTorqueSpeedCurve, setVelocityLimits
 
Methods inherited from class com.yobotics.simulationconstructionset.OneDegreeOfFreedomJoint
doPDControl, getKd, getKp, getQdDesired, getqDesired, setKd, setKp, setQdDesired, setqDesired
 
Methods inherited from class com.yobotics.simulationconstructionset.Joint
addGroundContactPoint, addSensor, changeOffsetVector, changeOffsetVector, freezeFrame, freezeNextFrame, get3DRotation, getAngularAccelerationsInBodyFrame, getAngularAccelerationsInWorld, getAngularVelocityInBody, getAngularVelocityInWorld, getChildrenJoints, getExternalForcePoints, getGroundContactPointGroup, getGroundContactPointGroup, getJointAxis, getJointTransform3D, getKinematicPoints, getLinearAccelerationInBody, getLinearAccelerationInWorld, getLinearVelocityInBody, getLinearVelocityInWorld, getLink, getName, getOffset, getOffsetTransform3D, getParentJoint, getTransformToWorld, getTransformToWorld, getUnitVector, getXYZToWorld, getYawPitchRollToWorld, isDynamic, recursiveDecideGroundContactPointsInContact, recursiveGetAllGroundContactPoints, recursiveGetChildrenJoints, recursiveGetOneDegreeOfFreedomJoints, recursiveUpdateAllGroundContactPointVelocities, resetFreezeFrame, setDynamic, toString
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

UniversalJoint

public UniversalJoint(java.lang.String jname1,
                      java.lang.String jname2,
                      javax.vecmath.Vector3d offset,
                      Robot rob,
                      Axis firstAxis,
                      Axis secondAxis)
Method Detail

addJoint

public void addJoint(Joint nextJoint)
Description copied from class: Joint
Adds the specified joint as a child of this joint. This function also handles all setup necessary for back tracking from child to parent. Each joint must have an associated link before being added.

Overrides:
addJoint in class Joint
Parameters:
nextJoint - Child joint to be added.

setLink

public void setLink(Link l)
Description copied from class: Joint
Sets the link for this joint. If a previous link existed it is replaced, removing all graphics.

Overrides:
setLink in class Joint
Parameters:
l - New link for this joint.

addCameraMount

public void addCameraMount(CameraMount mount)
Description copied from class: Joint
Adds the specified camera mount to this joint. A single joint may contain multiple mounts.

Overrides:
addCameraMount in class Joint
Parameters:
mount - CameraMount to be added.
See Also:
CameraMount

addIMUMount

public void addIMUMount(IMUMount mount)
Description copied from class: Joint
Adds the specified imu mount to this joint. A single joint may contain multiple mounts.

Overrides:
addIMUMount in class Joint
Parameters:
mount - IMUMount to be added.
See Also:
IMUMount

addKinematicPoint

public void addKinematicPoint(KinematicPoint point)
Description copied from class: Joint
Adds the specified KinematicPoint to this joint. These points allow external forces and effects to be applied while also providing a means to monitor position and velocity. Currently the only implementation internal to SCS is the ExternalForcePoint.

Overrides:
addKinematicPoint in class Joint
Parameters:
point - KinematicPoint to be added.
See Also:
KinematicPoint

addGroundContactPoint

public void addGroundContactPoint(GroundContactPoint point)
Description copied from class: Joint
Adds the specified GroundContactPoint to this joint. These points allow ground contact modeling to occur which provides a means of robot ground interaction. For further examples see the tutorial.

Overrides:
addGroundContactPoint in class Joint
Parameters:
point - GroundContactPoint
See Also:
GroundContactPoint, GroundContactModel

addExternalForcePoint

public void addExternalForcePoint(ExternalForcePoint point)
Description copied from class: Joint
Adds the specified ExternalForcePoint. These points allow forces to be applied to particular joints allowing the creation of certain mechanical structures such as four-bar-linkages. See the tutorial for further details.

Overrides:
addExternalForcePoint in class Joint
Parameters:
point - ExternalForcePoint
See Also:
ExternalForcePoint

setLimitStops

public void setLimitStops(int axis,
                          double q_min,
                          double q_max,
                          double k_limit,
                          double b_limit)

setDamping

public void setDamping(int axis,
                       double b_damp)

setDamping

public void setDamping(double b_damp)
Description copied from class: PinJoint
Specifies the overall damping constant for this joint. If specified a torque base on this constant and the current velocity will be applied.

Overrides:
setDamping in class PinJoint
Parameters:
b_damp - general damping constant for this joint

setInitialState

public void setInitialState(double q1_init,
                            double qd1_init,
                            double q2_init,
                            double qd2_init)

getState

public void getState(double[] state)
Description copied from class: PinJoint
Inserts the given position and velocity of this pin joint into the provided array. Index zero contains the position (angle) in radians, while index one contains the velocity.

Overrides:
getState in class PinJoint
Parameters:
state - double[]

getRotationToWorld

public void getRotationToWorld(javax.vecmath.Matrix3d rotation)
Description copied from class: Joint
Retrieves the rotational component of the transform between world space and this joint space.

Overrides:
getRotationToWorld in class Joint
Parameters:
rotation - Matrix3d containing the rotational component.

getRotationToWorld

public void getRotationToWorld(javax.vecmath.Quat4d rotation)
Description copied from class: Joint
Retrieves the quaternion representation of the rotational component of the transform between world space and this joint space.

Overrides:
getRotationToWorld in class Joint
Parameters:
rotation - Quat4d to store the rotational transform.

getTranslationToWorld

public void getTranslationToWorld(javax.vecmath.Vector3d translation)
Description copied from class: Joint
Retrieves the translational component of the transform between world space and this joint space in vector form.

Overrides:
getTranslationToWorld in class Joint
Parameters:
translation - Vector3d representing the translation between world and joint space.