|
|||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--Robot
A class to encapsulate the information and operations required to represent and manipulate a model of a robot. The Robot class is an implementation of the Singleton Pattern, as shown in Gamma et al (p. 127), which ensures only one instance of the Robot class is created, and provides access to that instance.
Inner Class Summary | |
class |
Robot.Interpolator
A public class to handle moving the Robot between two positions. |
Field Summary | |
static int |
X_UP
Constant to define the X-axis as the "up" direction. |
static int |
Y_UP
Constant to define the Y-axis as the "up" direction. |
static int |
Z_UP
Constant to define the Z-axis as the "up" direction. |
Method Summary | |
static Robot |
getInstance()
A static accessor to provide access to the singleton instance of the Robot class. |
JointVariables |
getJointVariables()
Returns the current JointVariables object. |
javax.media.j3d.BranchGroup |
getModels()
Returns the robot BranchGroup, assembled using the DH parameters. |
RemoteObservable |
getObservable()
Gets the RemoteObservable Object. |
double |
getRotation()
Returns the angle of rotation around the "up" axis. |
double |
getSpeed()
Returns the speed of the robot's motion. |
int |
getUpAxis()
Returns the axis defined as the "up" direction. |
double |
getZoom()
Returns the initial zoom factor. |
void |
home()
Moves the Robot to its 'home' position. |
void |
loadRobotModel(java.lang.String robotparser,
java.io.Reader r)
Loads the simulation configuration file from the Reader using configured RobotParser to parse the stream to configure the Robot object for the simulation. |
void |
moveJoint(java.lang.String name,
double variable)
Moves a specific joint to a given joint position. |
protected void |
moveToDestination(JointVariables destination)
Moves the Robot to the target set of JointVariables, using an abstract interpolation algorithm. |
void |
moveToXYZ(double x,
double y,
double z)
Moves the end-effector to a specific x, y, z coordinate. |
void |
setInvKin(InvKin theInvKin)
Sets the InvKin object for the Robot. |
void |
setJointVariables(JointVariables theJointVariables)
Sets the JointVariables object to use for the Robot. |
void |
setObservable(RemoteObservable theObservable)
Sets the RemoteObservable Object. |
void |
setRotation(double rotation)
Sets the angle of rotation around the "up" axis. |
void |
setSpeed(double speed)
Sets the speed of the robot's motion. |
void |
setUpAxis(int upAxis)
Sets the axis defined as the "up" direction. |
void |
setZoom(double zoomFactor)
Sets the initial zoom factor. |
Methods inherited from class java.lang.Object |
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
toString,
wait,
wait,
wait |
Field Detail |
public static final int X_UP
public static final int Y_UP
public static final int Z_UP
Method Detail |
public static Robot getInstance()
public void loadRobotModel(java.lang.String robotparser, java.io.Reader r) throws RobotParserException
r
- the Reader stream for the robot configuration file.public void setUpAxis(int upAxis)
upAxis
- the "up" direction; either X_UP, Y_UP, or Z_UP.public int getUpAxis()
public void setRotation(double rotation)
the
- angle of rotation.public double getRotation()
public void setZoom(double zoomFactor)
zoomFactor
- the view zoom scaling factor.public double getZoom()
public void setObservable(RemoteObservable theObservable)
theObservable
- the Observable object supplying updates.public RemoteObservable getObservable()
public void setJointVariables(JointVariables theJointVariables)
theJointVariables
- the Joint Variables object to use.public JointVariables getJointVariables()
public void setInvKin(InvKin theInvKin)
theInvKin
- the InvKin object to use for the Robot.protected void moveToDestination(JointVariables destination)
destination
- the destination for the Robot JointVariables.public void home()
public void moveJoint(java.lang.String name, double variable) throws OutOfRangeException
name
- the name of the joint to move.variable
- the destination joint variable.public void moveToXYZ(double x, double y, double z) throws OutOfRangeException
x
- the destination x-coordinate.y
- the destination y-coordinate.z
- the destination z-coordinate.public void setSpeed(double speed)
speed
- the new speed for the robot's motion.public double getSpeed()
public javax.media.j3d.BranchGroup getModels()
|
|||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |