Skip to content

Docker Update to get more info out of libfranka - #81

Closed
datvo06 wants to merge 20 commits into
droid-dataset:mainfrom
BasisResearch:docker
Closed

datvo06 wants to merge 20 commits into
droid-dataset:mainfrom
BasisResearch:docker

Conversation

@datvo06

@datvo06 datvo06 commented Sep 11, 2026

Copy link
Copy Markdown

No description provided.

amburger66 and others added 20 commits July 29, 2026 15:30
- Franka launch scripts, robot.py, and parameters adapted to our hardware
- NUC Dockerfile and setup script changes
- Point fairo submodule at BasisResearch fork (basis-hardware branch)
- Remove unused plotting/postprocessing modules
- Extend .gitignore for caches, build artefacts, and .env files
…fig baked in

Dockerfile.nuc rewritten around a minimal contract:
- ubuntu:noble base with only ca-certificates and sudo from apt; compiler,
  make, cmake, and all libraries come from the conda env (see fairo)
- micromamba replaces miniconda (solver: hours -> minutes) and installs
  from fairo's explicit lockfile with no solve at all
- env layer keyed on the lockfile alone, so fairo source edits don't
  re-download the environment
- tini as PID 1 (reaps the sudo'd controller process trees), entrypoint
  inlined
- libfranka built from the (restored) submodule pin instead of
  build_libfranka.sh's git machinery; parallel builds capped at nproc
- container-specific launch scripts replace the bare-metal pixi ones;
  polymetis conf in the fairo submodule is the single config source
- fr3 variant Dockerfiles and the ghcr workflows (which pushed to an org
  this fork cannot write to) are removed; docs and .docker/README.md now
  describe the build/runtime contract

Code changes to run in a container (and saner everywhere):
- restore pyproject.toml (deleted in 0af8eea, taking all python deps with
  it); trim dm-control/mujoco, swap opencv for the headless contrib wheel
- drop the deleted-but-still-imported RobotIKSolver from robot.py: unused
  velocity-control paths now raise NotImplementedError with restoration
  instructions; blocking position control is untouched
- run_server.py logs the effective parameters and polymetis conf (and
  masked sudo_password) at startup, so running on baked-in defaults with
  a missing bind mount is visible
- point the fairo submodule at the containerize-friendly build commits

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Fixes hydra's MissingConfigException for launch_robot (pkg://polymetis.conf)
and the URDF DATA_DIR lookup.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
…ata parse

The Release build's -DNDEBUG compiled away franka_panda_client's
assert-wrapped metadata parsing and init status check, crashing the
server on a zero-dof state at the first control update.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Bring over the gripper changes running on the NUC (droid-nuc dirty
worktree) so the container behaves identically:

- grasp(): force-grasp until contact, exposed over zerorpc; grips solid
  objects where a plain goto stalls. BabyRobotPredicator's grasp skill
  depends on it, together with the stop_gripper unstick step.
- update_gripper: goto force 5.0 -> 0.1 to match the live arm.
- ServerInterface: add grasp and stop_gripper client wrappers.
- _gstate(): log width/is_moving/is_grasped/prev_command_successful
  before and after every gripper command to expose the stuck-latch.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
The robot and gripper controllers now run as systemd-supervised quadlet
containers (see nuc-ansible), so a client connecting with launch=True
must no longer kill and respawn them — under the three-container layout
the respawn would also collide with the sibling container on port 50051.

- launch_controller / kill_controller become no-ops kept for zerorpc API
  compatibility; restart wedged controllers with systemctl on the NUC.
- FrankaRobot connects its polymetis interfaces lazily with a clean
  retry path, so run_server starts (and serves errors instead of dying)
  while the robot is powered off. GripperInterface is rebuilt when its
  command-executor thread has died, since a dead executor makes every
  later blocking command hang on the queue.
- New is_ready() RPC probes both controllers so clients can poll while
  the robot is off.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
The deployed image mixed old-signature wrapper scripts (with a NUC-local
robot_ip override appended) with the new 4-arg supervise_launch.sh; the
launcher args got shifted away and `env`, left with only VAR=value
assignments, printed the environment and exited 0 in a silent 5s loop.

- The wrappers now export ROBOT_IP (default 172.16.0.4, overridable via
  the unit's Environment=) and feed it to both the supervisor's
  reachability probe and the polymetis conf override, so the two cannot
  disagree and no NUC-local script edits are needed.
- supervise_launch.sh validates its argument signature and exits loudly
  with a usage message instead of degrading into the env-dump loop.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
polymetis has carried it all along -- the franka client fills it from
libfranka's tau_ext_hat_filtered every control cycle -- but the droid state
dict never passed it on. It is the link-side external-torque estimate a
guarded press needs to feel the button: without it the press falls back to
measured minus computed torques, which reads ~37 N at rest on the Basis
bench, and no contact threshold can sit above that.

BabyRobotPredicator's press_calibration.py refuses to run until this key is
present, by design.

Claude-Session: https://claude.ai/code/session_01R6GJkrzoJJvtjR1mdsPNwh
franka: expose motor_torques_external in get_robot_state
@datvo06 datvo06 closed this Sep 11, 2026
@datvo06
datvo06 deleted the docker branch September 11, 2026 19:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants