Resilient Robotics on the BEAM
A framework for building fault-tolerant robotics applications in Elixir using familiar OTP patterns.
The Insight
ROS Patterns Are OTP Patterns
PubSub, request/response services, lifecycle nodes, parameter systems—ROS2 reinvents what the BEAM already provides. Beam Bots brings robotics to Elixir's battle-tested foundation.
ROS2 Approach
PubSub for inter-node communication
Services for request/response
Actions for long-running tasks
Lifecycle nodes for state management
Parameter system for configuration
Elixir Equivalent
Phoenix.PubSub, Registry, process messaging
GenServer.call/3
Supervised Task with progress messages
GenServer with state transitions
ETS
Built for Production Robotics
Everything you need to build reliable robot systems, powered by OTP supervision and Elixir's expressive syntax.
🧩
Declarative DSL
Define robot topology with code that mirrors physical structure. Links, joints, sensors, and actuators nested as they exist in reality.
🛡
Topology-Based Supervision
Supervision trees mirror your robot's structure for fault isolation. A failing gripper doesn't crash the whole system.
📏
Physical Units
Express measurements naturally with the ~u sigil: ~u(90 degree), ~u(0.5 meter), ~u(10 newton_meter).
📐
Forward Kinematics
Compute link positions using Nx tensors. GPU-accelerated on supported systems for real-time position queries.
📡
Hierarchical PubSub
Subscribe to sensor data by path with type filtering. Get all IMU data from the left arm with a single subscription.
🔄
URDF Export
Export to URDF for visualisation in Gazebo or integration with ROS tools. One definition, multiple ecosystems.
Code That Reads Like a Specification
This pan-tilt camera mount definition shows how Beam Bots' DSL mirrors physical robot structure. The nesting in the code directly reflects the kinematic chain.
Because it's built on Elixir macros, you can metaprogram your robots—use loops to avoid repetition, or write DSL extensions that transform definitions at compile time.
defmodule PanTiltCamera do
use BB
topology do
link :base_link do
visual do
cylinder do
radius ~u(0.03 meter)
height ~u(0.02 meter)
end
end
joint :pan_joint do
type :revolute
origin do
z ~u(0.015 meter)
end
limit do
lower ~u(-170 degree)
upper ~u(170 degree)
end
link :pan_link do
joint :tilt_joint do
type :revolute
limit do
lower ~u(-45 degree)
upper ~u(90 degree)
end
link :camera_link
end
end
end
end
end
end
Recent Posts
Updates, tutorials, and insights from the Beam Bots project.
Thank You to Our Sponsors
This project is made possible by the generous support of our sponsors.