Motion commands#
Motion commands are used to generate a trajectory for the robot. When a Mecademic robot receives a motion command, it places it in a motion queue. The command will be run once all preceding motion commands have been executed. In other words, motion commands are synchronous.
Most motion commands have arguments, but not all have default values (e.g., the argument
for the command Delay). The arguments for most motion commands are IEEE-754
floating-point numbers, separated by commas and spaces (optional).
Motion commands do not generate a direct response and the only way to know
exactly when a certain motion command has been executed is to use the command
SetCheckpoint (a response is then sent when the checkpoint has been reached).
The robot sends an end-of-movement message (EOM, code 3004) whenever it
has stopped moving for at least 1 ms, if this option is activated with
SetEom. The EOM message is sent whether or not all queued commands have been
executed.
Furthermore, by default, the robot sends an end-of-block message (EOB,
code 3012) every time the robot has stopped moving AND its motion queue is empty. For
example, if both EOM and EOB messages are enabled, and you immediately send a
MoveJoints, SetTrf, MovePose and Delay
command one after the other, the robot will send an EOM message when it has stopped, and
then an EOB message as soon as the delay has elapsed.
Do not rely on EOB or EOM messages to verify the execution of a sequence of
motion commands. Due to communication latency, the robot may issue an EOB signal once
it finishes its current buffer, even if additional commands are still in transit between
the application and the robot. Using the SetCheckpoint command is the best
way to follow the sequence of execution of commands. Finally, motion commands can
generate errors, explained in Section 3.2.1.
The motion commands are listed below in several groups.
Joint-space, position-mode movement commands
Cartesian-space, position-mode movement commands
Velocity-mode movement commands
Robot posture and turn configuration commands
Other motion commands