org.robokind.api.motion.sync
Class SynchronizedRobot
java.lang.Object
org.robokind.api.common.property.PropertyChangeNotifier
org.robokind.api.motion.AbstractRobot<org.robokind.api.motion.sync.SynchronizedJoint>
org.robokind.api.motion.sync.SynchronizedRobot
- All Implemented Interfaces:
- PropertyChangeSource, Robot<org.robokind.api.motion.sync.SynchronizedJoint>
public class SynchronizedRobot
- extends AbstractRobot<org.robokind.api.motion.sync.SynchronizedJoint>
Holds multiple Robots and synchronizes their movements for the given
JointIds.
Events and JointProperties from the primary Robot are forwarded.
- Author:
- Matthew Stevenson
| Methods inherited from class org.robokind.api.motion.AbstractRobot |
addJoint, clearJoints, getCurrentPositions, getDefaultPositions, getGoalPositions, getJoint, getJointIds, getJointList, getJointName, getJointNames, getJoints, getRobotId, isEnabled, removeJoint, setEnabled |
| 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 |
VERSION_NAME
public static final String VERSION_NAME
- Robot type version name.
- See Also:
- Constant Field Values
VERSION_NUMBER
public static final String VERSION_NUMBER
- Robot type version number.
- See Also:
- Constant Field Values
VERSION
public static final VersionProperty VERSION
- Robot type VersionProperty.
PROP_ADD_ROBOT
public static final String PROP_ADD_ROBOT
- See Also:
- Constant Field Values
PROP_REMOVE_ROBOT
public static final String PROP_REMOVE_ROBOT
- See Also:
- Constant Field Values
SynchronizedRobot
public SynchronizedRobot(SynchronizedRobotConfig config)
SynchronizedRobot
public SynchronizedRobot(Robot.Id robotId,
Set<Joint.Id> jointIds)
connect
public boolean connect()
- Description copied from interface:
Robot
- The Robot will accept commands only after it is successfully connected.
- Returns:
- true is successful
disconnect
public void disconnect()
- Description copied from interface:
Robot
- Disconnect the Robot.
isConnected
public boolean isConnected()
- Description copied from interface:
Robot
- Returns true if the Robot is connected.
- Returns:
- true if the Robot is connected
move
public void move(Robot.RobotPositionMap positions,
long lenMillisec)
- Description copied from interface:
Robot
- Move the Joints with the given ids to the corresponding positions.
- Parameters:
positions - map of Joint logical ids and positionslenMillisec - duration of the movement in milliseconds
getPrimaryRobot
public Robot getPrimaryRobot()
getRobots
public List<Robot> getRobots()
addRobot
public void addRobot(Robot robot)
removeRobot
public void removeRobot(Robot.Id robotId)
setPrimaryRobot
public void setPrimaryRobot(Robot.Id robotId)
Copyright © 2011-2012. All Rights Reserved.