[ANN] PetoiBittle.jl: control a Petoi Bittle robot dog from Julia

Hi all,

I’d like to share a hobby project: PetoiBittle.jl, which connects to and controls a Petoi Bittle / OpenCat robot dog over a serial port. As far as I know it’s the first Julia-native library for this hardware.

The design goal was to get the speed of talking to the hardware directly together with a readable, beginner-friendly API:

  • High-level verbs for the built-in skills (walk_forward, trot_left, sit, stretch, greet, back_flip, and more).
  • Broad coverage: gaits, postures, behaviors, joint control, sound, and control/state commands (calibrate, gyro toggle, IMU readout).
  • A low-level escape hatch (RawCommand / RawQuery) so any firmware token stays reachable.
  • Zero allocation on the hot path; the verbs compile to the same code as the explicit commands.
  • A transport seam so the whole test suite runs without hardware, checked with Aqua.jl and JET.jl.

A quick taste:

using PetoiBittle

connection = PetoiBittle.connect(PetoiBittle.find_bittle_port())

PetoiBittle.stretch(connection)
PetoiBittle.walk_forward(connection)
PetoiBittle.trot_left(connection)

One example I’m especially happy with: a live GLMakie dashboard that runs real-time Bayesian inference of the IMU state with RxInfer.jl. It learns the per-axis sensor bias and noise during a calibration phase, then runs a calibrated and an uncalibrated pipeline side by side over the same live stream, so you can see the value of calibration directly. There’s a --simulate mode if you want to try it without the robot.

I’ll also be presenting this at JuliaCon 2026 (“Embedding Julia on Petoi Bittle and Raspberry Pi,” Aug 14), showing an adaptive Kalman filter running autonomously on a Raspberry Pi.

Repo: GitHub - bvdmitri/PetoiBittle.jl: A simple library to connect and control Robot Dog Bittle by Petoi · GitHub
Talk: Embedding Julia on Petoi Bittle and Raspberry PI :: JuliaCon 2026 :: pretalx

Feedback and testing on real hardware very welcome. Thanks!

17 Likes