Week Nine: No Hardware Required
The SO-101 example app goes public with simulation mode, two gnarly servo bugs get squashed, and the dependency garden gets weeded.
This one's a day late. I'd hoped to ship an exciting SO-101 demo video yesterday, but the universe had other plans. Still, the code is out there and that's what matters.
The SO-101 Example Is Live
The big news this week: bb_example_so101 is now on GitHub.
It's a complete Phoenix application demonstrating the Beam Bots framework with a SO-101 robot arm - the open-source 6-DOF arm from TheRobotStudio that uses Feetech STS3215 servos. If you've been following along and wondering "but what does a real Beam Bots application actually look like?" - this is your answer.
What's included:
- Robot definition using the BB DSL - all six joints plus gripper, with proper kinematic chain from the official URDF
- Web dashboard with real-time 3D visualisation via
bb_liveview - Servo setup wizard (
mix so101.setup_servos) - interactive tool for assigning unique IDs to each servo (they all ship as ID 1, because of course they do) - Calibration tool (
mix so101.calibrate) - disables torque, prompts you to move each joint through its full range, writes EEPROM offsets so centre = 0 radians - Custom commands - home, demo circle, move to pose, arm/disarm
And the best part: you don't need the hardware. Set the SIMULATE environment variable to anything non-empty and the whole thing runs in simulation mode with the 3D visualiser. Want to poke around a robotics framework without spending money on servos? Now you can.
There'll be a separate blog post coming soon with a proper getting-started guide and links to kit sources. For now, go have a look.
Two Bugs Walk Into a Serial Port
Getting the SO-101 working on real hardware surfaced two bugs that were hiding in the Feetech stack. Both are the sort of thing that only shows up when you're actually talking to six servos at once on a real wire.
The Buffer Threading Bug (feetech v0.2.2)
At 1Mbaud, all six servo responses to a sync_read arrive in about 1.2 milliseconds. That's faster than individual UART reads can consume them, so multiple responses pile up in the receive buffer. The old code parsed one response and threw away the remaining bytes. The next read would then fail or return garbage.
The fix threads the remaining buffer from each parsed response into the next read call. Not glamorous, but essential for reliable multi-servo communication at high baud rates.
The Stale Goal Impulse (bb_servo_feetech v0.2.1)
Here's a fun one. Feetech servos auto-enable torque the moment you write to goal_position - even if you haven't explicitly enabled torque yet. So if a servo remembers a goal position from a previous session and you write a new goal during initialisation, it lurches to whatever position it was told last time. When "last time" was the other side of the workspace, that lurch is... dramatic.
The fix uses reg_write to buffer the goal position for each servo (which doesn't trigger the auto-torque behaviour), then fires a single action command to apply all goals simultaneously. Torque stays off until every servo has a sane goal. No more surprise gymnastics on startup.
Both bugs were hardware-tested on the SO-101 with all six servos. The arm now powers up calmly, which is how robot arms should behave.
Other Releases
| Package | Version | What changed |
|---|---|---|
| bb | v0.15.1 | Docs fix: correct BB.Message.Sensor.IMU references to Imu |
| feetech | v0.2.2 | Buffer threading fix for sync_read at high baud rates |
| bb_servo_feetech | v0.2.1 | Stale-goal torque impulse prevention |
| bb_servo_pigpio | v0.5.0 | Migrate to structured error system |
That's every servo driver now on structured errors. Consistency: achieved.
Dependency Gardening
Dependabot had a busy week. Across the ecosystem: credo to 1.7.16 (Elixir 1.20.0-rc.1 compatibility, new UnusedMapOperation and UnusedOperation checks), ex_doc to 0.40.1 (now generates llms.txt - how very zeitgeist), igniter to 0.7.2, mimic to 2.3.0, phoenix_live_view to 1.1.22, and bandit to 1.10.2. Nothing breaking, just keeping the garden tidy.
What's Next
The SO-101 getting-started blog post is the immediate priority. I want to have clear kit lists, assembly notes, and a walkthrough from unboxing to "arm moves when you tell it to."
After that, there's the demo video that was supposed to ship yesterday. Soon. For real this time.
Links
- bb_example_so101 on GitHub
- bb on Hex (v0.15.1)
- feetech on Hex (v0.2.2)
- bb_servo_feetech on Hex (v0.2.1)
- Proposals repo on GitHub
- Discord