The DSL extension for describing robot properties and topologies.

topology

Robot topology

Nested DSLs

  • link
    • inertial
      • origin
      • inertia
    • visual
      • box
      • cylinder
      • sphere
      • capsule
      • mesh
      • material
        • color
        • texture
      • origin
    • collision
      • origin
      • box
      • cylinder
      • sphere
      • capsule
      • mesh
    • sensor
  • joint
    • origin
    • axis
    • dynamics
    • limit
    • sensor
    • actuator
link name

A kinematic link (ie solid body).

Nested DSLs

Arguments

NameTypeDefaultDocs
nameatomThe name of the link

A link's mass, position of it's center of mass and it's central inertia properties

Nested DSLs

Options

NameTypeDefaultDocs
massanyThe mass of the link

Specifies where the link's center of mass is located, relative to the link's reference frame

Options

NameTypeDefaultDocs
rollanyCldr.Unit.new!(:degree, 0)rotation around the x axis
pitchanyCldr.Unit.new!(:degree, 0)rotation around the y axis
yawanyCldr.Unit.new!(:degree, 0)rotation around the z axis
xanyCldr.Unit.new!(:meter, 0)translation along the x axis
yanyCldr.Unit.new!(:meter, 0)translation along the y axis
zanyCldr.Unit.new!(:meter, 0)translation along the z axis

Introspection

Target: BB.Dsl.Origin

How the link resists rotational motion.

Options

NameTypeDefaultDocs
ixxanyResistance to rotation around the x-axis
iyyanyResistance to rotation around the y-axis
izzanyResistance to rotation around the z-axis
ixyanyCoupling between the x and y axes
ixzanyCoupling between the x and z axes
iyzanyCoupling between the y and z axes

Introspection

Target: BB.Dsl.Inertia

Introspection

Target: BB.Dsl.Inertial

Visual attributes for a link.

Nested DSLs

Box geometry

Options

NameTypeDefaultDocs
xanyThe length of the X axis side
yanyThe length of the Y axis side
zanyThe length of the Z axis side

Introspection

Target: BB.Dsl.Box

A cylindrical geometry

The origin of the cylinder is the center.

Options

NameTypeDefaultDocs
radiusanyThe distance from the center to the circumference
heightanyThe height of the cylinder

Introspection

Target: BB.Dsl.Cylinder

A spherical geometry

The origin of the sphere is its center.

Options

NameTypeDefaultDocs
radiusanyThe distance from the center of the sphere to your edge

Introspection

Target: BB.Dsl.Sphere

A capsule geometry (cylinder with hemispherical caps).

The origin of the capsule is the centre of the cylindrical portion. The height is the distance between the centres of the hemispherical caps. Total extent is height + 2 * radius.

Options

NameTypeDefaultDocs
radiusanyThe radius of the capsule (cylinder and hemispherical caps)
heightanyThe height of the cylindrical portion (between cap centres)

Introspection

Target: BB.Dsl.Capsule

A mesh object specified by a filename

Options

NameTypeDefaultDocs
filenameString.tThe path to the 3D model
scalenumber1A scale factor for the mest

Introspection

Target: BB.Dsl.Mesh

The material of the visual element

Nested DSLs

Options

NameTypeDefaultDocs
nameatomThe name of the material

The color of the meterial

Options

NameTypeDefaultDocs
redanyThe red element of the color
greenanyThe green element of the color
blueanyThe blue element of the color
alphaany1The alpha element of the color

Introspection

Target: BB.Dsl.Color

A texture to apply to the material

Options

NameTypeDefaultDocs
filenameString.tThe image file to use

Introspection

Target: BB.Dsl.Texture

Introspection

Target: BB.Dsl.Material

The refrence frame of the visual element with respect to the reference frame of the link

Options

NameTypeDefaultDocs
rollanyCldr.Unit.new!(:degree, 0)rotation around the x axis
pitchanyCldr.Unit.new!(:degree, 0)rotation around the y axis
yawanyCldr.Unit.new!(:degree, 0)rotation around the z axis
xanyCldr.Unit.new!(:meter, 0)translation along the x axis
yanyCldr.Unit.new!(:meter, 0)translation along the y axis
zanyCldr.Unit.new!(:meter, 0)translation along the z axis

Introspection

Target: BB.Dsl.Origin

Introspection

Target: BB.Dsl.Visual

The collision properties of a link.

Nested DSLs

Options

NameTypeDefaultDocs
nameatomAn optional name of the link geometry

The refrence frame of the collision element, relative to the reference frame of the link

Options

NameTypeDefaultDocs
rollanyCldr.Unit.new!(:degree, 0)rotation around the x axis
pitchanyCldr.Unit.new!(:degree, 0)rotation around the y axis
yawanyCldr.Unit.new!(:degree, 0)rotation around the z axis
xanyCldr.Unit.new!(:meter, 0)translation along the x axis
yanyCldr.Unit.new!(:meter, 0)translation along the y axis
zanyCldr.Unit.new!(:meter, 0)translation along the z axis

Introspection

Target: BB.Dsl.Origin

Box geometry

Options

NameTypeDefaultDocs
xanyThe length of the X axis side
yanyThe length of the Y axis side
zanyThe length of the Z axis side

Introspection

Target: BB.Dsl.Box

A cylindrical geometry

The origin of the cylinder is the center.

Options

NameTypeDefaultDocs
radiusanyThe distance from the center to the circumference
heightanyThe height of the cylinder

Introspection

Target: BB.Dsl.Cylinder

A spherical geometry

The origin of the sphere is its center.

Options

NameTypeDefaultDocs
radiusanyThe distance from the center of the sphere to your edge

Introspection

Target: BB.Dsl.Sphere

A capsule geometry (cylinder with hemispherical caps).

The origin of the capsule is the centre of the cylindrical portion. The height is the distance between the centres of the hemispherical caps. Total extent is height + 2 * radius.

Options

NameTypeDefaultDocs
radiusanyThe radius of the capsule (cylinder and hemispherical caps)
heightanyThe height of the cylindrical portion (between cap centres)

Introspection

Target: BB.Dsl.Capsule

A mesh object specified by a filename

Options

NameTypeDefaultDocs
filenameString.tThe path to the 3D model
scalenumber1A scale factor for the mest

Introspection

Target: BB.Dsl.Mesh

Introspection

Target: BB.Dsl.Collision

sensor name, child_spec

A sensor attached to the robot, a link, or a joint.

Arguments

NameTypeDefaultDocs
nameatomA unique name for the sensor
child_specmodule | {module, keyword}The child specification for the sensor process. Either a module or {module, keyword_list}

Introspection

Target: BB.Dsl.Sensor

Introspection

Target: BB.Dsl.Link

topology.joint

joint name

A kinematic joint between a parent link and a child link.

Nested DSLs

Arguments

NameTypeDefaultDocs
nameatomA unique name for the joint

Options

NameTypeDefaultDocs
type:revolute | :continuous | :prismatic | :fixed | :floating | :planarSpecifies the type of joint

topology.joint.origin

This is the transform from the parent link to the child link. The joint is located at the origin of the child link, as shown in the figure above

Options

NameTypeDefaultDocs
rollanyCldr.Unit.new!(:degree, 0)rotation around the x axis
pitchanyCldr.Unit.new!(:degree, 0)rotation around the y axis
yawanyCldr.Unit.new!(:degree, 0)rotation around the z axis
xanyCldr.Unit.new!(:meter, 0)translation along the x axis
yanyCldr.Unit.new!(:meter, 0)translation along the y axis
zanyCldr.Unit.new!(:meter, 0)translation along the z axis

Introspection

Target: BB.Dsl.Origin

topology.joint.axis

The joint axis specified in the joint frame. This is the axis of rotation for revolute joints, the axis of translation for prismatic joints, and the surface normal for planar joints. The axis is specified in the joint frame of reference. Fixed and floating joints do not use the axis field

Options

NameTypeDefaultDocs
rollanyCldr.Unit.new!(:degree, 0)rotation around the X axis
pitchanyCldr.Unit.new!(:degree, 0)rotation around the Y axis
yawanyCldr.Unit.new!(:degree, 0)rotation around the Z axis

Introspection

Target: BB.Dsl.Axis

topology.joint.dynamics

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

Options

NameTypeDefaultDocs
dampinganyThe physical damping value of the joint
frictionanyThe physical static friction value of the joint

Introspection

Target: BB.Dsl.Dynamics

topology.joint.limit

Limits applied to joint movement

Options

NameTypeDefaultDocs
effortanyThe maximum effort - both positive and negative - that can be commanded to the joint
velocityanyMaximum velocity - both positive and negative - that can be commanded to the joint
loweranyThe lower joint limit
upperanyThe upper joint limit

Introspection

Target: BB.Dsl.Limit

topology.joint.sensor

sensor name, child_spec

A sensor attached to the robot, a link, or a joint.

Arguments

NameTypeDefaultDocs
nameatomA unique name for the sensor
child_specmodule | {module, keyword}The child specification for the sensor process. Either a module or {module, keyword_list}

Introspection

Target: BB.Dsl.Sensor

topology.joint.actuator

actuator name, child_spec

An actuator attached to a joint.

Arguments

NameTypeDefaultDocs
nameatomA unique name for the actuator
child_specmodule | {module, keyword}The child specification for the actuator process. Either a module or {module, keyword_list}

Introspection

Target: BB.Dsl.Actuator

Introspection

Target: BB.Dsl.Joint

settings

System-wide settings

Options

NameTypeDefaultDocs
nameatomThe name of the robot, defaults to the name of the defining module
registry_modulemoduleRegistryThe registry module to use
registry_optionskeywordOptions passed to Registry.start_link/1. Defaults to [partitions: System.schedulers_online()] at runtime.
supervisor_modulemoduleSupervisorThe supervisor module to use
parameter_storemodule | {module, keyword}Optional parameter persistence backend. Use a module or {Module, opts} tuple.
auto_disarm_on_errorbooleantrueAutomatically disarm the robot when a hardware error is reported. Defaults to true.

sensors

Robot-level sensors

Nested DSLs

sensors.sensor

sensor name, child_spec

A sensor attached to the robot, a link, or a joint.

Arguments

NameTypeDefaultDocs
nameatomA unique name for the sensor
child_specmodule | {module, keyword}The child specification for the sensor process. Either a module or {module, keyword_list}

Introspection

Target: BB.Dsl.Sensor

controllers

Robot-level controllers

Nested DSLs

controllers.controller

controller name, child_spec

A controller process at the robot level.

Arguments

NameTypeDefaultDocs
nameatomA unique name for the controller
child_specmodule | {module, keyword}The child specification for the controller process. Either a module or {module, keyword_list}

Options

NameTypeDefaultDocs
simulation:omit | :mock | :start:omitBehaviour in simulation mode: :omit (don't start), :mock (start no-op mock), :start (start real controller)

Introspection

Target: BB.Dsl.Controller

commands

Robot commands with Goal → Feedback → Result semantics

Nested DSLs

commands.category

category name

A command category for grouping commands with concurrent execution limits.

Categories define logical groups of commands (e.g., :motion, :sensing, :auxiliary) with configurable concurrency limits. Commands in different categories can run concurrently, while commands in the same category are limited to the category's concurrency_limit.

Arguments

NameTypeDefaultDocs
nameatomA unique name for the category

Options

NameTypeDefaultDocs
docString.tDocumentation describing this category
concurrency_limitpos_integer1Maximum number of commands in this category that can run concurrently

Introspection

Target: BB.Dsl.Category

commands.command

command name

A command that can be executed on the robot.

Commands follow the Goal → Feedback → Result pattern and integrate with the robot's state machine to control when they can run.

Nested DSLs

Arguments

NameTypeDefaultDocs
nameatomA unique name for the command

Options

NameTypeDefaultDocs
handlermodule | {module, keyword}The handler module implementing the BB.Command behaviour. Either a module or {module, keyword_list} for parameterised options
timeoutpos_integer | :infinity:infinityTimeout for command execution in milliseconds
allowed_statesatom | list(atom)[:idle]Robot states in which this command can run. Use :* for all states (except :disarmed). Use :disarmed explicitly if the command should run when disarmed.
categoryatom:defaultThe command category for concurrency control. Commands in the same category are limited by that category's concurrency_limit.
cancelatom | list(atom)[]Categories of commands this command can cancel when starting. Use :* to cancel all running commands, or a list of specific categories. Empty list (default) means the command will error if its category is at capacity.

commands.command.argument

argument name, type

An argument for the command.

Arguments

NameTypeDefaultDocs
nameatomA unique name for the argument
typeanyThe type of the argument

Options

NameTypeDefaultDocs
requiredbooleanfalseWhether this argument is required
defaultanyDefault value if not provided
docString.tDocumentation for the argument

Introspection

Target: BB.Dsl.Command.Argument

Introspection

Target: BB.Dsl.Command

parameters

Runtime-adjustable parameters for the robot.

Parameters provide a way to configure robot behaviour at runtime without recompilation. They support validation, change notifications via PubSub, and optional persistence.

Example

parameters do group :motion do param :max_linear_speed, type: :float, default: 1.0, min: 0.0, max: 10.0, doc: "Max velocity in m/s" param :max_angular_speed, type: :float, default: 0.5 end

group :safety do param :collision_distance, type: :float, default: 0.3 end end

Nested DSLs

parameters.group

group name

A group of runtime-adjustable parameters.

Nested DSLs

Arguments

NameTypeDefaultDocs
nameatomA unique name for the parameter group

Options

NameTypeDefaultDocs
docString.tDocumentation for the parameter group

parameters.group.param

param name

A runtime-adjustable parameter.

Arguments

NameTypeDefaultDocs
nameatomA unique name for the parameter

Options

NameTypeDefaultDocs
typeanyThe parameter value type (:float, :integer, :boolean, :string, :atom, or {:unit, unit_type})
defaultanyDefault value for the parameter
minnumberMinimum value for numeric parameters
maxnumberMaximum value for numeric parameters
docString.tDocumentation for the parameter

Introspection

Target: BB.Dsl.Param

Introspection

Target: BB.Dsl.ParamGroup

parameters.param

param name

A runtime-adjustable parameter.

Arguments

NameTypeDefaultDocs
nameatomA unique name for the parameter

Options

NameTypeDefaultDocs
typeanyThe parameter value type (:float, :integer, :boolean, :string, :atom, or {:unit, unit_type})
defaultanyDefault value for the parameter
minnumberMinimum value for numeric parameters
maxnumberMaximum value for numeric parameters
docString.tDocumentation for the parameter

Introspection

Target: BB.Dsl.Param

parameters.bridge

bridge name, child_spec

A parameter protocol bridge for remote access.

Bridges expose robot parameters to remote clients (GCS, web UI, etc.) and receive parameter updates from them. They implement BB.Bridge.

Example

parameters do bridge :mavlink, {BBMavLink.ParameterBridge, conn: "/dev/ttyACM0"} bridge :phoenix, {BBPhoenix.ParameterBridge, url: "ws://gcs.local/socket"} end

Arguments

NameTypeDefaultDocs
nameatomA unique name for the bridge
child_specmodule | {module, keyword}The child specification for the bridge process. Either a module or {module, keyword_list}

Options

NameTypeDefaultDocs
simulation:omit | :mock | :start:omitBehaviour in simulation mode: :omit (don't start), :mock (start no-op mock), :start (start real bridge)

Introspection

Target: BB.Dsl.Bridge

states

Custom operational states for the robot.

The built-in :idle state is always available. Define additional states here and use commands to transition between them. Commands can specify which states they're allowed to run in via allowed_states.

Nested DSLs

Options

NameTypeDefaultDocs
initial_stateatom:idleThe initial operational state when the robot starts

states.state

state name

A custom operational state for the robot.

States define the operational context the robot can be in. Commands specify which states they can run in via allowed_states, and can transition to new states via next_state: in their result.

Arguments

NameTypeDefaultDocs
nameatomA unique name for the state

Options

NameTypeDefaultDocs
docString.tDocumentation describing this state

Introspection

Target: BB.Dsl.State