public class SynchronizedRobot extends AbstractRobot<org.robokind.api.motion.sync.SynchronizedJoint>
Robot.Id, Robot.JointId, Robot.RobotPositionHashMap, Robot.RobotPositionMap| Modifier and Type | Field and Description |
|---|---|
static String |
PROP_ADD_ROBOT
Property change event name for adding a Robot.
|
static String |
PROP_REMOVE_ROBOT
Property change event name for removing a Robot.
|
static VersionProperty |
VERSION
Robot type VersionProperty.
|
static String |
VERSION_NAME
Robot type version name.
|
static String |
VERSION_NUMBER
Robot type version number.
|
myJointList, myJointMapPROP_CONNECTED, PROP_ENABLED, PROP_ID| Constructor and Description |
|---|
SynchronizedRobot(Robot.Id robotId,
Set<Joint.Id> jointIds)
Creates a new SynchronizedRobot from the given values
|
SynchronizedRobot(SynchronizedRobotConfig config)
Creates a new SynchronizedRobot from the given configuration.
|
| Modifier and Type | Method and Description |
|---|---|
void |
addRobot(Robot robot)
Adds a Robot to be Synchronized.
|
boolean |
connect()
The Robot will accept commands only after it is successfully connected.
|
void |
disconnect()
Disconnect the Robot.
|
Robot |
getPrimaryRobot()
Returns the primary Robot being synchronized.
|
List<Robot> |
getRobots()
Returns a List of all Robots being Synchronized.
|
boolean |
isConnected()
Returns true if the Robot is connected.
|
void |
move(Robot.RobotPositionMap positions,
long lenMillisec)
Move the Joints with the given ids to the corresponding positions.
|
void |
removeRobot(Robot.Id robotId)
Removes a Robot from being Synchronized.
|
void |
setPrimaryRobot(Robot.Id robotId)
Sets the primary Robot.
|
addJoint, clearJoints, getCurrentPositions, getDefaultPositions, getGoalPositions, getJoint, getJointIds, getJointList, getJointName, getRobotId, isEnabled, removeJoint, setEnabledaddPropertyChangeListener, 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 static final String VERSION_NAME
public static final String VERSION_NUMBER
public static final VersionProperty VERSION
public static final String PROP_ADD_ROBOT
public static final String PROP_REMOVE_ROBOT
public SynchronizedRobot(SynchronizedRobotConfig config)
config - configuration for initializing the SynchronizedRobotpublic boolean connect()
Robotpublic void disconnect()
Robotpublic boolean isConnected()
Robotpublic void move(Robot.RobotPositionMap positions, long lenMillisec)
Robotpositions - map of Joint logical ids and positionslenMillisec - duration of the movement in millisecondspublic Robot getPrimaryRobot()
public List<Robot> getRobots()
public void addRobot(Robot robot)
robot - Robot to addpublic void removeRobot(Robot.Id robotId)
robotId - robot to removepublic void setPrimaryRobot(Robot.Id robotId)
robotId - Copyright © 2011-2014. All Rights Reserved.