Arm state and mode snapshot from the xArm real-time report.
Published by BB.Ufactory.Controller to [:sensor, controller_name, :arm_status]
whenever the arm's state, mode, error_code, or warn_code changes between
consecutive report frames.
Fields
state— arm motion state integer (per the xArm Python SDKget_state):1— in motion2— sleeping (ready, no motion)3— suspended (paused)4— stopping- Other values are firmware-internal transitional states and are passed through unchanged.
mode— control mode integer (per the SDKset_mode):0— position control (normal operation)1— servo motion (real-time servo mode)2— joint teaching (manual drag)3— Cartesian teaching (manual drag in Cartesian space)4— joint velocity control5— Cartesian velocity control6— joint online trajectory planning7— Cartesian online trajectory planning
error_code— hardware/controller error code (0= no error). SeeBB.Error.Protocol.Ufactory.HardwareFaultfor the full code table.warn_code— controller warning code (0= no warning).
State is taken from the lower nibble of byte 4 of the real-time report frame; mode from the upper nibble.
Summary
Types
@type t() :: %BB.Ufactory.Message.ArmStatus{ error_code: non_neg_integer(), mode: non_neg_integer(), state: non_neg_integer(), warn_code: non_neg_integer() }
Functions
@spec new( atom(), keyword() ) :: {:ok, BB.Message.t()} | {:error, term()}