# Torbjørn Must Test New Things. hp-mark Is Good Enough.

13-4-2021

I saw this talk about one of my favourite artist's creative process. Here are a few quotes from it that I've resoned around the last few days:

1: "Publishing is not finishing. All the emotions are different. [...] Publishing is deciding to stop when you want to keep working. And it's super painful."

2: "Publishing works best if you think of it as a style of working. It's an attitude that persists throughout the entire creative process. Working to publish is about getting shit done. Your whole mentality shifts when you're working to publish. You focus on the stuff that matters, and you ignore the stuff that doesn't."

3: "Working to publish, it's selfless, it's outward focused, it's about results, and giving back, and contributing to the world."

His shortest version of the good work to publish method is this:

4: "... doing only what matters, the whole time, and then stopping."

He explains that this is a great strategy because most ideas and attempts flop, and you don't know which will succeed beforehand.

5: "You can't choose what you're famous for. ... I can't make a song a hit. I can't control how my songs are pushed through the world and are experienced by others. What I can do is be prolific, I can be creative, I can make great stuff. What I can do is work to publish. You write the next scene, you record the next instrument, you build the next set, you shoot the next tape, you design the next synth, and I can [publish all that] and then I can move on, and I can go to sleep at night, knowing that I did everything I could."

I want to see if this musician's points can help me think better about where to take hp-mark and Hangprinter from here. His work is different from my work, but we're also similar. Let's see if we can make our experiences fit.

### 1: Publishing Is Not Finishing

Things are never finished, we have that in common. I like his emotion focused description.

With where I'm at with hp-mark right now, I don't want to keep working. So we're not exactly at the same spot, the musician and I. That's because hp-mark is not like a song. It's more like an instrument.

Since even before starting to build hp-mark, I've thought of it as lifting Open Source Hardware over a threshold, closing the loop, ending the guessing game in open source hardware positioning. A short-term grind, a long-term investment for the common good.

Proprietary machines have had motion tracking for decades. Everyone knows an OSHW motion tracker could be made. It just requires someone's work hours. That might as well be me, I thought. But it's not very fun, no, and I knew that. It's painful to continue. It will be delightful to stop.

My hp-mark process changes after this month's demo, because hp-mark is good enough. I have improved both code and hardware a lot, and tested it thoroughly over the last month. It can take OSHW over the threshold just fine, if it reaches widely.

### 2: Working to Publish

The musician and I have different outputs and different metrics. For music, success is to reach people. hp-mark needs to

• reach people, and to
• work well enough for them,
to be successful. My pain comes from ignoring/failing at the former while working to my bones on the latter.

But the musician's point makes a lot of sense for hp-mark in the continuation. Just make a small thing and see if it flies. See if you can have a little success, quickly. I will get back to that way of working.

Make something small work well enough, then try to reach people. Make something else work then try to reach people again. And again and again and so on.

I regret not pasting a giant Aruco marker on the Hangprinter back in November 2020. I could also have dropped the spherical markers in December, when I found they were hard to make/source. And the colored markers stayed with me for too long also. I would have reached more collaborators and supporters by doing something simple, and then spent time reaching out instead. Imperfect decisions there. Well, well.

### 3 and 4 are Mostly the Same

I think quotes 3 and 4 mostly come down to the same improvement of process for hp-mark as quote 2 did:

1. Make a small thing.
2. See if it flies.

### 5: Torbjorn Tests New Things

I interpret quote 5 as "test new things, test different things, do the next thing". The last couple of Hangprinter years have felt a bit stagnant. Particularly on the outreach side of things. Why?

Many worthwhile Hangprinter related projects are hard and time consuming. Robustness is not quick, easy, cheap, or sensational. We need robustness. So I had to dive into "doing it right", and swam across the swamp.

Still, I should have done it more quick, easy, cheap, and sensational than I did.

There's always a light version of any project, one that breaks you down less. I must break down less. Economically and motivationally.

Quick things to try:

• Hangprinter with a very heavy effector
• Hangprinter with big heat bed
• Hangprinter with capable clay extruder
• Hangprinter with two tool heads mounted
• Hangprinter with as simple as possible tool changer
• hp-mark with a GIANT marker
• Outdoor Hangprinting
• Collaboration with 3d-printing artists
• Scripting auto calibration (easy now, after 7 months of grind :-P)
• Store bought pellet extruder
Things that I don't yet know how to fit into the quick publish and outreach success template:
• Electronics (Duet Wifi to Duet 3) upgrade
• Even more hp-mark precision and accuracy
• Hangprinter v4 official release with documentation
• More closed line guides, smaller bearings

- tobben

# hp-mark Is Good But Lonely

27-3-2021

The rabbit hole has gotten deeper. But progress is fast at this stage. Average error (that's accuracy) has shrunk from ca 35 mm to ca 3.5 mm. Maybe even smaller. I haven't tested accuracy thoroughly yet.

Precision (that's stability of repeated measurements) at the origin is down from ca 5 mm to ca 1 mm. And also:

CHECK!Detect all markers on 95% of training images

The markers have changed from small colored spheres to bigger retro-reflective disks. They're cheaper, lighter, easier to manufacture, and perform much, much better.

I had to go and implement the disk geometric equations. My body protested for days when I picked up that task. Luckily, this time I had a research paper to guide me through most of the theory, and I could quickly replicate my old test structure. This made me ca 10x faster compared to when I did the sphere geometry.

I've posted a couple of demos since last time:

The first video shows the more fundamental use case for hp-mark: auto/assisted anchor calibration. It enables all other hp-mark use cases, including homing.

So hp-mark is growing up.

The extremely high recognition and identification rate I have now is thanks to some LEDs that I put around the camera:

I know I could enhance accuracy and precision further by mounting these slightly higher end, low distortion lenses:

However, changing the camera PCB and lens means having to calibrate it and also make a new mounting bracket for it. Plus all the fiddling with wires, focusing the camera, unexpected stuff etc.

My guess is 1-2 days of work. Is it worth it? What are my goals?

This sprint's goal is "high accuracy auto calibration". The higher level goal is "a reliable work horse". Peace of mind.

The better camera achieves all of that. So I have to do it. Just like I redid the markers.

This isn't how I worked a few years back. This isn't how the HP1, HP2, HP3, and first prototype of HP4 were made. They were all just barely working systems. This is why HP4 will be different.

### AAAAAAA!

Body is shouting loudly. And for good reason.

Rest of World, aka everyone I meet, care extremely little about hp-mark in its current form. It you're reading this blog post, you're among very few (source).

As much as I crave attention, Rest of World craves brain tickle. Humans need this always. Brains want to light up.

Current form hp-mark just isn't very...

... stimulating. For me, a person who is constantly dying for attention, this is a problem.

### What To Do

Even at nanometer precision, hp-mark without a context would be nano-stimulating to the non-Hangprinter owning world. Common solutions to this kind of problem:

1. Pay folks to suffer thruogh your under-stimulating thing. Attention-as-a-service. Day jobs. Ads. This is the most common solution out in the wild.
2. Find people who love your stuff by unusual amounts.
3. Put your thing into an exciting context/story.
4. Pitch! Learn pitching dark arts.
5. Accept defeat.

All of these have their own pros and cons. Too much to write down here. I will do number 5 for the rest of this sprint, and then try my luck at number 3.

The first slightly more exciting context, at least for hp-mark, will be HP4. End-to-end, released machine, with build manual and all. I look forward to that.

### Outlook

HP4 is not very interesting on its own either though. It will need it's own number 3 eventually. A context creates a story. Without a story, humans can not understand, or hardly even percieve your stuff.

### Number 3 Suggestions for HP4

• Hangprinting a body shaped house that's later sold as an art piece on a blockchain.
• A variable size telescope rod framed Hangprinter on wheels that collects its own raw material and can flip pancakes. Perfect for Burning Man.
• Using HP4 as a motorized trampoline for cats. Computer vision detects cat. Ejects/bounces cat. Cat happy. The end.
• A Hangprinter v4 built... inside Minecraft. And then being sold as an NFT on a blockchain. Just add the blockchain to the end of every suggestion from here on.
• A Hangprinter with AI that registers its own company, and prints and assembles an array of other machines to be its employees.
• A Hangprinter that just connects deeply with people.
• Something simpler. A HP that puts cheese on a pizza and the slices it.
• Hangprinter doing something oddly satesfying, like cutting paper, or 3d printing ceramic poop. With glazing.
• A Hangprinter hanging down from space.
• A Hangprinter mounted upside-down. So D-anchor is on floor, ABC-anchors in ceiling, and print surface is in the ceiling. Mounted sideways would also work, for hype purposes, but not very well in practice.
• A big Hangprinter outside using a hundred helium balloons as its D-anchor.
• A single, fat, vertical, constant speed extrusion. Preferrably made with the HP from space.
• Printing a complete working bike in one go.
• A flexible motor driven suspended Hang-printbed. A hangbed.
• A HP that's just super huge, with ABC anchors mounted on big trucks, and D on a high crane. This is the most frequently encountered one out in the wild, which more or less guarantees that it's a good one. The word HUUUUGE by itself already tickles a bit. I'm sure you can feel it.

### Short End Note

The old HP story is basically "a living thing that creates economic value". Fully automated, self-replicating, printing furniture, taking zero space when not in use. I'm not sure if that is tickly enough from my attention cravings' perspective. Before it's even out there we'll never know.

hp-mark does more than just exist now. It's getting quite good, but also quite lonely.

- tobben

# hp-mark Exists Now

15-2-2021

I climbed down a rabbit hole recently. Nearly half a year working on hp-mark. The past 84 days even skipping blog post and newsletter writing.

Progress has been steady. It works now. hp-mark measures positions, like:

Accuracy is not fantastic. The image above is a lucky one, with only 3 mm of error. A more commonly seen error is around 35 mm.

A lot of hp-mark work remains. I ticked 2 boxes, and added 6 new ones in the roadmap today:

Aquire camera 6D pose (this includes defining our world coordinate system)
Aquire effector 6D pose
Detect all markers on 95% of training images
Take image ourselves upon request, don't rely on other programs to take image first
Create a continous stream of position measurements (video?)
Get a statistical idea about size of error
Respond to RepRapFirmware/Duet request for position measurement
Integrate a second camera, to reduce error

I'm a bit overwhelmed still. I need to look backwards a bit.

### What Have I Done?

I've been surprised.

I chose C++, OpenCV, and a very traditional approach for this project. I just wanted the most basic code that would mecanically find circles among pixels, and then apply static geometric equations to transform circles into a nozzle position. No AI stuff, no GPU stuff, no fancy hardware control, just $$f(x) \rightarrow y,$$ where $$x$$ is an image, and $$y$$ is a nozzle position.

Such an old and explored problem! I felt confident.

Some things that took long for me to program, in descending order:

• Good enough ellipse detection. OpenCV's SimpleBlobDetector was ok, but ultimately not robust enough for our purposes. I was lucky to find ED_Lib, and spent a little over a month integrating it into hp-mark. For example, I had to fight a little to get sub-pixel accuracy in the center and size data. More about that here.
• Geometry. A photon bounces off a sphere, through a pinhole, and onto an image sensor. Many more follow. They create a pattern, a projection, on the image sensor. Given the position of the sphere, what's the equation of its projection? Or vice versa; given a projection, what's the position of the sphere? Which projected point correspond to the sphere's center? I derived all relevant equations by hand and wrote tests that wouldn't go green before I was exactly right. To bootstrap the chain of testable geometric functions, I derived the most basic equation in two different ways, and tested that the two derived functions gave exactly the same results. The system would never be good if the theory it rested upon wasn't sound, so I spent the time to make this perfect.
• Filtering among ellipses. The improved ellipse detector found lots of ellipses. Getting hp-mark to determine which ellipses represent real markers, was hard. To be real useful, hp-mark must be able to identify all its markers almost all the time, so I spent extra time here as well. I will return to this point in the future, but we're at least finding all the markers ca 80% of the time now.
• Color recognition. The human brain is full of heuristics that helps us determine color, in a wide variety of situations. Very fine details of camera settings, light/shadow, and way of definition, throws a simplistic computer program off very easily. The strongest heuristic I was able to program, in which all colors are relative, still can not identify a non-marker in a set of six real and one false marker. Still, I was able to keep color as a marker categorizer that lets us avoid having to put QR-codes on our markers. I fought a bit for the aesthetics.

I feel like I'm almost too tired of it to even write about this stuff now. But before I climb out of this rabbit hole, I can show you something about how the ellipse detector works internally:

In the image above, we see that one marker was missed, despise ED_Lib's many different heuristics. I tried to tune the heuristics for the hp-mark use case. See how that went, here.

Ultimately failing to tune the heuristics convinced me to put background plates below my markers. That is what I'm currently working on. They will probably end up looking something like this:

The final background design will probably be flat and circular, and hp-mark will use the edge of the background, as well as the marker itself, to determine its position, further improving both robustness and accuracy of the system.

But not today. I'm so tired of that kind of programming. Let's celebrate the restuls at the top of this post for a while first. And let's rest.

- tobben

Hangprinter Campaign: Bountysource Salt

Hangprinter Project: [1], [2], [3], [4], [5], [6], [7], [8], [9], [10], [11], [12], [13], [14], [15], [16], [17], [18], [19], [20], [21], [22], [23], [24], [25], [26], [27], [28], [29], [30], [31], [32], [33], [34], [35], [36], [37], [38], [39], [40], [41], [42], [43], [44], [45], [46], [47], [48], [49], [50], [51], [52], [53], [54], [55], [56], [57], [58], [59], [60], [61], [62], [63], [64], [65], [66], [67], [68], [69], [70]

Hangprinter Project Homepage: hangprinter.org

Print Issue Solution Filter Project: [1], [2], [3], [4]

Sourcing RepRappro Mendel in Larvik: [1], [2], [3], [4], [5], [6], [7]

Archive: 2014, 2015, 2016, 2017, 2018, 2020, 2021