# `Dev.TestRobot`
[🔗](https://github.com/mcass19/bb_tui/blob/v0.3.0/dev/test_robot.ex#L3)

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.

# `__bb_default_parameters__`

```elixir
@spec __bb_default_parameters__() :: [{[atom()], term()}]
```

Returns default parameter values.

Returns a list of `{path, value}` tuples for parameters that have defaults.

# `__bb_parameter_schema__`

```elixir
@spec __bb_parameter_schema__() :: [{[atom()], keyword()}]
```

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`.

# `calibrate`

```elixir
@spec calibrate(keyword()) :: {:ok, pid()} | {:error, term()}
```

Execute the `calibrate` command.

## Returns

- `{:ok, pid()}` - Command started, use `BB.Command.await/2` for the result
- `{:error, term()}` - Command could not be started

## Example

    {:ok, cmd} = calibrate(goal_args)
    {:ok, result} = BB.Command.await(cmd)

# `child_spec`

```elixir
@spec child_spec(Keyword.t()) :: Supervisor.child_spec()
```

Returns a child specification for starting this robot under a supervisor.

# `diagnostics`

```elixir
@spec diagnostics(keyword()) :: {:ok, pid()} | {:error, term()}
```

Execute the `diagnostics` command.

## Returns

- `{:ok, pid()}` - Command started, use `BB.Command.await/2` for the result
- `{:error, term()}` - Command could not be started

## Example

    {:ok, cmd} = diagnostics(goal_args)
    {:ok, result} = BB.Command.await(cmd)

# `home`

```elixir
@spec home(keyword()) :: {:ok, pid()} | {:error, term()}
```

Execute the `home` command.

## Returns

- `{:ok, pid()}` - Command started, use `BB.Command.await/2` for the result
- `{:error, term()}` - Command could not be started

## Example

    {:ok, cmd} = home(goal_args)
    {:ok, result} = BB.Command.await(cmd)

# `log`

```elixir
@spec log(keyword()) :: {:ok, pid()} | {:error, term()}
```

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, use `BB.Command.await/2` for the result
- `{:error, term()}` - Command could not be started

## Example

    {:ok, cmd} = log(goal_args)
    {:ok, result} = BB.Command.await(cmd)

# `move`

```elixir
@spec move(keyword()) :: {:ok, pid()} | {:error, term()}
```

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, use `BB.Command.await/2` for the result
- `{:error, term()}` - Command could not be started

## Example

    {:ok, cmd} = move(goal_args)
    {:ok, result} = BB.Command.await(cmd)

# `power`

```elixir
@spec power(keyword()) :: {:ok, pid()} | {:error, term()}
```

Execute the `power` command.

## Returns

- `{:ok, pid()}` - Command started, use `BB.Command.await/2` for the result
- `{:error, term()}` - Command could not be started

## Example

    {:ok, cmd} = power(goal_args)
    {:ok, result} = BB.Command.await(cmd)

# `robot`

```elixir
@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)

# `start_link`

```elixir
@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.

# `stream`

```elixir
@spec stream(keyword()) :: {:ok, pid()} | {:error, term()}
```

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, use `BB.Command.await/2` for the result
- `{:error, term()}` - Command could not be started

## Example

    {:ok, cmd} = stream(goal_args)
    {:ok, result} = BB.Command.await(cmd)

# `wobble`

```elixir
@spec wobble(keyword()) :: {:ok, pid()} | {:error, term()}
```

Execute the `wobble` command.

## Returns

- `{:ok, pid()}` - Command started, use `BB.Command.await/2` for the result
- `{:error, term()}` - Command could not be started

## Example

    {:ok, cmd} = wobble(goal_args)
    {:ok, result} = BB.Command.await(cmd)

---

*Consult [api-reference.md](api-reference.md) for complete listing*
