org.robokind.api.motion
Interface Joint

All Superinterfaces:
org.robokind.api.common.property.PropertyChangeSource
All Known Implementing Classes:
AbstractJoint, EmptyServoJoint, ServoJoint

public interface Joint
extends org.robokind.api.common.property.PropertyChangeSource

A Joint represents the values and properties of a DoF (degree of freedom) of a Robot. A Joint provides the goal position, and various JointProperties. Joints are intended to provide read-only access to properties, however some JointProperties can support writing the property as well. Joints can not be moved directly, move commands must go through the Robot.

Author:
Matthew Stevenson

Nested Class Summary
static class Joint.Id
          Joint.Id is an immutable identifier for a Joint within a Robot or ServoController.
 
Field Summary
static String PROP_ENABLED
          Property string for Enabled.
static String PROP_GOAL_POSITION
          Property string for GoalPostion.
 
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.
 Joint.Id getId()
          Returns the Joint's logical id.
 String getName()
          Returns the name of the Joint.
 JointProperty getProperty(String name)
          Returns the JointProperty with the given name.
<T> JointProperty<T>
getProperty(String name, Class<T> propertyType)
          Returns the JointProperty with the given name, ensuring the value is assignable to propertyType.
 void setEnabled(Boolean enabled)
          If enabled, this Joint will accept move commands.
 
Methods inherited from interface org.robokind.api.common.property.PropertyChangeSource
addPropertyChangeListener, addPropertyChangeListener, removePropertyChangeListener, removePropertyChangeListener
 

Field Detail

PROP_GOAL_POSITION

static final String PROP_GOAL_POSITION
Property string for GoalPostion.

See Also:
Constant Field Values

PROP_ENABLED

static final String PROP_ENABLED
Property string for Enabled.

See Also:
Constant Field Values
Method Detail

getId

Joint.Id getId()
Returns the Joint's logical id.

Returns:
Joint's logical id

getName

String getName()
Returns the name of the Joint.

Returns:
name of the Joint

getDefaultPosition

org.robokind.api.common.position.NormalizedDouble getDefaultPosition()
Returns the Joint's default position.

Returns:
Joint's default position

getGoalPosition

org.robokind.api.common.position.NormalizedDouble getGoalPosition()
Returns the goal position.

Returns:
goal position

setEnabled

void setEnabled(Boolean enabled)
If enabled, this Joint will accept move commands. If not enabled, this joint should not move.

Parameters:
enabled -

getEnabled

Boolean getEnabled()
If enabled, this Joint will accept move commands. If not enabled, this joint should not move.

Returns:
true if enabled

getProperty

<T> JointProperty<T> getProperty(String name,
                                 Class<T> propertyType)
Returns the JointProperty with the given name, ensuring the value is assignable to propertyType.

Type Parameters:
T - Value Type returned by the JointProperty
Parameters:
name - name of the JointProperty
propertyType - Class for T
Returns:
the JointProperty with the given name and value assignable to propertyType

getProperty

JointProperty getProperty(String name)
Returns the JointProperty with the given name.

Parameters:
name - name of the JointProperty
Returns:
the JointProperty with the given name


Copyright © 2011. All Rights Reserved.