org.robokind.api.motion.servos
Class ServoJoint<S extends Servo>
java.lang.Object
org.robokind.api.common.property.PropertyChangeNotifier
org.robokind.api.motion.AbstractJoint
org.robokind.api.motion.servos.ServoJoint<S>
- Type Parameters:
S
- Servo Type to use
- All Implemented Interfaces:
- PropertyChangeListener, EventListener, org.robokind.api.common.property.PropertyChangeSource, Joint
- Direct Known Subclasses:
- EmptyServoJoint
public class ServoJoint<S extends Servo>
- extends AbstractJoint
- Author:
- Matthew Stevenson
Nested classes/interfaces inherited from interface org.robokind.api.motion.Joint |
Joint.Id |
Field Summary |
protected S |
myServo
The ServoJoint's Servo |
Method Summary |
org.robokind.api.common.position.NormalizedDouble |
getDefaultPosition()
Returns the Joint's default position. |
Boolean |
getEnabled()
If enabled, this Joint will accept move commands. |
org.robokind.api.common.position.NormalizedDouble |
getGoalPosition()
Returns the goal position. |
String |
getName()
Returns the name of the Joint. |
void |
setEnabled(Boolean enabled)
If enabled, this Joint will accept move commands. |
protected void |
setGoalPosition(org.robokind.api.common.position.NormalizedDouble pos)
Allows the ServoRobot to set the goal position. |
Methods inherited from class org.robokind.api.common.property.PropertyChangeNotifier |
addPropertyChangeListener, addPropertyChangeListener, fireIndexedPropertyChange, fireIndexedPropertyChange, fireIndexedPropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, removePropertyChangeListener, removePropertyChangeListener |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface org.robokind.api.common.property.PropertyChangeSource |
addPropertyChangeListener, addPropertyChangeListener, removePropertyChangeListener, removePropertyChangeListener |
myServo
protected S extends Servo myServo
- The ServoJoint's Servo
ServoJoint
public ServoJoint(Joint.Id jointId,
S servo,
List<JointProperty> properties)
- Creates a new ServoJoint
- Parameters:
jointId
- Joint.Id to useservo
- Servo to useproperties
- JointProperties for this Joint
getName
public String getName()
- Description copied from interface:
Joint
- Returns the name of the Joint.
- Returns:
- name of the Joint
getDefaultPosition
public org.robokind.api.common.position.NormalizedDouble getDefaultPosition()
- Description copied from interface:
Joint
- Returns the Joint's default position.
- Returns:
- Joint's default position
setEnabled
public void setEnabled(Boolean enabled)
- Description copied from interface:
Joint
- If enabled, this Joint will accept move commands.
If not enabled, this joint should not move.
getEnabled
public Boolean getEnabled()
- Description copied from interface:
Joint
- If enabled, this Joint will accept move commands.
If not enabled, this joint should not move.
- Returns:
- true if enabled
getGoalPosition
public org.robokind.api.common.position.NormalizedDouble getGoalPosition()
- Description copied from interface:
Joint
- Returns the goal position.
- Returns:
- goal position
setGoalPosition
protected void setGoalPosition(org.robokind.api.common.position.NormalizedDouble pos)
- Allows the ServoRobot to set the goal position.
- Parameters:
pos
- new goal position
Copyright © 2011. All Rights Reserved.