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, 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 |
| 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 |
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 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 NormalizedDouble getGoalPosition()
- Description copied from interface:
Joint
- Returns the goal position.
- Returns:
- goal position
getServo
public Servo getServo()
setGoalPosition
protected void setGoalPosition(NormalizedDouble pos)
- Allows the ServoRobot to set the goal position.
- Parameters:
pos - new goal position
Copyright © 2011-2012. All Rights Reserved.