The Balance Bot's topology, with nothing attached to it.
The same robot the installer writes into a user's project, minus the IMU. The BMI323 driver stops rather than declining when the chip isn't there, which on the host would take the supervision tree with it, so the tests publish onto the estimator's path directly instead.
The wheels are declared and will decline to start — there is no pwmchip0 on
a laptop — which is the behaviour a robot missing its hardware is supposed to
have, and is worth exercising.
Anything here that disagrees with the bb_nsk.add_* tasks is a bug in one of
them.
Summary
Functions
Returns default parameter values.
Returns the parameter schema for validation.
Execute the arm command.
Returns a child specification for starting this robot under a supervisor.
Execute the disarm command.
Execute the fall command.
Execute the poweroff command.
Returns the optimised robot representation.
Execute the stand command.
Starts the robot's supervision tree.
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 arm command.
Returns
{:ok, pid()}- Command started, useBB.Command.await/2for the result{:error, term()}- Command could not be started
Example
{:ok, cmd} = arm(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 disarm command.
Returns
{:ok, pid()}- Command started, useBB.Command.await/2for the result{:error, term()}- Command could not be started
Example
{:ok, cmd} = disarm(goal_args)
{:ok, result} = BB.Command.await(cmd)
Execute the fall command.
Returns
{:ok, pid()}- Command started, useBB.Command.await/2for the result{:error, term()}- Command could not be started
Example
{:ok, cmd} = fall(goal_args)
{:ok, result} = BB.Command.await(cmd)
Execute the poweroff command.
Returns
{:ok, pid()}- Command started, useBB.Command.await/2for the result{:error, term()}- Command could not be started
Example
{:ok, cmd} = poweroff(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.BB.NSK.TestRobot.robot()
{:ok, link} = BB.Robot.get_link(robot, :base_link)
{:ok, joint} = BB.Robot.get_joint(robot, :shoulder)
Execute the stand command.
Returns
{:ok, pid()}- Command started, useBB.Command.await/2for the result{:error, term()}- Command could not be started
Example
{:ok, cmd} = stand(goal_args)
{:ok, result} = BB.Command.await(cmd)
@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.