Table of Contents

November 2024 newsletter

(Our next Folk open house is at noon on Sunday, December 15, at our studio in East Williamsburg, Brooklyn.)

What we've been up to

Small system improvements

New Folk evaluator

Omar: I've spent most of this month working on the new evaluator (folk2).

I've made a huge amount of progress; it honestly feels like I spent months stuck on blinking/flickering/ghosting bugs and then solved them all last week.

(Remember, the goal of folk2 is to have 60fps under bigger workloads, so we can use multiple tabletop editors at once & do other demanding stuff natively in the system. I think it's just important that the system feel really good and smooth, anyway. Need to be running programs in parallel, avoiding queueing, also just general evaluator optimization. Another goal is to make the system hard to crash or freeze just because one program misbehaves, as in any other operating system.)

There's still a lot of blinking under the new evaluator, but no ghosting, and I think the blinking all now emerges from genuine failures to meet timing (the label blinks out because the program region wasn't regenerated in time for the current frame).

Notice how the camera hits 60fps but the full-frame detection is only 20-30fps (this is using a 1080p image):

The bugfixes and improvements

Profiling

Performance profiling

Performance (CPU, stack) profiling is most of what I'm up to now, trying to eliminate the blinking.

I've already fixed a lot of weird issues using flamegraph profiling and made it noticeably smoother. Like replacing rand with rand_r to fix this:

I'm surprised at how much of the flamegraphs are just threading stuff, not Tcl-bound. Maybe I'm misreading and need different graphs (the mutex time is just time when it's scheduled off the CPU, not wasted time). Here is an average worker thread:

Now working on actually using Tracy to get a full view of what's going on, which I've been curious about for years.

Heap profiling

There are still persistent and pretty bad memory leaks on folk2, from 10MB to 200MB per second depending on how much stuff is out. I want to get to these soon after I fix the performance stuff.

Various unsuccessful quests

RFID localization

Omar: Didn't have time to do much this month, but I did figure out how to make the IB program not crash in its new connection-dependent style. We now just drop samples from the radio until a PC connects and we set up a FIFO and RFID protocol parser then. (The current goal is to get IB and OOB both running and synced up to a reset signal over TCP from a PC, then stream info from IB and OOB to the PC.)

This project isn't particularly blocked on anything, thankfully – just needs more time to put IB and OOB together and implement localization and then release it.

Portable gadget

Omar: Minor improvements:

Right now, the biggest issues with the gadget in practice are:

  1. decalibration because the camera is attached to the front panel, not the gadget chassis, and the front panel flexes
    1. solution: attach the camera to the gadget chassis! been meaning to do this for a while
    2. working on it, but haven't re-assembled and tested the gadget with the new case (I haven't figured out what to do with the front panel now):
      1. (notice how the camera attach point – the four holes – is now on the case itself, so it should be fixed with respect to the projector which would also be rigidly attached to the case)
  2. manual exposure not reliable (especially with a lot of sunlight/ambient light), tags often get washed out & don't detect when you just pull the gadget out somewhere
    1. idea: autoexposure?
    2. idea: self-autocalibration button/card that tunes exposure until it can see itself?

Trigger button, speaker, battery

These are all 'minor' additions to the gadget that I want to throw into future revisions (and have ordered parts for).

I've been talking about a trigger button for a while, but been blocked by figuring out what connectors/cables to use so the handle grip with trigger button can be removable (in case you want to mount onto an arm). Realized that some commercially available camera grips just use a 2.5mm jack for a button output. This seems good. Let's use a 3.5mm audio jack (TRRS) instead. Threw that into part orders and will probably throw it into next design rev.

as for what to do with the trigger button, I'm thinking about the Super Mario Galaxy Wii remote interactions and sounds…

(I also threw a speaker into part orders.)

(And the battery system – there are a bunch of Waveshare products that can supply the needed 5V5A to power everything – I'm hoping something more hat-like will work and can be built into a future gadget case. It'll be bigger, but I'm tired of carrying around power supply, battery charger, battery module all separately, and I don't think we can easily just do USB-C anyway so the connection'll be awkward if it's an external module.)

New off-the-shelf revision

I've been working on a new revision that uses the new off-the-shelf commercially available AnyBeam projector (you can just buy it on Amazon), so we'd actually be able to make them in quantity and give them to people. Trying to use as easy-to-get parts as possible.

img_5218.jpeg

The main (surprisingly big) issue is that this new AnyBeam only has a single USB-C port – no more HDMI in – which means it is incompatible with the standard Raspberry Pi 5, which can only do HDMI out.

(On the other hand, this'll be nice if we can get it to work, because it means one USB-C cable for everything, no more weird adapters and separate HDMI and power cables to fit inside the device. And it means probably more reliable power delivery to the projector through the standard USB-C cable, not running off a random USB-A port on the Pi anymore.)

So I spent a while looking at Pi alternatives.

(Both of these use Rockchip chipsets, and I have some concerns about Vulkan support on those, too..)

Anyway, I realized this week that the right thing to do might be to use the new Pi Compute Module 5 and design a new PCB carrier board for it (which would have a HDMI or MIPI-DSI to USB-C converter that could feed the projector, and proper MIPI-CSI ports for 1-2 cameras, and could fit onto a battery). Then we'd have full Pi camera and software and long-term support, plus the right outputs for the projector, plus we could probably shrink the hardware down a bit. But I'd need to learn how to do that :-)

Friends and outreach

What we'll be up to in December

Omar

Andrés