S - Servo Type to usepublic class ServoJoint<S extends Servo> extends AbstractJoint
| Modifier and Type | Field and Description |
|---|---|
protected S |
myServo
The ServoJoint's Servo
|
myPropertiesPROP_ENABLED, PROP_GOAL_POSITION| Constructor and Description |
|---|
ServoJoint(Joint.Id jointId,
S servo,
List<JointProperty> properties)
Creates a new ServoJoint
|
| Modifier and Type | Method and Description |
|---|---|
NormalizedDouble |
getDefaultPosition()
Returns the Joint's default position.
|
Boolean |
getEnabled()
If enabled, this Joint will accept move commands.
|
NormalizedDouble |
getGoalPosition()
Returns the goal position.
|
String |
getName()
Returns the name of the Joint.
|
NormalizableRange<Double> |
getPositionRange()
Returns the NormalizableRange describing the range of motion.
|
Servo |
getServo()
Returns the Servo backing this ServoJoint.
|
void |
setEnabled(Boolean enabled)
If enabled, this Joint will accept move commands.
|
protected void |
setGoalPosition(NormalizedDouble pos)
Allows the ServoRobot to set the goal position.
|
addProperty, getId, getProperties, getProperty, getProperty, propertyChange, removePropertyaddPropertyChangeListener, addPropertyChangeListener, clearAllListeners, clearListeners, fireIndexedPropertyChange, fireIndexedPropertyChange, fireIndexedPropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, getPropertyChangeListeners, getPropertyChangeListeners, hasListeners, removePropertyChangeListener, removePropertyChangeListenerclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitaddPropertyChangeListener, addPropertyChangeListener, removePropertyChangeListener, removePropertyChangeListenerpublic ServoJoint(Joint.Id jointId, S servo, List<JointProperty> properties)
jointId - Joint.Id to useservo - Servo to useproperties - JointProperties for this Jointpublic String getName()
Jointpublic NormalizedDouble getDefaultPosition()
Jointpublic NormalizableRange<Double> getPositionRange()
Jointpublic void setEnabled(Boolean enabled)
Jointpublic Boolean getEnabled()
Jointpublic NormalizedDouble getGoalPosition()
Jointpublic Servo getServo()
protected void setGoalPosition(NormalizedDouble pos)
pos - new goal positionCopyright © 2011-2014. All Rights Reserved.