Skip to content

Instantly share code, notes, and snippets.

View cohnt's full-sized avatar

Thomas Cohn cohnt

View GitHub Profile
@cohnt
cohnt / convert.sh
Last active August 16, 2026 19:18
Steam Clip Conversion Script
#!/bin/bash
# Configuration
mkdir -p processed
mkdir -p to_delete
PROCESSED_ROOT=$(realpath processed)
TO_DELETE_ROOT=$(realpath to_delete)
# Iterate through each clip folder
for clip_dir in clips/*/; do
@cohnt
cohnt / RB-Y1 Box Pickup Swept Volume.md
Last active August 12, 2026 19:23
RB-Y1 Box Pickup Swept Volume

Box-transport swept-motion figure

Code for a chronophotography-style still: a mobile dual-arm robot carrying a cardboard box horizontally across a table, composited from a single fixed-camera video. Dense semi-transparent ghosts of the arms, a handful of box positions, no overlaid path graphics.

RB-Y1 design notes.md covers why it looks this way, what was measured, and which approaches were tried and rejected — including a few that failed and why.

@cohnt
cohnt / benchmark.py
Last active August 26, 2026 20:24
Drake KinematicTrajectoryOptimization PathConstraint Autodiff Benchmark
"""Time the real PathConstraint from KinematicTrajectoryOptimization.
Obtains the actual internal PathConstraint (anonymous namespace, not directly
constructible) via the public AddPathPositionConstraint() API, then times its
double-scalar Eval(). The measured call is identical before and after the
commit -- a plain float64 array in, a plain float64 array out -- so the pydrake
marshalling cost is the same in both builds and cancels in the comparison.
"""
import os, sys, time
import numpy as np
@cohnt
cohnt / mesh_vs_limits_upstream.py
Last active September 1, 2026 14:43
RB-Y1 Joint Limits Auditor
#!/usr/bin/env python3
"""Check every declared revolute joint limit in the RB-Y1 description against
the link geometry that joint moves.
A joint limit that reaches past the angle at which the two links either side of
it physically interfere is invisible to everything downstream. Links that share
a joint are filtered from collision checking in *any* collision checker --
correctly, since they are in contact at the bearing in every configuration -- so
the joint limit is the only thing that can keep them apart. A wrong limit
therefore propagates straight through IK, sampling-based planning, trajectory