TestRobot (bb_ufactory v0.1.0)

Copy Markdown View Source

Shared test module providing xArm6 model configuration constants.

Used as the robot atom (%{bb: %{robot: TestRobot, ...}}) across all actuator, sensor, and controller tests. All interactions with BB framework modules are mocked via Mimic — this module simply provides a stable atom and centralised constants so individual test files don't duplicate them.

Summary

Functions

Returns the joint count for the xArm6.

Returns the {lower, upper} limit tuple for joint_index (1-based).

Creates a pre-populated ETS table with joint_count joint rows and one arm row.

Returns the max joint speed in rad/s.

Returns the xArm6 model config map (joints, limits, max_speed_rads).

Functions

joint_count()

@spec joint_count() :: pos_integer()

Returns the joint count for the xArm6.

joint_limits(joint_index)

@spec joint_limits(pos_integer()) :: {float(), float()}

Returns the {lower, upper} limit tuple for joint_index (1-based).

make_ets(joint_count \\ 6)

@spec make_ets(pos_integer()) :: :ets.table()

Creates a pre-populated ETS table with joint_count joint rows and one arm row.

Each joint row: {index, current_position, current_torque, set_position} Arm row: {:arm, state, mode, tcp_pose}

max_speed()

@spec max_speed() :: float()

Returns the max joint speed in rad/s.

model_config()

@spec model_config() :: map()

Returns the xArm6 model config map (joints, limits, max_speed_rads).