|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.robokind.api.motion.AbstractRobot<J>
J
- Type of Joint used by this Robotpublic abstract class AbstractRobot<J extends Joint>
Provides common functionality for Robot implementations
Nested Class Summary |
---|
Nested classes/interfaces inherited from interface org.robokind.api.motion.Robot |
---|
Robot.Id, Robot.JointId, Robot.RobotPositionHashMap, Robot.RobotPositionMap |
Field Summary | |
---|---|
protected Map<Robot.JointId,J> |
myJointMap
Map of the Robot's JointIds and Joints. |
Fields inherited from interface org.robokind.api.motion.Robot |
---|
PROP_ID |
Constructor Summary | |
---|---|
AbstractRobot(Robot.Id robotId)
Creates an empty Robot with the given RobotId |
Method Summary | |
---|---|
Robot.RobotPositionMap |
getCurrentPositions()
Returns a map of the Robot's Joint's ids and their current positions. |
Robot.RobotPositionMap |
getDefaultPositions()
Returns a map of the Robot's Joint's ids and their default positions. |
Robot.RobotPositionMap |
getGoalPositions()
Returns a map of the Robot's Joint's ids and their goal positions. |
Joint |
getJoint(Robot.JointId id)
Return the Joint with the given id. |
Set<Robot.JointId> |
getJointIds()
Returns a set of the Robot's Joint ids. |
String |
getJointName(Robot.JointId id)
The Robot's name for the Joint with the given logical id. |
Map<Robot.JointId,String> |
getJointNames()
Returns a map of the Robot's Joint's ids and their names. |
Map<Robot.JointId,J> |
getJoints()
Returns a map of the Robot's Joints and their ids. |
Robot.Id |
getRobotId()
Returns a String uniquely identifying this Robot. |
boolean |
isEnabled()
Returns true if the Robot is enabled and accepting commands. |
void |
setEnabled(boolean val)
Sets the enabled status of the Robot. |
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.motion.Robot |
---|
connect, disconnect, isConnected, move |
Field Detail |
---|
protected Map<Robot.JointId,J extends Joint> myJointMap
Constructor Detail |
---|
public AbstractRobot(Robot.Id robotId)
robotId
- unique RobotIdMethod Detail |
---|
public Robot.Id getRobotId()
Robot
getRobotId
in interface Robot
public Joint getJoint(Robot.JointId id)
Robot
getJoint
in interface Robot
id
- Joint's logical id
public Set<Robot.JointId> getJointIds()
Robot
getJointIds
in interface Robot
public Map<Robot.JointId,J> getJoints()
Robot
getJoints
in interface Robot
public String getJointName(Robot.JointId id)
Robot
getJointName
in interface Robot
id
- Joint's logical id
public boolean isEnabled()
isEnabled
in interface Robot
public void setEnabled(boolean val)
setEnabled
in interface Robot
val
- enabled valuepublic Map<Robot.JointId,String> getJointNames()
Robot
getJointNames
in interface Robot
public Robot.RobotPositionMap getDefaultPositions()
Robot
getDefaultPositions
in interface Robot
public Robot.RobotPositionMap getCurrentPositions()
Robot
getCurrentPositions
in interface Robot
public Robot.RobotPositionMap getGoalPositions()
Robot
getGoalPositions
in interface Robot
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |