com.yobotics.simulationconstructionset
Class SliderJoint

java.lang.Object
  extended by com.yobotics.simulationconstructionset.Joint
      extended by com.yobotics.simulationconstructionset.SliderJoint
All Implemented Interfaces:
java.io.Serializable

public class SliderJoint
extends Joint

Title: Yobotics! Simulation Construction Set

Description: Package for Simulating Dynamic Robots and Mechanisms. A translational joint with a single degree of freedom. This joint allows motion up and down the specified joint axis. This is a fundamental joint type which is currently used in the implementation of cylinder joint.

Copyright: Copyright (c) Jerry Pratt

Company: Yobotics, Inc.

Version:
Beta 1.0
Author:
Jerry Pratt
See Also:
Serialized Form

Field Summary
 
Fields inherited from class com.yobotics.simulationconstructionset.Joint
MAX_ROT_ACCEL, MAX_TRANS_ACCEL, X, Y, Z
 
Constructor Summary
SliderJoint(java.lang.String jname, javax.vecmath.Vector3d offset, Robot rob, int jaxis)
          Constructs a new slider joint and adds it to the specified Robot.
SliderJoint(java.lang.String jname, javax.vecmath.Vector3d offset, Robot rob, javax.vecmath.Vector3d u_hat)
          Creates a new slider joint and adds it to the specified robot.
 
Method Summary
 DoubleYoVariable getQ()
          Retrieves the current position of this joint.
 DoubleYoVariable getQD()
          Retrieves the current velocity of this joint.
 DoubleYoVariable getQDD()
          Retrieves the current acceleration of this joint.
 void getState(double[] state)
          Retrieves the current velocity and postion storing those values into the provided double array.
 DoubleYoVariable getTau()
          Retrieves the torque currently applied at this joint.
 void setDamping(double b_damp)
          Sets a global velocity damping constant.
 void setInitialState(double q_init, double qd_init)
          Sets the initial velocity and position for this joint.
 void setLimitStops(double q_min, double q_max, double k_limit, double b_limit)
          Allows the definition of positional limit stops for this joint.
 void setQ(double q)
           
 void setQd(double qd)
           
 void setTau(double tau)
          Sets the current torque at this joint.
 
Methods inherited from class com.yobotics.simulationconstructionset.Joint
addCameraMount, addExternalForcePoint, addGroundContactPoint, addJoint, addKinematicPoint, addRangeSensor, changeOffsetVector, changeOffsetVector, get3DRotation, getChildrenJoints, getExternalForcePoints, getGroundContactPointGroup, getJointAxis, getKinematicPoints, getLink, getName, getOffset, getRotationFromWorld, getRotationFromWorld, getTransformFromWorld, getTransformToWorld, getTranslationFromWorld, getUnitVector, getXYZFromWorld, getYawPitchRollFromWorld, isDynamic, recursiveDecideGroundContactPointsInContact, recursiveGetChildrenJoints, recursiveUpdateAllGroundContactPointVelocities, setDynamic, setLink, toString
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

SliderJoint

public SliderJoint(java.lang.String jname,
                   javax.vecmath.Vector3d offset,
                   Robot rob,
                   int jaxis)
Constructs a new slider joint and adds it to the specified Robot. There are three possible axis of translation for this joint: X, Y and Z.

Parameters:
jname - name of this joint
offset - Vector3d defining the offset from the robot origin to the joint
rob - Robot to which this joint belongs
jaxis - int representing the joint axis

SliderJoint

public SliderJoint(java.lang.String jname,
                   javax.vecmath.Vector3d offset,
                   Robot rob,
                   javax.vecmath.Vector3d u_hat)
Creates a new slider joint and adds it to the specified robot. This method allows the joint axis to be defined by a vector, u_hat.

Parameters:
jname - name of this joint
offset - Vector3d defining the offset from the robot origin to the joint
rob - Robot to which this joint belongs
u_hat - Vector3d defining the joint axis in world coordinates
Method Detail

setLimitStops

public void setLimitStops(double q_min,
                          double q_max,
                          double k_limit,
                          double b_limit)
Allows the definition of positional limit stops for this joint. These limits are enforced via torques applied based on the given spring and damping coefficients.

Parameters:
q_min - minimum position for this joint
q_max - maximum position for this joint
k_limit - spring constant used in torque calculations
b_limit - damping constant used in torque calculations

setDamping

public void setDamping(double b_damp)
Sets a global velocity damping constant. This will generate a damping torque at all times.

Parameters:
b_damp - new damping constant

setInitialState

public void setInitialState(double q_init,
                            double qd_init)
Sets the initial velocity and position for this joint.

Parameters:
q_init - initial position
qd_init - initial velocity

setQ

public void setQ(double q)

setQd

public void setQd(double qd)

getState

public void getState(double[] state)
Retrieves the current velocity and postion storing those values into the provided double array. The position is store at index 0 while the velocity is stored at index 1.

Parameters:
state - array in which the state is to be stored

setTau

public void setTau(double tau)
Sets the current torque at this joint.

Parameters:
tau - torque to be applied

getQ

public DoubleYoVariable getQ()
Retrieves the current position of this joint.

Returns:
YoVariable representing the current position

getQD

public DoubleYoVariable getQD()
Retrieves the current velocity of this joint.

Returns:
YoVariable representing the current velocity

getQDD

public DoubleYoVariable getQDD()
Retrieves the current acceleration of this joint.

Returns:
YoVariable representing the current acceleration

getTau

public DoubleYoVariable getTau()
Retrieves the torque currently applied at this joint.

Returns:
YoVariable representing the currently applied torque