|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.yobotics.simulationconstructionset.Joint
com.yobotics.simulationconstructionset.OneDegreeOfFreedomJoint
com.yobotics.simulationconstructionset.PinJoint
public class PinJoint
Title: SimulationConstructionSet
Description: A rotational joint with a single degree of freedom. Pin joints allow rotation around a single axis specified upon creation. There are several joint types which extend this joint: universal, gimbal and cylinder joints. These joints are either multiple pin joints grouped together or a combination of pin and slider joints.
Copyright: Copyright (c) 2000
Company: Yobotics, Inc.
Joint
,
Serialized FormField Summary |
---|
Fields inherited from class com.yobotics.simulationconstructionset.Joint |
---|
MAX_ROT_ACCEL, MAX_TRANS_ACCEL |
Constructor Summary | |
---|---|
PinJoint(java.lang.String jname,
javax.vecmath.Vector3d offset,
Robot rob,
Axis jaxis)
Creates a new pin joint and adds it to the specified robot. |
|
PinJoint(java.lang.String jname,
javax.vecmath.Vector3d offset,
Robot rob,
javax.vecmath.Vector3d u_hat)
Creates a new pin joint and adds it to the specified robot. |
Method Summary | |
---|---|
void |
addTau(double tau)
Add the torque given in parameter to this joint. |
double |
getDamping()
|
DoubleYoVariable |
getQ()
Retrieve the current angle (position) of this joint. |
DoubleYoVariable |
getQD()
Retrieves the current velocity of this joint. |
DoubleYoVariable |
getQDD()
Retrieves the current acceleration at this joint. |
void |
getState(double[] state)
Inserts the given position and velocity of this pin joint into the provided array. |
DoubleYoVariable |
getTau()
Retrieves the torque currently applied at this joint. |
double |
getTorqueLimit()
|
double |
getVelocityLimit()
|
void |
setDamping(double b_damp)
Specifies the overall damping constant for this joint. |
void |
setDampingParameterOnly(double b_damp)
|
void |
setInitialState(double q_init,
double qd_init)
Specify the intial position and velocity of this joint. |
void |
setLimitStops(double q_min,
double q_max,
double k_limit,
double b_limit)
Adds a set of limit stops to this joint. |
void |
setQ(double q)
|
void |
setQd(double qd)
|
void |
setQdd(double qdd)
|
void |
setTau(double tau)
Sets the torque applied to this joint. |
void |
setTorqueLimits(double maxTorque)
Sets a threshold for maximum allowed torque at this joint. |
void |
setTorqueSpeedCurve(TorqueSpeedCurve torqueSpeedCurve)
|
void |
setVelocityLimits(double qd_max,
double b_vel_limit)
Adds a velocity limit for this joint. |
Methods inherited from class com.yobotics.simulationconstructionset.OneDegreeOfFreedomJoint |
---|
doPDControl, getKd, getKp, getQdDesired, getqDesired, setKd, setKp, setQdDesired, setqDesired |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public PinJoint(java.lang.String jname, javax.vecmath.Vector3d offset, Robot rob, Axis jaxis)
jname
- name of this jointoffset
- Vector3d representing the offset from the robot origin to the joint.rob
- Robot to which this joint will belongjaxis
- int representing the axispublic PinJoint(java.lang.String jname, javax.vecmath.Vector3d offset, Robot rob, javax.vecmath.Vector3d u_hat)
jname
- name of this jointoffset
- Vector3d representing the offset from the robot origin to the joint.rob
- Robot to which this joint will belongu_hat
- Vector3d representing the axis of rotationMethod Detail |
---|
public void setInitialState(double q_init, double qd_init)
q_init
- intial position of this joint in radians.qd_init
- intial velocity of this jointpublic void getState(double[] state)
state
- double[]public void setTau(double tau)
setTau
in class OneDegreeOfFreedomJoint
tau
- torque to be applied at this joint.public void addTau(double tau)
tau
- torque to be added to this joint.public DoubleYoVariable getQ()
getQ
in class OneDegreeOfFreedomJoint
public DoubleYoVariable getQD()
getQD
in class OneDegreeOfFreedomJoint
public DoubleYoVariable getQDD()
getQDD
in class OneDegreeOfFreedomJoint
public DoubleYoVariable getTau()
getTau
in class OneDegreeOfFreedomJoint
public void setQ(double q)
setQ
in class OneDegreeOfFreedomJoint
public void setQd(double qd)
setQd
in class OneDegreeOfFreedomJoint
public void setQdd(double qdd)
setQdd
in class OneDegreeOfFreedomJoint
public void setLimitStops(double q_min, double q_max, double k_limit, double b_limit)
Adds a set of limit stops to this joint. This defines the allowed range of motion based on the provided min and max angles. Motion is constrained between these two values using a reaction torque calculated using the given spring and damper constants.
q_min
- minimum allowed angle for this joint.q_max
- maximum allowed angle for this joint.k_limit
- spring constant used in torque calculationsb_limit
- damping constant used in torque calculationspublic void setVelocityLimits(double qd_max, double b_vel_limit)
qd_max
- maximum allowed velocityb_vel_limit
- damping constant for torque calculations.public void setTorqueSpeedCurve(TorqueSpeedCurve torqueSpeedCurve)
public void setTorqueLimits(double maxTorque)
tau_max
- torque limit.public void setDamping(double b_damp)
setDamping
in class OneDegreeOfFreedomJoint
b_damp
- general damping constant for this jointpublic void setDampingParameterOnly(double b_damp)
public double getDamping()
getDamping
in class OneDegreeOfFreedomJoint
public double getTorqueLimit()
getTorqueLimit
in class OneDegreeOfFreedomJoint
public double getVelocityLimit()
getVelocityLimit
in class OneDegreeOfFreedomJoint
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |