The DSL extension for describing robot properties and topologies.

topology

Robot topology

Nested DSLs

  • link
    • inertial
      • origin
      • inertia
    • visual
      • box
      • cylinder
      • sphere
      • mesh
      • material
        • color
        • texture
      • origin
    • collision
      • origin
      • box
      • cylinder
      • sphere
      • mesh
    • sensor
      • param
  • joint
    • origin
    • axis
    • dynamics
    • limit
    • sensor
      • param
    • actuator
      • param
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 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
alphaanyThe 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 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.

Nested DSLs

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

Nested DSLs

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}

topology.joint.sensor.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.Sensor

topology.joint.actuator

actuator name, child_spec

An actuator attached to a joint.

Nested DSLs

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}

topology.joint.actuator.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.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.

sensors

Robot-level sensors

Nested DSLs

sensors.sensor

sensor name, child_spec

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

Nested DSLs

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}

sensors.sensor.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.Sensor

controllers

Robot-level controllers

Nested DSLs

controllers.controller

controller name, child_spec

A controller process at the robot level.

Nested DSLs

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}

controllers.controller.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.Controller

commands

Robot commands with Goal → Feedback → Result semantics

Nested DSLs

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
handlermoduleThe handler module implementing the BB.Command behaviour
timeoutpos_integer | :infinity:infinityTimeout for command execution in milliseconds
allowed_stateslist(atom)[:idle]Robot states in which this command can run. If :executing is included, the command can preempt running commands.

commands.command.argument

argument name, type

An argument for the command.

Arguments

NameTypeDefaultDocs
nameatomA unique name for the argument
typeatom | moduleThe type of the argument (e.g., :float, :integer, BB.Pose)

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.Parameter.Protocol.

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}

Introspection

Target: BB.Dsl.Bridge