I haven’t really been finding my job that interesting of late which normally results in me having a lot of energy for my out-of-work pursuits.
Unfortunately for reasons I can’t quite work out yet, I also haven’t been motivated to make any music and so all that’s really left is personal projects.
Anyway- the next few headings cover the things I’ve been up to.
Minecraft
I had a bit of time off over Christmas and we all went to stay with my wife’s family in Darwin where we enjoyed monsoonal weather and lots of pool time.
One of my nephews is wild about Minecraft (likes to watch streamers and their mods etc) but only has the Bedrock edition for his Xbox, so I bought him a copy of Java edition for Christmas.
I figured it was as good an excuse as any to try to run a Minecraft server yet again after numerous failed attempts (usually I just get bored); naturally I had to run it on the Ghettowulf Cluster to keep it interesting for myself.
Here’s where we ended up:
- A Fabric Minecaft server using the incredibly flexible itzg/minecraft-server Docker image
- Game sessions come through the Nginx load balancer running on a Vultr VPS
- Game data stored in my Rook Ceph storage cluster
- Nightly backups to Backblaze B2 using a Kubernetes CronJob
- Bedrock clients supported using Geyser
- Not well tested, but I was able to join my Java server from my Bedrock on my Android phone- my plan is to support players joining from an Xbox (so my little neice can play)
New Kubernetes node
Well, not strictly new- I had an old gaming PC that I’d taken to work to use as a build machine months ago.
It just stopped working one day so I figured I’d take it home and try to work out what was wrong with it.
The symptoms were that it would turn on, sometimes show some display and try to boot and then eventually turn off; I figure it was probably dried out thermal paste and decided to sort that out.
Practically, the process went like this (with my toddler son “helping” me throughout):
- Remove CPU and cooler
- Leave PC open on floor of my home office
- (Some days later)
- Sit down to apply thermal paste and hope for the best
However unbeknownst to me, my son had decided to do a bit of autonomous fixing on his own while I wasn’t around:
My fault for leaving it open really!
I entertained ideas of straightening out the pins but I’ve never had a steady hand and my eyes are terrible these days so I figured no time like the present for an upgrade.
So we’ve gone from an Intel i5 9400f to an AMD Ryzen 5600G and I’m pretty pleased with it- AMD make good stuff lately.
I can’t get my Nvidia GeForce RTX2060 to work in there though- no idea if it’s a new motherboard thing, an integrated Radeon GPU thing or what, but I don’t desperately need it working so it’s on the shelf for now; if I get a 4th CCTV camera I’ll be forced to either work out the Nvidia GPU or refactor cameranator to support Radeon GPUs (maybe- maybe it’ll still be within capacity for my 3 GPUs?).
It’s quickly overtaken my old HP server as “largest ability to do some work” and Kubernetes has adapted accordingly (as permitted
by nodeSelector
of course!)
And similarly Rook Ceph set about balancing the storage in my cluster (it’s got a 1TB spinning disk in there that I gave to Rook Ceph):
While I was at it, I dug out my Dremel and hacked up the document stands I bought from Officeworks and was able to tidy up the ap-maylands-1 datacenter shelf a bit:
The large case is the new node- I sure am putting some faith in those Bunnings shelf brackets!
A worse and more complicated RC car
A very long time ago I picked up one of these with an intention to make some sort of project of it- I’ve done this once before with Pygame for a different RC car but not very well.
I stumbled across some challenges when I opened the Hosim car up:
- Radio and speed controller are integrated, making it hard to inject my own signals and pretend to be the radio
- On opening this up, I discovered the speed controller was fully potted, so I couldn’t even solder my way around this
- Steering servo was the 5-wire type (meaning the integrated radio / speed controller was also part of a steering servo)
This time I wanted to use Rust and Bevy because Rust is awesome and Bevy is also awesome (and handles all the hard parts of input and scheduling for me).
Here’s where it ended up:
- Rust + Bevy native client running on MacOS (and probably anything)
- Incoming input events consumed from a PS4 controller
- Outgoing input events produced as UDP datagrams at 30 Hz
- MessagePack used as serialization
- Rust + Tokio native client running on a Raspberry Pi 3
- Incoming UDP datagrams consumed containing input events
- PWM signals produced for steering servo and speed controller
The code can be found here; interesting observation, it’s really not much code! Certainly seems to be less than my prior Python attempt. Rust is just so good.
Here are the parts of note:
- A HobbyKing KL15148B aircraft servo for a
steering servo
- I inherited this with a bunch of other RC aircraft stuff from a friend years and years ago so, so this seemed like a good way to reuse some old stuff and work around my 5-wire steering servo issue
- A Hobbywin Quickrun 1060 speed controller
- I wrestled with the old speed controller from the Tamiya but I think it’s translation from input PWM to output PWM wasn’t right for the beefier motor from the Hosim (the lowest possible duty cycle was way too fast); this new speed controller has been exceptional, I can go flat out and I can crawl along barely moving.
I also had a challenge around the woeful performance of the Raspberry Pi 3’s WiFi chipset / antenna combo and I worked around this by separating the concern of WiFi connectivity using a GL.iNet GL-MiFi that I had lying around as a wireless client with an iptables rule passing the received UDP on to the Raspberry Pi (which is connected via Ethernet).
Naturally I used OpenWrt for this piece because it’s great and it makes doing router stuff really simple.
Here’s the car in motion:
Here’s a nice glamour shot:
The batteries are on top because there’s no longer any room inside but it does make it nice and easy to remove them for charging- however it does also make it handle hilariously poorly with such a high center of gravity.
Here’s how the innards look with the body as far off as the WiFi antenna will allow without being unplugged:
I love it, the range is way worse (I can basically only drive it in my house and on the street outside my house), the handling is worse, the technology is way more complicated but it’s my mess dammit and over-complicating things is what I’m paid to do so really I’m just plying my trade here.
Some TODO items:
- A camera for remote control
- 4G / LTE for even remoter control (Tailscale naturally to VPN in)
- GPS for localisation
Hell, could I use an old Android and cover off on camera and localisation and do other cool stuff with the onboard sensors? It could even be the 4G / LTE backhaul! I shouldn’t have mailed all my old phones to my dad…
So what’s next?
Well I’ve got a mountain of unfinished projects, the next two that I wanna make some progress on are:
- PS4 controller + Rust + Bevy to control a DJI Tello that I’ve had forever
- The only way I have to control it right now is the official Android app and it’s garbage
- Build a robot on this base kit that I bought and assembled
with my son the other day
- I’ve had a Husarion Core2-ROS gathering dust for literally years; I think you’re supposed to use it with ROS but I’m on the fence about that- it’s been superseded by ROS2 which in my experience is even worse to develop for on MacOS and I dunno what Raspberry Pi support is like so who knows