Beam Bots (or just BB for short) is a framework for building fault-tolerant robotics applications in Elixir using familiar OTP patterns.
Why?
When you look at ROS2’s architecture, so much of what it provides maps directly to BEAM/OTP patterns:
ROS2’s pubsub → Phoenix.PubSub, Registry, process messaging
ROS2’s Services → GenServer.call/3
ROS2’s Actions → supervised Task with progress messages
ROS2’s Controllers → GenServers with state machines
ROS2’s parameter system → ETS
The BEAM already gives you fault tolerance, concurrency, soft real-time performance, and good behaviour in resource-constrained environments. BB builds on that
foundation.
Spark DSL for declarative robot definitions - your code mirrors your robot’s physical structure
Topology-based supervision - the supervision tree mirrors your robot topology for fault isolation
Physical units with the ~u sigil - ~u(90 degree), ~u(0.5 meter), ~u(10 newton_meter)
Forward kinematics using Nx (GPU-accelerated where supported)
Hierarchical PubSub for sensor data with message type filtering
URDF export for integration with ROS visualisation tools
Current Status
Early days - the framework compiles, tests pass, and the DSL works, but it hasn’t controlled physical robots yet. I’m currently building a rover to close that loop.
Looking for feedback and contributors.
Yeah, it’s will run anywhere. You define your robot in the DSL, add genservers for the various sensors and actuators and controllers and away you go. Nerves is optional, but I expect a lot of folks will want to use it.
It should be generic enough to handle pretty much any kind of bot. You can load in a bunch of links and joints and use IK to move it through the world or you can use a single link and ignore kinematics altogether. The idea is to give you structure to help you model your robot without requiring you to do so.
Ah nice! If you position it as a framework it could be a nice way to not only be seen as a competitor to ROS, but as an inroad into Elixir too (people are generally attracted to frameworks, especially for new/unfamiliar territory).
That’s definitely the idea. I want to build it out to the point that it’s a no brainer if you want to build robots to use BB. I know I’m in for the long haul to build out the ecosystem of packages and device support but it’s something that I’ve wanted to exist for years, and now I’ve spent several years being shown how to lovingly own and evangelise a framework by @zachdaniel I think I can handle the challenge.
Just thinking out loud, this could also be great for students as an approachable robotics kit for the classroom like what Arduino did with their starter kits
Lots of work going on over in beam bots land. We’ve been adding new standard message types as well as publishing initial versions of bb_servo_pigpio and bb_servo_pca9685 which use the new message types to send and receive motion information. Something I’m particularly happy about is having a standardised position estimator for open loop joints (ie anything without position feedback) - and that it’s such a simple genserver.
feetech + bb_servo_feetech - Driver for Feetech/WaveShare STS/SCS serial servos (the affordable ones used in SO-101 arms). Still buggy, but it’s a start.
proposals - Lightweight RFC repo. See what’s planned, propose features, or pick something up if you’re keen.