next up previous
Next: Device state Up: Simulator Back-end Previous: DeviceSimulation


Motions

ACME's Motion objects are high-level descriptions of a given device motion. As such, they reference a MotionGoal, a MotionCtrl, and a target device. The MotionGoal specifies the geometry of the motion, that is, a set of joint values in the case of a JOINT_GOAL, or a homogeneous transformation matrix in the case of a CARTESIAN_GOAL. The MotionCtrl object specifies how the desired goal is to be achieved - essentially, the dynamics of the motion. The target device corresponds to the robot which is to carry out the motion.

A set of successive motions can be encapsulated in a MotionPlan. The MotionPlan's execute() method resolves each motions into its MotionGoal, MotionCtrl, and target device components. These components are passed to the RcclSimulationServer, which reassembles them into instances of our new simulator.Motion class.

The RcclSimulationServer keeps a separate motion block (queue of motions) for each target device. Each new simulator.Motion object is then placed in the appropriate motion block. Once all motions have been dispatched by the MotionPlan, each motion block is placed on the input queue of the corresponding DeviceSimulation subclass.

Note that simulator.Motion objects are only used by the simulator internally. Their purpose is to provide the data required by Connection-level functions like getCompletionTime(). They are also used to exchange motion information between the simulator and the viewer. The original acme.Motion object is still the only one visible to the end user.

The ACME package also provides a Motion subclass called Move, which facilitates the definition of typical robot motions. The following example shows motions at work.


Fms gantry = (Fms) Platform.getDevice(DeviceId.FMS);
Cms puma = (Cms) platform.getDevice(DeviceId.CMS); 
double[] jointValues = {2.0, 1.0, 1.0, -(Math.PI/4.0), Math.PI/2.0};
Matrix4d matrix = new Matrix4d();
// initialize matrix ...
Move pumaMove = new Move(puma, 
			 matrix, 
			 acme.kinematics.PumaKinematics.RIGHT_CONF);
Move gantryMove = new Move (gantry, jointValues);

plan.add(pumaMove);
plan.add(gantryMove);
plan.execute();


next up previous
Next: Device state Up: Simulator Back-end Previous: DeviceSimulation
Tim Wellhausen
2000-01-20