jimsynz
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.
See harton.nz • Elixir for Robots for more
Features
- 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.
Read harton.nz • Announcing Beam Bots: Resilient Robotics on the BEAM for more details.
Links
https://github.com/beam-bots/bb
Tutorials
See the tutorials for a guided introduction:
- Your First Robot - defining robots with the DSL
- Starting and Stopping - supervision trees
- Sensors and PubSub - publishing and subscribing to messages
- Forward Kinematics - computing link positions
- Commands and State Machine - controlling the robot
- Exporting to URDF - interoperability with ROS tools
- Parameters - runtime-adjustable configuration
- Parameter Bridges - bidirectional remote access
The DSL Reference documents all available options.
Trending in Announcing
Other Trending Topics
Categories:
Sub Categories:
Forums
Popular Tags
- #ecto
- #liveview
- #troubleshooting
- #learning-elixir
- #library
- #deployment
- #erlang
- #testing
- #genserver
- #mix
- #absinthe
- #remote-other
- #otp
- #plug
- #how-to-question
- #macros
- #postgres
- #elixirconf
- #channels
- #exunit
- #discussion
- #code-sync
- #podcasts
- #javascript
- #onsite
- #dialyzer
- #docker
- #authentication
- #umbrella
- #full-time-contract
- #podcasts-by-brainlid
- #ecto-query
- #elixirconf-us
- #ai
- #blog-post
- #elixir-ls
- #phoenix_html
- #iex
- #graphql
- #genstage
- #websockets
- #supervisor
- #advent-of-code
- #distillery
- #processes
- #api
- #forms
- #hex
- #security
- #metaprogramming










Showing Posts 1 to 10- Show Best Posts
- Show All (oldest first)
- Show All (newest first)
pxp9
Amazing, as far a I have read , this is intended to run in Nerves or any OS, right ?
I suppose it will be something like this if we go full Elixir stack:
Your entire stack will be a Nerves application.
You will just add the Robot done with BB to the Nerves supervision tree.
Let me know if I am wrong please.
jimsynz
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.
joelpaulkoch
Amazing! Thank you for the tutorials, I’ll work my way through them during the holidays
AstonJ
This looks neat! Curious to see what kind of Robots people will use it for - are there any particular types BB is suited to?
Videos of cute/cool robots powered by Elixir always appreciated too!
jimsynz
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.
AstonJ
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).
jimsynz
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.
codeanpeace
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
jimsynz
it’s definitely something I plan to do, starting with something very very simple.
jimsynz
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_pigpioandbb_servo_pca9685which 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.