com.yobotics.simulationconstructionset
Class SliderJoint

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

public class SliderJoint
extends OneDegreeOfFreedomJoint

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
 
Constructor Summary
SliderJoint(java.lang.String jname, javax.vecmath.Vector3d offset, Robot rob, Axis 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
 double getDamping()
           
 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.
 double getTorqueLimit()
           
 double getVelocityLimit()
           
 void setDamping(double b_damp)
          Sets a global velocity damping constant.
 void setDampingParameterOnly(double b_damp)
           
 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 setQdd(double qdd)
           
 void setTau(double tau)
          Sets the current torque at this joint.
 
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
addCameraMount, addExternalForcePoint, addGroundContactPoint, addGroundContactPoint, addIMUMount, addJoint, addKinematicPoint, 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, getRotationToWorld, getRotationToWorld, getTransformToWorld, getTransformToWorld, getTranslationToWorld, getUnitVector, getXYZToWorld, getYawPitchRollToWorld, isDynamic, recursiveDecideGroundContactPointsInContact, recursiveGetAllGroundContactPoints, recursiveGetChildrenJoints, recursiveGetOneDegreeOfFreedomJoints, recursiveUpdateAllGroundContactPointVelocities, resetFreezeFrame, 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,
                   Axis 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

setDampingParameterOnly

public void setDampingParameterOnly(double b_damp)

setDamping

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

Specified by:
setDamping in class OneDegreeOfFreedomJoint
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)
Specified by:
setQ in class OneDegreeOfFreedomJoint

setQd

public void setQd(double qd)
Specified by:
setQd in class OneDegreeOfFreedomJoint

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.

Specified by:
setTau in class OneDegreeOfFreedomJoint
Parameters:
tau - torque to be applied

getQ

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

Specified by:
getQ in class OneDegreeOfFreedomJoint
Returns:
YoVariable representing the current position

getQD

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

Specified by:
getQD in class OneDegreeOfFreedomJoint
Returns:
YoVariable representing the current velocity

getQDD

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

Specified by:
getQDD in class OneDegreeOfFreedomJoint
Returns:
YoVariable representing the current acceleration

getTau

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

Specified by:
getTau in class OneDegreeOfFreedomJoint
Returns:
YoVariable representing the currently applied torque

setQdd

public void setQdd(double qdd)
Specified by:
setQdd in class OneDegreeOfFreedomJoint

getDamping

public double getDamping()
Specified by:
getDamping in class OneDegreeOfFreedomJoint

getTorqueLimit

public double getTorqueLimit()
Specified by:
getTorqueLimit in class OneDegreeOfFreedomJoint

getVelocityLimit

public double getVelocityLimit()
Specified by:
getVelocityLimit in class OneDegreeOfFreedomJoint