Search documentation of bb

# API Reference bb v#0.17.0

Copy Markdown View Source

## Modules

BB

Documentation for `BB` (Beam Bots).

BB.Actuator

Behaviour and API for actuators in the BB framework.

BB.Actuator.Server

Wrapper GenServer for actuator callback modules.

BB.Bridge

Behaviour for parameter bridge GenServers in the BB framework.

BB.BridgeSupervisor

Supervisor for parameter protocol bridges.

BB.Collision

Collision detection for BB robots.

BB.Collision.BroadPhase

Broad phase collision detection using Axis-Aligned Bounding Boxes (AABBs).

BB.Collision.Mesh

Mesh loading and bounding geometry computation for collision detection.

BB.Collision.Primitives

Collision detection algorithms for primitive geometry pairs.

BB.Command

Behaviour for implementing robot commands.

BB.Command.Arm

Standard command handler for arming a robot.

BB.Command.Context

Context provided to command handlers during execution.

BB.Command.Disarm

Standard command handler for disarming a robot.

BB.Command.Event

Payload type for command execution events.

BB.Command.MoveTo

Standard command handler for moving end-effectors to target positions.

BB.Command.ResultCache

Caches command results for retrieval after the command process terminates.

BB.Command.Server

GenServer wrapper for command callback modules.

BB.Command.SetState

Reusable command handler for transitioning between operational states.

BB.Controller

Behaviour for controllers in the BB framework.

BB.Controller.Action

Action builders and executor for reactive controllers.

BB.Controller.Action.Callback

Action that calls an arbitrary function.

BB.Controller.Action.Command

Action that invokes a robot command.

BB.Controller.Action.Context

Context provided to action callbacks.

BB.Controller.PatternMatch

Controller that triggers an action when a message matches a predicate.

BB.Controller.Server

Wrapper GenServer for controller callback modules.

BB.Controller.Threshold

Convenience wrapper around PatternMatch for threshold monitoring.

BB.ControllerSupervisor

Supervisor for robot-level controllers.

BB.Diagnostic

Diagnostic reporting for monitoring and awareness.

BB.Dsl

The DSL extension for describing robot properties and topologies.

BB.Dsl.Actuator

An actuator attached to a joint.

BB.Dsl.Axis

Joint axis orientation specified as Euler angles.

BB.Dsl.Box

A box geometry

BB.Dsl.Bridge

A parameter protocol bridge for remote access.

BB.Dsl.Capsule

A capsule geometry (cylinder with hemispherical caps).

BB.Dsl.Category

A command category for grouping commands with concurrent execution limits.

BB.Dsl.CategoryTransformer

Collects category definitions and injects category-related functions.

BB.Dsl.Collision

Collision information

BB.Dsl.Color

A color

BB.Dsl.Command

A command that can be executed on the robot.

BB.Dsl.Command.Argument

An argument for a command.

BB.Dsl.CommandTransformer

Generates convenience functions for commands on the robot module.

BB.Dsl.Controller

A controller process at the robot level.

BB.Dsl.Cylinder

A cylindrical geometry

BB.Dsl.DefaultNameTransformer

Ensures that the default robot name is present

BB.Dsl.Dynamics

Specifies physical properties of the joint. These values are used to specify modeling properties of the joint, particularly useful for simulation

BB.Dsl.Inertia

Inertial information.

BB.Dsl.Inertial

Inertial information.

BB.Dsl.Joint

A joint in the robot topology chain.

BB.Dsl.Limit

Joint limits

BB.Dsl.Link

A kinematic link aka a solid body in a kinematic chain.

BB.Dsl.Material

A material

BB.Dsl.Mesh

A 3D model (mesh)

BB.Dsl.Origin

An origin location.

BB.Dsl.Param

A runtime-adjustable parameter.

BB.Dsl.ParamGroup

A group of runtime-adjustable parameters.

BB.Dsl.ParamRef

A reference to a parameter for use in DSL fields.

BB.Dsl.ParameterTransformer

Generates parameter schema and default values from DSL definitions.

BB.Dsl.RobotTransformer

Builds and persists the optimised Robot struct at compile-time.

BB.Dsl.Sensor

A sensor attached to the robot or a specific link.

BB.Dsl.Sphere

A spherical geometry

BB.Dsl.State

A custom operational state for the robot.

BB.Dsl.StateTransformer

Collects state definitions and injects state-related functions.

BB.Dsl.SupervisorTransformer

Injects `start_link/1` and `child_spec/1` into robot modules.

BB.Dsl.Texture

A 2D texture

BB.Dsl.TopologyTransformer

Validate and transform links as required.

BB.Dsl.UniquenessTransformer

Validates that all entity names are globally unique across the robot.

BB.Dsl.ValidateLimitUnitsTransformer

Validates that the units provided in a joint's `limit` block are compatible with the joint's type.

BB.Dsl.Verifiers.ValidateCategoryRefs

Validates that category references in commands are valid.

BB.Dsl.Verifiers.ValidateChildSpecs

Validates that child_spec options match the module's schema.

BB.Dsl.Verifiers.ValidateParamRefs

Validates that parameter references in the DSL refer to valid parameters.

BB.Dsl.Verifiers.ValidateStateRefs

Validates that state references in commands are valid.

BB.Dsl.Visual

A material

BB.Dsl.WildcardExpansionTransformer

Expands `:*` wildcards in command `allowed_states` and `cancel` options.

BB.Error

Structured error handling for the Beam Bots ecosystem.

BB.Error.Category

Error class for command category-related errors.

BB.Error.Category.Full

Category is at capacity for concurrent commands.

BB.Error.Hardware

Hardware communication error classes.

BB.Error.Hardware.BusError

Communication bus error (I2C, serial, etc.).

BB.Error.Hardware.DeviceError

Error reported by the hardware device itself.

BB.Error.Hardware.Disconnected

Hardware device is disconnected or not responding.

BB.Error.Hardware.Timeout

Communication timeout with a hardware device.

BB.Error.Invalid

Configuration and validation error classes.

BB.Error.Invalid.Command

Invalid command or command arguments.

BB.Error.Invalid.JointConfig

Invalid joint configuration.

BB.Error.Invalid.Parameter

Invalid runtime parameter.

BB.Error.Invalid.Topology

Robot topology configuration error.

BB.Error.Kinematics

Kinematics and motion planning error classes.

BB.Error.Kinematics.MultiFailed

Multi-target inverse kinematics failed.

BB.Error.Kinematics.NoDofs

Kinematic chain has no degrees of freedom.

BB.Error.Kinematics.NoSolution

Inverse kinematics solver failed to converge.

BB.Error.Kinematics.SelfCollision

Motion would cause self-collision.

BB.Error.Kinematics.Singularity

Robot is near or at a kinematic singularity.

BB.Error.Kinematics.UnknownLink

Target link not found in robot topology.

BB.Error.Kinematics.Unreachable

Target pose is outside the robot's workspace.

BB.Error.Protocol

Low-level protocol error classes.

BB.Error.Safety

Safety system error classes.

BB.Error.Safety.CollisionRisk

Potential collision detected.

BB.Error.Safety.DisarmFailed

Disarm callback failed for a component.

BB.Error.Safety.EmergencyStop

Emergency stop triggered.

BB.Error.Safety.LimitExceeded

Physical limit exceeded on a joint or actuator.

BB.Error.Severity

Protocol for determining error severity.

BB.Error.State

State machine error classes.

BB.Error.State.CommandCrashed

A command crashed during execution.

BB.Error.State.Invalid

Invalid state reference.

BB.Error.State.NotAllowed

Operation not allowed in current state.

BB.Error.State.Preempted

Operation was preempted by another operation.

BB.Error.State.Timeout

State transition timed out.

BB.ExampleRobots

Example robot topologies for testing and documentation.

BB.ExampleRobots.CollisionTestArm

A simple 2-DOF arm with collision geometry for testing self-collision detection.

BB.ExampleRobots.DifferentialDriveRobot

A simple two-wheeled differential drive robot with a caster.

BB.ExampleRobots.LinearActuator

A simple linear actuator (prismatic joint example).

BB.ExampleRobots.PanTiltCamera

A simple pan-tilt camera mount.

BB.ExampleRobots.SixDofArm

A 6 degree-of-freedom industrial robot arm.

BB.IK.Solver

Behaviour for inverse kinematics solvers in the BB ecosystem.

BB.Igniter

Helpers for writing Igniter installers for BB add-on packages.

BB.JointSupervisor

Supervisor for a joint and its child link.

BB.LinkSupervisor

Supervisor for a link and its joints.

BB.Math.Quaternion

Unit quaternion for 3D rotations, backed by an Nx tensor.

BB.Math.Transform

Homogeneous transformation matrices for 3D transformations, backed by an Nx tensor.

BB.Math.Vec3

3D vector backed by an Nx tensor.

BB.Message

Message envelope and behaviour for payload types.

BB.Message.Actuator.BeginMotion

Message published by actuators when beginning a motion.

BB.Message.Actuator.Command.Effort

Command to apply a specific effort (torque/force) to an actuator.

BB.Message.Actuator.Command.Hold

Command an actuator to actively maintain its current position.

BB.Message.Actuator.Command.Position

Command to move an actuator to a target position.

BB.Message.Actuator.Command.Stop

Command to stop an actuator's motion.

BB.Message.Actuator.Command.Trajectory

Command an actuator to follow a trajectory defined by waypoints.

BB.Message.Actuator.Command.Velocity

Command to set an actuator's velocity.

BB.Message.Actuator.EndMotion

Message published by actuators when motion ends.

BB.Message.Geometry.Accel

Linear and angular acceleration in 3D space.

BB.Message.Geometry.Point3D

A 3D point in space.

BB.Message.Geometry.Pose

A position and orientation in 3D space.

BB.Message.Geometry.Twist

Linear and angular velocity in 3D space.

BB.Message.Geometry.Wrench

Force and torque in 3D space.

BB.Message.Option

Custom Spark.Options types for message primitives.

BB.Message.Sensor.BatteryState

Battery state information.

BB.Message.Sensor.Image

Raw image data from a camera sensor.

BB.Message.Sensor.Imu

Inertial Measurement Unit data.

BB.Message.Sensor.JointState

State of a set of joints.

BB.Message.Sensor.LaserScan

Single scan from a planar laser range-finder.

BB.Message.Sensor.Range

Single range reading from a distance sensor.

BB.Motion

High-level motion primitives that bridge IK solving and actuator commands.

BB.Motion.Tracker

Behaviour for continuous position tracking with IK.

BB.Parameter

Runtime-adjustable parameters for robot components.

BB.Parameter.Changed

Payload type for parameter change events.

BB.Parameter.Schema

Builds nested Spark.Options schemas from flat parameter definitions.

BB.Parameter.Store

Behaviour for parameter persistence backends.

BB.Parameter.Store.Dets

DETS-backed parameter persistence.

BB.Parameter.Type

Validation for parameter type definitions in the DSL.

BB.Process

Helper functions for building child specs and looking up processes in the robot's registry.

BB.PubSub

Hierarchical pubsub system for robot component messages.

BB.Robot

An optimised robot representation for kinematic computations.

BB.Robot.Builder

Builds an optimised `BB.Robot` struct from DSL output.

BB.Robot.CommandInfo

Information about a currently executing command.

BB.Robot.Joint

An optimised joint representation with all units converted to SI floats.

BB.Robot.Kinematics

Kinematic computations for robot manipulators.

BB.Robot.Link

An optimised link representation with all units converted to SI floats.

BB.Robot.ParamResolver

Resolves parameter references in robot structs.

BB.Robot.Runtime

Runtime process for a BB robot.

BB.Robot.State

ETS-backed mutable state for robot instances.

BB.Robot.Topology

Pre-computed topology metadata for efficient traversal and kinematic operations.

BB.Robot.Units

Unit conversion functions for transforming `Localize.Unit` values into base SI floats.

BB.Safety

Safety system API.

BB.Safety.Controller

Global safety controller that owns arm/disarm state for all robots.

BB.Safety.HardwareError

Payload type for hardware error events.

BB.Sensor

Behaviour and API for sensors in the BB framework.

BB.Sensor.Mimic

A sensor that derives joint state from another joint.

BB.Sensor.OpenLoopPositionEstimator

A "sensor" that estimates joint position for open-loop control systems.

BB.Sensor.Server

Wrapper GenServer for sensor callback modules.

BB.SensorSupervisor

Supervisor for robot-level sensors.

BB.Server.ParamResolution

Shared parameter resolution logic for wrapper servers.

BB.Sim.Actuator

Simulated actuator for kinematic simulation mode.

BB.Sim.Bridge

Mock bridge for simulation mode.

BB.Sim.Controller

Mock controller for simulation mode.

BB.StateMachine.Transition

Payload type for state machine transition events.

BB.Supervisor

Root supervisor for a BB robot.

BB.Telemetry

Telemetry events emitted by the BB framework.

BB.Test.AsyncCommand

A test command that waits for an explicit :complete message before finishing.

BB.Test.MockActuator

Minimal mock actuator for testing.

BB.Test.MockBridge

Minimal mock bridge for testing.

BB.Test.MockController

Minimal mock controller for testing.

BB.Test.MockSolver

Mock IK solver for testing BB.Motion without real IK computations.

BB.Test.ParameterBridge

Reference implementation of `BB.Bridge` for testing.

BB.TopologySupervisor

Supervisor for all hardware-facing subsystems of a robot.

BB.Unit

Helpers for working with units in BB DSLs.

BB.Unit.Option

Functions for specifying and validating units in option schemas.

BB.Urdf.Exporter

Export a BB robot definition to URDF XML format.

BB.Urdf.Xml

XML building utilities using Erlang's xmerl library.

## Mix Tasks

mix bb.add_nx_backend

Configures an Nx backend for the project

mix bb.add_robot

Adds a new robot module to your project

mix bb.install

Installs BB into a project

mix bb.to_urdf

Export a BB robot definition to URDF XML format.