BB.Error.Protocol.Ufactory.HardwareFault exception (bb_ufactory v0.1.0)

Copy Markdown View Source

Structured error for xArm controller hardware faults.

Raised when the real-time report frame contains a non-zero error_code. The controller calls BB.Safety.report_error/3 with this exception, which triggers automatic disarm via the robot's topology supervisor.

Error Code Table

Error codes come from the ControllerErrorCodeMap in the xArm Python SDK (xarm/core/config/x_code.py). All codes are severity :critical — any non-zero error code stops the arm.

CodeTitle
1Emergency Stop Button on controller pressed
2Emergency IO of Control Box triggered
3Emergency Stop Button of Three-state Switch pressed
10Servo motor error
11–17Servo motor N error
18Force Torque Sensor Communication Error
19End Effector Communication Error
21Kinematic Error
22Self-Collision Error
23Joints Angle Exceed Limit
24Speed Exceeds Limit
25Planning Error
26Linux RT Error
27Command Reply Error
28End Module Communication Error
30Feedback Speed Exceeds Limit
31Collision Caused Abnormal Current
32Three-point Drawing Circle Calculation Error
33Controller GPIO Error
34Recording Timeout
35Safety Boundary Limit
36Number of Delay Commands Exceeds Limit
37Abnormal Movement in Manual Mode
38Abnormal Joint Angle
39Abnormal Communication Between Master and Slave IC of Power Board
40Solution Failure of Error-free Joint Trajectory
41Friction File Content Invalid
42Calibration File Content Invalid
50Six-axis Force Torque Sensor Read Error
51Six-axis Force Torque Sensor Set Mode Error
52Six-axis Force Torque Sensor Set Zero Error
53Six-axis Force Torque Sensor Overloaded or Reading Exceeds Limit
60Linear Speed Exceeded Limit in servo_j Mode
110Robot Arm Base Board Communication Error
111Control Box External 485 Device Communication Error

Use describe/1 to look up a human-readable title for a given error code.

Summary

Functions

Returns the human-readable description for a given xArm controller error code.

Functions

describe(error_code)

@spec describe(non_neg_integer()) :: String.t()

Returns the human-readable description for a given xArm controller error code.

Falls back to "Unknown xArm error code <n>" for codes not in the table.

exception(args)

@spec exception(opts :: Keyword.t()) :: %BB.Error.Protocol.Ufactory.HardwareFault{
  __exception__: term(),
  bread_crumbs: term(),
  class: term(),
  description: term(),
  error_code: term(),
  path: term(),
  splode: term(),
  stacktrace: term(),
  vars: term()
}

Create an Elixir.BB.Error.Protocol.Ufactory.HardwareFault without raising it.

Keys

  • :error_code
  • :description