Category Archives: Uncategorized

Perspectives on AI at Pneumatica.

It took me some time to jump aboard the AI train. When chatGPT came out, I found it useful for certain “padding” tasks; like turning a set of dot-points into a position description but it just wasn’t mature enough to be part of my daily workflow.

It took me a couple of months to notice the Claude Code hype-train, and to overcome my initial skepticism to try it out. The fact that it was a command line application removed one of the biggest barriers for me; the web interface.

These days, i generally rely on OpenAI models with oh-my-pi as the harness. Here are some of my reflections on what’s worked and what hasn’t.

The Good

AI Agents as an shopping assistant for components.

When one builds a complicated machine like a robotic system, you usually have a bunch of constraints on your components; size, weight, power, cost, etc. I usually find this process incredibly time consuming; lots of searching, filtering and reading.
When building our current robotic system, i talked through requirements and sizing with my agent, then got it to search the web for options and rank the options based on our conversation history. This then either refined my thinking about the system design, eventually coming out with candidate parts. Having the agent dump the results to a spreadsheet, with technical specs and URLs to the data sheet, drawings and store is really, really helpful when building a bill of materials.

Hardware Abstraction Layer for Embedded peripherals.

A bit of background for those not familiar with embedded software engineering. It’s pretty common for embedded devices to consist of a microcontroller (uc) that talks to peripherals like stepper motor drivers, current sensors and other chips, connected by some standard (usually serial) interface. Microcontrollers are generally too small to host a traditional operating system (and having an OS like Linux often defeats the purpose; the goal here is to be small, fast, and close to the metal), but do tend to come with manufacturer support (or via 3rd party libraries) for configuring the microcontroller itself. For the peripherals, your often only have a datasheet and, if you’re lucky, a few hobbyist open-source partial implementations.

For our toolchain (rust). Using an agent to go from datasheet to binary interface bindings has saved me a ton of time an effort. The design often needs a few guided revisions, since agents are currently bad at architecture, but the basic functionality seems to be pretty good first go.

Doing the software implementation/refactor grunt work.

Sometimes I just need a quick python script to do X, that I’ll throw away afterwards; an agent is great for that. Sometimes I have a refactoring goal in mind, and I can easily express the intended outcome (even better if i can write the example as code); agentic coding is pretty good at moving the interface across, though it sometimes likes to take shortcuts. Sometimes I’m working on a new feature and I’ve got it to the point where the skeleton is there. AI can be pretty good at putting the meat on those bones.

“Rubber duck” debugging (for mech, elec and software)

I’ve worked with some pretty great teams in my time, and one thing they have had in common is a culture of sharing the gnarly problems, seeking an outside perspective, or even just someone to talk through the issue (which helps clarify the problem and solution).

Currently, we have a engineering team of 1, so agents have been a useful (but not always reliable) stand-in. It’s helped with walking through gnarly mech, elec and software problems, even if it’s not always a reliable substitute for a human colleague on the other end.

The Bad

Poor agent usage (eg. vibe coding) undermines the intuition -> expertise pipeline.

It’s very rarely the case that you know enough about the problem before you start building, or that the understanding is implicit-unconscious, so a big part of the first draft is learning the shape of the problem, a shape of the solution, and how to articulate what that looks like (in code, or design) using the tools of the domain. As you do this, you’re constructing a map of the problem-solution space for you to come back to later, and accumulating learnable experiences. Hand that first draft to an agent instead of doing it yourself, and you skip the very process that builds the map in the first place.

This is especially the case when you’re building something actually new – even if new is cobbled out of existing parts.

Agents currently suck at software architecture.

Software engineering is full of cargo-cults, fads, and baseless extrapolation. This is especially the case when it comes to architectural decision. For me, a software architecture is an organisation of information processing that needs to fit the constraints over the expected (bounded) time horizon of the a) business/intended use case, b) compute platform and/or operational environment, c) current (and expected future) developers background.

Architecture is as much cultural and organisational as it is technical; and a problem (i would argue) is not in the purview of current AI systems.

This part of this falls into a broader mistake that we make about cognition, and how we fail to recognise just how big the gap is between what we can clearly articulate, and what we intuitively understand. How when you work with people, our intuitions ‘rub-off’ on our colleagues (and vice-versa), which goes a long way to building an strong engineering culture. Obviously, you want to document this if possible, but a culture is a living-breathing thing, and current agents can only be a peripheral tool in that respect.

Tokenenomics

Not a surprise, but the opacity of token pricing, and how quickly the price can change. Everyone knows the pricing model isn’t a sustainable business, and I’m expecting some kind of rug-pull later this year (Anthropic already did around April, which is why I’m on GPT at the moment).
Regardless of whether the model does what you want, ties itself in circles, or deletes your file system, you’re still paying for the tokens. I’ve seen some decent results come of directing a team of agents, but then the cost skyrockets pretty quickly, and I’m just not sure the payoff is there.

Conclusion

AI agents as a genuinely good research assistant, datasheet-reader, and grunt-work machine, but a pretty mediocre architect that can easily flush money down the drain. I’m very hesitant about it’s ability to work on anything truly novel or niche, but am pretty happy for it to slap together a webpage and a quick-and-dirty script.

I worry mostly about finding the balance between the questionable/circumstantial short-term gains from heavy AI use, and the long term costs of opacity (both internally and externally) and technical/organisational/personal debt – which I think should not be underestimated.

3 Sacrifices for the Common Good

Like many of us, I always have a few projects on the go. Over the last year, I’ve mostly put them aside so that I can focus on Pneumatica.bio, but here I want to give a little overview on the goals, and where I got up to.

#1 Electronic Ducted Fan Quadcopter

I think ducted fans are cool, so I wanted to build a quadcopter based around them. I was thinking more of a drone for lifting stuff in complex environments. Fans mean no exposed spinning blades to chop my fingers on, and from what I read, fans do well in static thrust mode (i.e. mostly hover).

The frame is custom designed, and the flight control stack is based on the navio2 raspberry pi stack running ArduPilot. The drone has lifted off under it’s own power, but I hit a few challenges before I ran out of time to actually tune it.

In particular:

  • ArduPilot off the shelf is not at all friendly to the EDF configuration – in particular the PID loop needs a whole lot of tuning before it’s stable.
  • I am a very bad drone pilot. I’ve since been practicing in flight simulators.
  • I didn’t appreciate just how loud the fans are; way too loud to test inside my small townhouse.

So i have a few things left to do before I can really start to give this guy a spin, including building an outdoors test setup. One day I’d also love to put the decawave position system i have lying around on it.

I expect that once I actually fly it, I’ll realise the frame is not rigid enough, and the black PLA will struggle in the Australian sun. I’ve got some poly-carbonate that i think might work better (and am much more comfortable printing it than I was a year ago), but I also have some white PLA-AERO that i’m looking for an excuse to crack out.

#2 Hexapod

The hexapod project (which follows on from the previous darkpaw project), was/is quite an ambitious undertaking, and it’s now been going on for a few years. I had a number of goals with this project; to get good enough at CAD (specifically Fusion360), to teach myself the differential geometry approach to rigid body mechanics by reading and implementing A Mathematical Introduction to Robotic Manipulation by Murray, Li and Sastry, and to work out how to design software for rapid iteration of whole-body controller design. One of my goals was to use a whole-body feedback controller instead of the usual pre-programmed tripod gait that people implement.

Here is a video of it doing a test sequence.

Where I got to:

  1. CAD is mostly done. I’m happy with the general design though the body needs a few more iterations that will be driven by the electronics housing needs.
  2. Electronics. First pass is done. Robot moves off 12V 5A wall socket, which “should” be well within tolerance for the battery-base power supply, but I haven’t tested. On the plus side, i’ve more experience with power electronics via Pneumatica than I did initially so I’m less worried here.
  3. Firmware‘ is right now a rust application running on a Raspberry Pi, with a proof-of-concept serial interface to the Dynamixl servo motors. It’s mostly scratch code for testing right now, but also the cheapest to iterate on once I’m happy.
  4. Software-in-the-loop simulator. I have custom built simulator, written in rust and based on bevy and physx, that I’ll be using to test the whole body controller
  5. Modelling & Controller design. Kinematic modelling is done, and uses the rigid body modelling toolkit i wrote as part of coker (more on this later). I’m still working through the whole-body controller and footstep planner and might release a technical note about the design later on.

#3 Bela Bass Synth

So not too long after I submitted my Ph.D. i treated myself to a new bass guitar from https://industrialradio.com.au/, which has a special fretboard design to output midi.
I’ve always been interested in digital signal processing so when I found out about Bela (which is a programmable real-time audio hat for the BeagleBoneBlack), i decided to buy one and try to build a bass synth for my midi bass. I was inspired by an old VST instrument called iBlit by ERS, which uses a synthesis approach called ‘Band Limited Impulse Trains’ (hence blit) originally from this paper.

This project has been through a few iterations. Currently:

  1. The synthesis engine is working, but missing a few features
  2. We have a web-app through which i can edit some patches.
  3. We have 3D printed rackmount housing
  4. I’m currently working on adding a touchscreen for patch editing, but having issues with the SPI interface.

Source code for this project is here. The current friction comes from the need to set up SPI signal diagnostics, but my electronics workbench is busy with Pneumatica robot stuff, so that’s parked for the foreseeable future.

The future

With Pneumatica in full swing, I probably won’t be spending too much time on these projects, and unfortunately they’re not really blocked by things a bunch of AI agents can fix.

A foray into articulated robots.

The Darkpaw is a hobbyist quadruped kit that I’ve been playing around with for some time now. The goal is to learn how to model, control and program articulated robots for fun and (maybe one day) profit. This post will give a bit of an overview of how i got started on this, where I’m at, and lay some groundwork for future posts.

Into the web of legged robots.

Legged robots are pretty awesome (see this video by Zenta)

(As a aside – I showed my partner this video and now she wants one to keep her company on jogs so as to light her path and further intimidate the locals…)

or this one by Matt Denton…

Anyway, not long after the start of lockdowns during the COVID-19 pandemic in Melbourne, I found myself looking for a new project. I had been working as a post-doc at the Aero-Mech flight lab, and had been learning about underactuated robotics via Russ Tedrakes excellent course from MIT (very highly recommended). Additionally, I had been working mostly in Python (and ROS – ugh – but more on that another time) and developing/re-discovering my C chops. Upon this backdrop, and inspired by a random incursion into the youtube hexapod rabbit hole, I figured it’d would be fun to actually learn how to program such a robot.

Enter the Darkpaw

After a bit of rummaging around ye-olde-internets, I found the Adeept Darkpaw. It seemed to suit my needs; had most of the parts including motor driver hat, servos, camera and light – all that was needed was a Raspberry Pi 3b+ and some batteries. The ‘code’ was all python, as is the trend in hobbyist robotics, so it would be trivial to reverse-engineer to do whatever i wanted with it. So i got it and then got to work.

Two issues were immediately apparent. Firstly; neither my power adapter nor the two 18650 batteries were sufficient to keep the Pi from going under-voltage and shutting the thing down. (I’ve recently upgraded my power supply to a higher power, and i still get undervoltages, but at least the Pi doesn’t reset).

Secondly. Well. The shipped code was… lacking, and we’ll leave it at that.
Of course, this did not really bother me, (other than the general feeling of distaste when looking at it) since the plan was to re-write my own implementation.

The assembly was pretty straight-forward, and there were plenty of spares just-in-case. I wish it was easier to get the Pi in and out, or at least to access the SD card, but one can’t ask too much of such a cheap kit.

The biggest learning curve has been getting to grips with kinematics in practice. Given my background, one might expect me to find rigid body modelling ‘trivial’. The reality is that it took me a number of attempts to get it right – partly due to the fact that the system has algebraic constraints. This is a consequence of the design, as the motors do not drive the leg joints directly, they instead translate force through levers and links. I’ll save the maths for a later post.

Current State

A sweep motion running on all legs.

Currently Implemented:

  • Motor / LED drivers (via user-space i2c).
  • Forward and inverse kinematics.
  • A basic sweep/reset walk cycle for testing.

Next goal is a footstep planner!