setCommandLifetime sets the command lifetime [s].
The command lifetime is the duration for which a sent
command remains active. If the hardware does not receive
further commands within the specified time frame, all local
controllers get deactivated. This is a safety feature
to mitigate the risk of accidents in case programs get
interrupted in an unsafe state, e.g., on user interrupts
(ctrl+c) or during a network fault.
Additionally, supporting hardware does not accept commands
from any other sources during the lifetime of a command.
This mitigates the risk of other users accidentally sending
conflicting targets from, e.g., the GUI, or any other groups
running in Matlab or from any other APIs.
This feature can be disabled by setting '0' or the empty
matrix '[]'. When disabled, the hardware will continue to
execute the last sent command. Note that this can result in
unexpected behavior when sending efforts and velocities.
Commands sent with an 'inf' lifetime never expire, and the
module stays locked indefinitely. Crashes may require a
hardware reset, so use with caution.
The default command lifetime for a new group is 0.25 sec.
Example
% Stop motions if hardware does not receive commands at
% least once every 100 ms.
group.setCommandLifetime(0.1);