BB.Ufactory.Model (bb_ufactory v0.1.0)

Copy Markdown View Source

Per-model configuration for UFactory xArm variants.

Provides joint counts, maximum joint speed, and per-joint radian limits for each supported model. Limits are taken from the official xarm_ros2 URDF descriptions (xarm_description/urdf/<model>/<model>.urdf.xacro), which match the Python SDK's per-model configuration.

The map keys are the model atoms accepted by BB.Ufactory.Controller: :xarm5, :xarm6, :xarm7, :lite6, :xarm850.

Joint limits are {lower_rad, upper_rad} tuples, one per joint, ordered J1..Jn.

Notes

  • All values are in radians.
  • max_speed_rads is the maximum joint angular speed (rad/s).
  • These are the factory hard limits enforced by the firmware. They cannot be widened; commands are clamped to them before being sent to the arm.

Summary

Functions

Returns the full model configuration map for model.

Returns the number of joints for model.

Returns the per-joint {lower, upper} radian limits for model, ordered J1..Jn.

Returns the maximum joint angular speed in rad/s for model.

Returns a list of all supported model atoms.

Functions

get(model)

@spec get(atom()) :: %{
  joints: pos_integer(),
  max_speed_rads: float(),
  limits: [{float(), float()}]
}

Returns the full model configuration map for model.

Raises KeyError for unknown model atoms.

Examples

iex> %{joints: 6} = BB.Ufactory.Model.get(:xarm6)

joint_count(model)

@spec joint_count(atom()) :: pos_integer()

Returns the number of joints for model.

Examples

iex> BB.Ufactory.Model.joint_count(:xarm7)
7

joint_limits(model)

@spec joint_limits(atom()) :: [{float(), float()}]

Returns the per-joint {lower, upper} radian limits for model, ordered J1..Jn.

Examples

iex> [{-6.283185307179586, 6.283185307179586} | _] = BB.Ufactory.Model.joint_limits(:xarm6)

max_speed_rads(model)

@spec max_speed_rads(atom()) :: float()

Returns the maximum joint angular speed in rad/s for model.

Examples

iex> BB.Ufactory.Model.max_speed_rads(:xarm6)
3.141592653589793

supported_models()

@spec supported_models() :: [atom()]

Returns a list of all supported model atoms.

Examples

iex> :xarm6 in BB.Ufactory.Model.supported_models()
true