Gripper G2 position actuator for xArm arms.
Controls the UFactory Gripper G2 via the xArm RS485 RTU proxy (register
0x7C). Position is expressed in pulse units (0–840). The G2 range is
0–840, capped at 840 in BB.Ufactory.Protocol.cmd_gripper_position/2.
Lifecycle
The gripper is not enabled during init/1. Instead, the actuator
registers its cmd_gripper_enable(true) and cmd_gripper_speed frames
with the controller, which sends them at the end of its own arm sequence
on every :armed transition. This guarantees no RS485 command reaches the
bus before the arm controller is fully initialized (mode 0, state 0) —
ordering a separate state-machine subscription could not provide, since
pubsub dispatch order across subscribers is unspecified.
Command Interface
Receives standard %BB.Message.Actuator.Command.Position{} commands, where
position is the target position in pulse units (0.0–840.0). Non-integer
values are rounded to the nearest integer.
Disarm
On disarm, the actuator sends cmd_gripper_enable(false) through the
controller via BB.Process.call/3, avoiding the need for host/port
in the actuator's init opts.