A simulated WidowX-200 style robot arm for development.
Based on the WidowX-200 5-DOF robot arm kinematic structure but without any hardware controllers — purely for TUI development and testing.
Summary
Functions
Returns default parameter values.
Returns the parameter schema for validation.
Execute the calibrate command.
Returns a child specification for starting this robot under a supervisor.
Execute the home command.
Execute the log command.
Execute the move command.
Returns the optimised robot representation.
Starts the robot's supervision tree.
Execute the stream command.
Execute the wobble command.
Functions
Returns default parameter values.
Returns a list of {path, value} tuples for parameters that have defaults.
Returns the parameter schema for validation.
The schema is a list of {path, opts} tuples where opts is a keyword
list compatible with Spark.Options.
Execute the calibrate command.
Returns
{:ok, pid()}- Command started, useBB.Command.await/2for the result{:error, term()}- Command could not be started
Example
{:ok, cmd} = calibrate(goal_args)
{:ok, result} = BB.Command.await(cmd)
@spec child_spec(Keyword.t()) :: Supervisor.child_spec()
Returns a child specification for starting this robot under a supervisor.
Execute the home command.
Returns
{:ok, pid()}- Command started, useBB.Command.await/2for the result{:error, term()}- Command could not be started
Example
{:ok, cmd} = home(goal_args)
{:ok, result} = BB.Command.await(cmd)
Execute the log command.
Arguments
message::string, default:"hello"- Free-form note attached to the entry.level::integer, default:1- Severity 1..5; higher is louder.
Returns
{:ok, pid()}- Command started, useBB.Command.await/2for the result{:error, term()}- Command could not be started
Example
{:ok, cmd} = log(goal_args)
{:ok, result} = BB.Command.await(cmd)
Execute the move command.
Arguments
joint:{:in, [:waist, :shoulder, :elbow, :wrist_angle, :wrist_rotate, :gripper]}, default::waist- Joint to drive.angle::float, default:0.0- Target joint angle, in radians.
Returns
{:ok, pid()}- Command started, useBB.Command.await/2for the result{:error, term()}- Command could not be started
Example
{:ok, cmd} = move(goal_args)
{:ok, result} = BB.Command.await(cmd)
@spec robot() :: BB.Robot.t()
Returns the optimised robot representation.
This struct is built at compile-time from the DSL definition and contains:
- All physical values converted to SI base units (floats)
- Flat maps for O(1) lookup of links, joints, sensors, and actuators
- Pre-computed topology metadata for efficient traversal
Examples
robot = Elixir.Dev.TestRobot.robot()
link = BB.Robot.get_link(robot, :base_link)
joint = BB.Robot.get_joint(robot, :shoulder)
@spec start_link(Keyword.t()) :: Supervisor.on_start()
Starts the robot's supervision tree.
Options
All options are passed through to sensor and actuator child processes.
Execute the stream command.
Arguments
joint:{:in, [:waist, :shoulder, :elbow, :wrist_angle, :wrist_rotate, :gripper]}, default::waist- Joint to sweep.
Returns
{:ok, pid()}- Command started, useBB.Command.await/2for the result{:error, term()}- Command could not be started
Example
{:ok, cmd} = stream(goal_args)
{:ok, result} = BB.Command.await(cmd)
Execute the wobble command.
Returns
{:ok, pid()}- Command started, useBB.Command.await/2for the result{:error, term()}- Command could not be started
Example
{:ok, cmd} = wobble(goal_args)
{:ok, result} = BB.Command.await(cmd)