{"slug": "mrcf-an-open-source-robot-control-framework-that-runs-on-a-laptop", "title": "MRCF, an open-source robot control framework that runs on a laptop", "summary": "Mitos Robotics has released MRCF, an open-source, robot-agnostic control framework that runs entirely on a laptop, using local models via Ollama to turn plain-English commands such as \"move the knight to f6\" into validated robot-arm actions. The framework is at alpha status and ships with four deployments: a `chess` task driving a real SO-101 arm through LeRobot, a `tabletop` block-stacking task on a UR5, plus `tidy` and `toolbench`. In MRCF the language model never moves the arm itself — it selects from a fixed action list (`pick`, `place`, `observe`) that deterministic skill controllers execute and self-check, with a safety validation step that blocks plans violating workspace bounds, object existence or sequence rules.", "body_md": "Control a robot arm in plain English, with local models. You type \"move the knight to f6\". The framework works out what is on the table, plans a sequence of actions, checks the plan against safety rules, and runs it through deterministic skill controllers that check their own success.\n\nThe language model never moves the arm itself. It picks actions from a fixed\nlist (`pick`, `place`, `observe`, …), and policies carry them out. Policies\nnever see object names or memories, so the same pick works in any task, and a\ntask works on any arm that has its own policies.\n\nA policy is planned or learned. Planned policies, such as pick and place, are\ndeterministic and work from geometry. A learned policy is a model trained\nelsewhere, on demonstrations (ACT, through LeRobot) or by reinforcement\nlearning. It runs here on the arm's own stream of joints and camera frames,\nusually for one segment of a skill between planned steps. Nothing in this\nrepository trains a model, so the framework stays light enough to deploy on\nthe robot. Everything runs on your machine: [Ollama](https://ollama.com)\nruns the models, and an optional segmentation model (SAM2) measures objects\nfrom camera images.\n\n**Status.** Alpha. The framework is robot-agnostic: nothing in it names an\narm. A deployment is one arm, one layout and one task, and names its arm.\n`chess` drives a real [SO-101](https://github.com/TheRobotStudio/SO-ARM100)\narm through [LeRobot](https://github.com/huggingface/lerobot) and plays with\nchess pieces. `tabletop` stacks letter blocks with a UR5 (`mrcf/backends/ur5`).\n`tidy` has the SO-101 put everyday things away into a tub, and `toolbench` has\nthe UR5 put hand tools into a box. The last three share one table task (find,\nname, pick, place), which belongs to the framework (`mrcf/tabletop`). Each of\nthem gives it its own arm, layout and rules.\n\nYou set up a new automation in the order a factory would: the arm, then its sensors, then the job.\n\n1. **The arm.** Use one the framework has (`mrcf/backends/so101` ,`ur5` ), or\nadd one: answer`n` at run.py's first question, or run`python tools/new_arm.py NAME` . This copies`mrcf/backends/_template` , which\nruns as an arm in memory until you add its SDK\n([DEPLOYMENT_SPEC.md](https://github.com/mitos-robotics/MRCF/blob/main/DEPLOYMENT_SPEC.md#adding-an-arm) ).\n2. **Its sensors.** List its cameras and other sensors in its`robot_config.py` (`CAMERAS` ,`SENSORS` ). Find them by name with`tools/find_cameras.py` and calibrate them\n([COMMANDS.md](https://github.com/mitos-robotics/MRCF/blob/main/COMMANDS.md#first-time-setup-on-another-arm) ). run.py shows\nthem all before each session.\n3. **The job.** Answer`n` at run.py's second question to start a deployment\n(one arm, one layout, one task) from the nearest existing one. It gets its\nown config, its rules for the arm (`profile.py` ), and the skills and\npolicies it needs ([POLICIES.md](https://github.com/mitos-robotics/MRCF/blob/main/POLICIES.md) for a new one, planned or\nlearned).\n4. **Run it, and read the record.** Every run keeps its failures and timings\n(see the flight recorder, below), which show what to fix and what to make\nfaster.\n\n```\nYou: \"move the knight to f6\"\n        │\n        ▼\n[scan]       overhead camera → board, squares, and every object on it:\n             where its foot is, how wide, what colour        (chessboard.py,\n             matched against the object memory, so each        mrcf/perception/,\n             piece keeps its identity and what is known        object_memory.py)\n             about it across scans, moves and restarts\n        │\n        ▼\n[perceive + decompose]   free-text scene description; split into sub-goals  (vlm.py)\n        │\n        ▼\n[plan]       sub-goal + world model + recent events → JSON action list       (vlm.py)\n        │\n        ▼\n[validate]   workspace bounds, object existence, sequence rules,            (safety.py)\n             per-action pre-conditions — a blocked plan does not run\n        │\n        ▼\n[execute]    each action turns names into geometry and runs the       (manipulation.py,\n             arm's policy: retries; the gripper camera measures the     mrcf/policies/)\n             piece from above before the grasp; a failed step stops\n             the plan and triggers a re-plan from a fresh look\n        │\n        ▼\n[outcome]    written back to the world model and the object memory   (manipulation.py)\n\nalongside    watchers on their own threads — the motion guard: a hand  (watchers.py,\neverything   moving near the arm — can trip the interlock; the arm      interlock.py,\n             freezes where it is at once, and carries on once it has    motion_guard.py)\n             gone (any other stop abandons the command)\n```\n\n[DEPLOYMENT_SPEC.md](https://github.com/mitos-robotics/MRCF/blob/main/DEPLOYMENT_SPEC.md#how-the-pieces-fit) has the full\ndiagram and the rules that keep its parts separate.\n\nThe model never produces coordinates. Positions come from camera geometry: a calibrated overhead camera, and a gripper camera whose pose is worked out from the arm's joint angles. So their accuracy depends on the calibration, not on a language model.\n\nThe code has three tiers, so a new task or a new arm touches only one of\nthem. Each deployment names its arm in its config (`ARM_NAME`). The tools\ndrive the arm `MRCF_ARM` names (the SO-101 by default). The framework is one\npackage, `mrcf/`, and the only thing `pip install` installs\n(`from mrcf import manipulation`). The scripts beside it use it from the\nrepository.\n\n```\nmrcf/                   ── the framework: the one installed package ──\n  robot_env.py          RobotEnv — the interface every backend implements\n  interlock.py          stops the arm from anywhere, mid-move\n  watchers.py           runs perception on its own thread while the arm works\n  motion_guard.py       freezes the arm when anything but the arm moves near it\n  flight_recorder.py    what happened, in order: one timeline, the last minute of joints and\n                        frames, and an incident report when an action goes wrong\n  capabilities.py       what a backend can do beyond RobotEnv, one Protocol each\n  overhead_calibration.py  a fixed camera's calibration: checked every scan, re-posed when it moves\n  rig_state.py          where each rig's own files live: rig/<backend>/, under MRCF_HOME\n  streaming.py          an arm's stream: what learned policies are trained on and run on\n  manipulation.py       the standard actions: planner names → policies → world model\n  NOTES.md              what it cannot do yet, and what it has shown (each backend and task has one too)\n  HISTORY.md            the dated runs behind its values and fixes (so do policies/, each backend, each task)\n  controller.py         the loop: a command → plan → safety → dispatch → recover\n  vlm.py                every model call: perception, scene discovery, planner\n  model_server.py       where the models run: Ollama, any OpenAI-compatible API, or a plugin's\n  scene_state.py        the world model the planner sees\n  action_registry.py    the actions a planner may use, their conditions, and dispatch\n  skill_executor.py     run_policy(): safety monitor + failure description\n  safety.py             plan-time validation, execution-time monitoring\n  object_memory.py      one identity per physical object, across scans and restarts\n  scene_scan.py         puts a surface scan into the object memory and the world model\n  profiles.py           a deployment's rules for its arm (its profile.py), laid over the arm's facts\n  rig_report.py         what an arm brings to a job, shown before a run: gripper, cameras, sensors\n  devices.py            this computer's cameras and ports, by name, without opening any\n  privacy.py            guards every kept picture: keeps only the work area, covers faces\n\n  tabletop/             the table task (find, name, pick, place, stack, put into) that a\n                        deployment hands its config to (deployments/tabletop, tidy, toolbench)\n\n  policies/             how an arm does things. Planned from geometry: parallel_jaw/ (pick,\n                        place, …); approaches.py and aligners.py (the ways a pick comes at an\n                        object); stand_up.py (stands a fallen object back up). Or learned:\n                        learned.py (a trained model on the arm's stream); lerobot_model.py\n                        (a LeRobot checkpoint); rl.py (a Stable-Baselines3 one); packages.py\n                        (a model with the manifest it travels with, and the plugin seams for\n                        sources and formats)\n\n  perception/           ── seeing the work surface, from any calibrated camera ──\n    plane_geometry.py   measures an object (foot, height, widths) from its outline\n    shape_fit.py        how tall an object is: fits a solid to its outlines in several views at once\n    segment.py          SAM2 outlines of whatever is under a set of points\n    surface_scan.py     finds and measures everything on the work surface, in any light\n    fiducials.py        AprilTags and bullseyes: where a camera, a gripper or a board is\n    hand_eye.py         where a wrist camera sits on the arm, from views of a grid\n    lighting.py         whether the light is good enough to see by (washed out, too dark), per area\n    outlines.py         one outline per object from a segmenter's many; an outline's middle\n    tones.py            where a colour falls between two of the surface's own colours (any light)\n    lying.py            an object on its side: which way it lies, which end it stands on, and\n                        where the knob at its top is, from a fixed camera or a wrist one\n\n  backends/             ── how to drive a robot ──\n    __init__.py         arm(): the arm that runs (MRCF_ARM); RIG_SETTINGS: what every arm's config has\n    rig.py              RigEnv: an arm's cameras and gripper geometry from its kinematics\n                        (camera models, grasp point, gripper tag, wrist servo, sentry)\n    contract.py         check_backend(): what every arm's env must do, checked offline\n    so101/              the SO-101 follower: env.py (SO101Env, built from follower.py,\n                        kinematics.py, gripper.py, orientation.py, motion.py, cameras.py,\n                        stream.py), robot_config.py (this rig's measured values: the arm's\n                        facts, whatever the task), make_policies()\n    ur5/                the UR5 (CB3) with a Robotiq Hand-E, over ur_rtde: env.py (UR5Env),\n                        arm.py, gripper.py, kinematics.py, robot_config.py, make_policies()\n    _template/          a new arm to copy: a RigEnv over an SDK, its config, its policies\n                        (it runs in memory as it is, and passes the contract checks)\n    real_robot_env.py   base class for an arm driven by your own SDK (it owns the cameras)\n\nrun.py                  deployment launcher\n\ndeployments/            ── what to ask it to do ──\n  chess/                chess pieces on a board: board scan, naming, controller. A package,\n                        deployments.chess (python -m deployments.chess.llm_controller)\n  tabletop/             the UR5's letter blocks on its table: the table task (mrcf/tabletop)\n  tidy/                 the SO-101 putting everyday things away into a tub: the table task\n  toolbench/            the UR5 putting hand tools into a box: the table task\n  <name>/profile.py     how that deployment drives its one arm (ARM_NAME), laid over the arm's facts\n\ntools/                  ── measuring and checking the rig, on whichever arm runs ──\n                        cameras, tags, the overhead camera's calibration, the motion guard.\n                        new_deployment.py: a new deployment from the nearest one's code, on\n                        its arm or another, with its rules offered as candidates only.\n                        new_arm.py: a new arm from mrcf/backends/_template. find_cameras.py:\n                        lists the cameras by name without opening any. fetch_face_model.py,\n                        clean_pictures.py: covering faces\n  so101/                the SO-101's own tools: its poses, servos, joint and gripper calibrations\n\nrig/<backend>/          ── this rig's own files, never in git (rig_state.py) ──\n                        the overhead camera's calibration, the photo of the empty surface,\n                        the URDF, and what the calibration tools save for refitting\n\ntests/                  framework tests (pytest)\ngit clone https://github.com/mitos-robotics/MRCF.git\ncd MRCF\npython -m venv .venv && source .venv/bin/activate     # or conda; Python 3.10 or newer\npip install -e \".[dev]\"                                # the framework and its tests: no hardware, no models\n```\n\nIt runs on Linux, Windows and macOS. The framework works on Python 3.10 to\n3.15. To drive a real SO-101 or UR5, use Python 3.10 to 3.14: their libraries\n(LeRobot's placo and torch, and ur_rtde) have no builds for 3.15 yet. The commands in these docs are written\nfor a macOS or Linux shell. On Windows, activate with `.venv\\Scripts\\activate`\nand copy folders with `xcopy /E` or Explorer. Where the docs say\n`export NAME=value`, set the variable with `$env:NAME = \"value\"` (PowerShell).\n\nThen add what you need:\n\n| Run the tests, or contribute | `.[dev]` , or`.[dev,measure,sb3]` for the whole suite ([CONTRIBUTING.md](https://github.com/mitos-robotics/MRCF/blob/main/CONTRIBUTING.md#tests-and-lint) ) | \n| Run a learned policy | For a LeRobot policy (ACT, diffusion, …): `pip install lerobot` (`.[so101]` includes it). For a Stable-Baselines3 policy:`.[sb3]` | \n| Drive an SO-101 | A LeRobot environment, then `pip install -e \".[so101]\"` ([Quick start: SO-101](#quick-start-so-101) ) | \n| Drive another arm | `.[rig,dev]` and the arm's SDK ([Quick start: another arm](#quick-start-another-arm) ) | \n| Talk to it in plain English | [Ollama](https://ollama.com) , then`ollama pull gemma4:31b` (~20 GB). Or use models on another machine or a hosted API ([COMMANDS.md](https://github.com/mitos-robotics/MRCF/blob/main/COMMANDS.md#models-on-another-machine-or-a-hosted-api) ) | \n\nYou need an SO-101 follower arm already calibrated with LeRobot, a USB camera on the gripper, and a second camera fixed above the table.\n\n```\n# In your lerobot environment\npip install placo                        # Cartesian IK\npip install \"transformers>=4.56,<5\"      # optional: measuring objects (SAM2)\npython tools/so101/fetch_urdf.py\n\nollama pull gemma4:31b                   # vision and planning (~20 GB)\n```\n\nPoint the code at your arm (or edit `mrcf/backends/so101/robot_config.py`):\n\n```\nexport SO101_FOLLOWER_PORT=/dev/tty.usbmodemXXXXXXXX   # lerobot-find-port finds it\nexport SO101_FOLLOWER_ID=my_follower     # your lerobot calibration id\n# export MRCF_ARM=so101                  # the default; another arm is MRCF_ARM=<its mrcf/backends/ folder>\n```\n\nThe port name depends on the OS: `/dev/tty.usbmodem…` on macOS, `/dev/ttyACM0`\non Linux (your user must be in the `dialout` group), and `COM3` on Windows.\n\nThen measure the rig. `robot_config.py` ships with **one rig's measured values**\n(poses, camera calibrations, workspace bounds), and you must re-measure every\none of them on yours. [COMMANDS.md](https://github.com/mitos-robotics/MRCF/blob/main/COMMANDS.md#first-time-setup-in-order) lists\nthe steps in order. You measure the arm's poses and how wide its jaws really\nopen, correct its joint readings and calibrate the overhead camera from\ntouches on a chessboard, check reach, and calibrate the gripper camera.\n\nRun it:\n\n```\npython run.py\n```\n\nrun.py first asks which arm to use, with the one it finds plugged in as the\ndefault (Enter). Next it shows what that arm has, without opening or connecting\nanything: whether the arm is plugged in, its gripper, each camera (calibrated\nor not, and whether the rig's cameras are plugged in), its other sensors, and\nwhether kept pictures are guarded. Then it asks which of that arm's\ndeployments to run, with the arm's own (chess) as the default. Answer `n` at\neither question to start a new arm or a new deployment\n([Extending it](#extending-it)). `python run.py --arm so101 --deployment chess`\nskips both questions. The arm then homes, parks out of the overhead camera's\nview, scans, and gives you a prompt:\n\n```\nYou: pick up the pawn on e2\nYou: put it on e4\nYou: that piece on c3 is the white bishop\nYou: what can you do?\nYou: /objects                  ← slash commands skip the models: /pick, /home, /status, …\n```\n\nStay within reach of the power switch for the first session. The safety layer\nenforces workspace bounds and per-step joint limits, but nothing replaces\nwatching the arm the first few times it moves on its own. When you are done,\n`python tools/so101/rest.py` parks the arm low and cuts torque.\n\nCopy the template, make it drive your arm, and check it offline before it moves:\n\n```\npip install -e \".[rig,dev]\"                   # cameras, tests; and your arm's SDK (a UR: pip install ur_rtde)\ncp -r mrcf/backends/_template mrcf/backends/my_arm      # then the places marked YOUR ARM\nexport MRCF_ARM=my_arm\n```\n\n[DEPLOYMENT_SPEC.md](https://github.com/mitos-robotics/MRCF/blob/main/DEPLOYMENT_SPEC.md#adding-an-arm) explains what to\nimplement and the contract that checks it, with a UR5 worked through.\n[HARDWARE.md](https://github.com/mitos-robotics/MRCF/blob/main/HARDWARE.md) covers the cameras, board and tags the rig needs,\nand [COMMANDS.md](https://github.com/mitos-robotics/MRCF/blob/main/COMMANDS.md#first-time-setup-on-another-arm) the\ncalibration, in order. The wrist camera's calibration is still SO-101-only, so\nanother arm picks with the overhead camera until it is ported.\n\nAll framework code talks to a `RobotEnv`. A backend implements `step`,\n`get_ee_pos` (the point the jaws close on), `get_joint_angles`, `get_body_pos`,\n`get_movable_body_names`, `get_static_body_names`, `render_image` and\n`pixel_to_world`. Arms with a gripper add `move_ee_to` (which returns whether\nit arrived), `set_gripper`, `get_gripper_width` and `go_home`. A backend that\nknows where its cameras are adds `camera_model(camera, width, height)`, which\ngives a camera's lens and pose, so the measurement modules below can work\nwith it.\n\nEvery backend calls `guard()` before each command it sends to the motors, and\nimplements `hold()`. That is how a stop reaches the arm mid-move. Cameras must\nbe readable from other threads while the arm moves. Every program calls\n`connect()` before the arm first moves and `stop()` at the end. On an arm built\non `backends.rig.RigEnv`, the motion guard runs from `connect()` to `stop()`,\nwhatever the arm's own `connect()` does.\n\nA rig can have any cameras and sensors. The arm's config lists them\n(`CAMERAS`, `SENSORS`) and names the two cameras that have jobs: one on the\ngripper and one fixed over the surface. Either can be absent.\n`list_cameras()`, `camera_model()` and `read_sensor()` give access to the rest.\nA force sensor is read with `get_contact_force()`, which the safety monitor's\nforce limits use. [HARDWARE.md](https://github.com/mitos-robotics/MRCF/blob/main/HARDWARE.md#cameras-and-sensors-what-each-is-for)\nexplains what each one is for.\n\nA policy drives the arm to do one thing, from geometry. It takes a `Target`\n(where an object's foot is, how tall and wide it is), the `Obstacle` s beside\nit, and optionally a `Vision` hook for looking while it works. It returns an\n`Outcome`: whether it worked, what it measured, and how it is holding what it\npicked. It never sees a name, the world model or the memory.\n`policies.parallel_jaw.ParallelJaw` is the two-finger pick and place.\nEach arm configures it with its gripper's measurements (see `make_policies()`\nin `mrcf/backends/so101`).\n\nHow a pick comes at an object depends on where the object stands, because a\ndifferent limit takes over at each distance from the arm's base. Each of the\nthree approaches is the first choice in its own zones\n(`GripperSpec.near_base_m`, `far_reach_m`), with the others as fallbacks:\n\n| Approach | Where | What it does differently | \n|---|---|---|\n| `top_down` | Mid-reach, and close to the base wherever it can reach | Hovers, lines up with the wrist servo from its calibrated height, and goes straight down | \n| `near_base` | Close to the base, where `top_down` cannot reach | Hovers low instead of climbing to the servo's height, lines up with the fixed camera, and lifts only as high as it can reach. The arm's own base counts as an obstacle | \n| `reach_out` | Far out | Uses the lean the arm needs to reach at all. The fixed camera lines up once that lean is far from the servo's, and a little joint margin is kept. With jaws that open along the arm, the grasp goes higher up the object so the tipped jaws clear its top | \n\nEach approach is checked against the arm's reach before anything moves. A\nretry tries the next one that can be done, and if none can, the pick is\nrefused without moving. `Outcome.approach` and `Outcome.attempts` say which\napproach was used and why each attempt was retried. Approaches are data\n(`mrcf/policies/approaches.py`). Each lines the jaws up over the object with\nits list of aligners (`mrcf/policies/aligners.py`): the foot as seen by a\nlocated wrist camera, the fixed camera's sighting, or the wrist servo. So a\nnew way of picking is a new `Approach`, plus one `Aligner` if it lines up in a\nnew way.\n\nA **learned** policy (`policies.learned.LearnedPolicy`) is a trained model,\nsuch as ACT, diffusion, SmolVLA or a SAC policy from HIL-SERL. It runs on the\narm's stream until its segment is done (`capabilities.ActionStreaming`: the\narm's observation and action, one tick at a time, through the arm's own safety\nchecks). `chain()` puts it between planned steps. It travels as a package\n(`mrcf/policies/packages.py`): the model, plus a manifest naming the stream\nit was trained on, whose fingerprint says which arms can run it. You install\nit by reference: a folder, the Hugging Face hub, or a source an installed\nplugin adds, such as a store's.\n\n[POLICIES.md](https://github.com/mitos-robotics/MRCF/blob/main/POLICIES.md) takes a new policy of either kind from an idea to a\nverb the planner can use, step by step. For a planned one, that means writing\nand testing it. For a learned one, it means choosing what to train it on\n(`tools/show_stream.py`), packaging it, checking that it fits, running it, and\nreading its refusals.\n\n`manipulation.install(policies, vision, scenario)` registers the standard\nactions: `pick`, `place`, `move_above`, `home`, `open_gripper` and\n`close_gripper`. Each finds the named object in the world model, runs the\npolicy, and writes the outcome back. The `Scenario` hooks carry what only the\ntask knows: how tall an unmeasured object could be, how to describe one, what\nto log, and, optionally, how far to lean the gripper over a particular spot.\nThat last is an approach rule: where the arm's search for a lean starts.\nChess has `config.APPROACH_RULES`, now empty because the approaches above\nchoose the lean. `manipulation.object_action` adds a task's own verb on one\nnamed object, such as a push or a nudge, with the same bookkeeping.\n\n**Standing a fallen object up** (`mrcf/policies/stand_up.py`, `ParallelJaw.stand_up`)\nis one such verb. Given how the object lies (`Target.lying`: its axis, length,\nand the knob at its top, from `mrcf/perception/lying.py`), the jaws come\nstraight down, turned square across it. They grip the knob low, with the fixed\njaw beside it, and lift straight up. The knob turns between the pads, the\nheavier foot slides in underneath, and the object is let down standing. After\na miss, the wrist camera looks again from above the object and the next try\naims at what it sees, without the arm going back to park\n(`capabilities.WristSurface`: where the wrist camera's pixels land, from the\nservo's calibration). Chess registers it as `stand_up`.\n\n``` python\nfrom mrcf.watchers import Watcher\n\ndef hands(frame, model):\n    if hand_near_arm(frame, model):                       # your detector\n        env.interlock.trip(\"hand near the arm\", source=\"hands\")\n    else:\n        env.interlock.clear(\"hands\")\n\nWatcher(env, \"overhead\", hands, hz=10, fail_safe=True).start()\n```\n\nA trip holds the arm where it is at once, from the tripping thread, without\nwaiting for the next command. It raises `MotionStopped` out of whatever was\nmoving the arm, and nothing moves again until every source has cleared. A\n`Watcher` runs your function on a camera's newest frames on its own thread,\nwhile plans and moves carry on. With `fail_safe=True`, a watcher that crashes\nor loses its camera stops the arm itself. A deployment lists its watchers in\n`config.WATCHERS`.\n\n`mrcf/flight_recorder.py` writes everything that happens to one timeline: what\neach policy decided, each move and grip, each pause, and what each scan\nchanged. Underneath, it keeps the last minute of joint readings and camera\nframes. When a standard action or a verb fails, needs another attempt, or is\ncontradicted by the next scan, it leaves an incident under `runs/flight/`:\nthe timeline from just before it, the frames, and a story to read\n(`python -m mrcf.flight_recorder`). Any other failure leaves one too, with its\ntraceback: a command's error, a deployment's start, a crash on any thread.\nEach run's folder also keeps:\n\n- `session.json` : which arm and deployment ran, with which cameras and\nsensors, at which commit\n- `console.log` : everything printed, time-stamped\n- `timings.json` : every command, plan, step, action and model call, counted\nand timed, failures included\n\n`python -m mrcf.flight_recorder --timings` shows where a run's time went,\nlargest first.\n\nNo picture of a person is kept (`mrcf/privacy.py`). A calibrated camera's\nframes keep only what lies toward the arm's work volume, so the room, the\nceiling and anyone standing at the table are blacked out. Every face found is\ncovered, using OpenCV's YuNet face model (fetch it once with\n`python tools/fetch_face_model.py`). The computer's own cameras (a laptop's,\nan iPhone's) are never opened. An arm refuses to open its cameras while fewer\nof the rig's cameras are plugged in than it names (`mrcf/devices.py`), and\n`tools/find_cameras.py` lists cameras by name without opening any.\n\nOne watcher ships with the framework: `MotionGuard` (`mrcf/motion_guard.py`).\nIt watches a calibrated fixed camera and trips the interlock when anything\nother than the arm moves near it, such as a hand reaching in. It tells the\narm's own motion apart by drawing the arm into the image from its joint angles\n(`RobotEnv.arm_shape`) and ignoring changes there. Its trips pause the move\ninstead of abandoning it (`Interlock.pause_only`): once nothing has moved for\n2 s, the guard clears and the move carries on from where it stopped. Every arm\nbuilt on `backends.rig.RigEnv` starts one on each camera in its\n`MOTION_GUARD_CAMERAS` (the overhead camera, and any other fixed camera that\nsees what it cannot) every time it connects (`robot_config.MOTION_GUARD`). So\nevery program that moves the arm is watched. `check_motion_guard.py` shows\nwhat the guard sees.\n\n``` python\nfrom mrcf.motion_guard import MotionGuard\n\nguard = MotionGuard(env, \"overhead\", zone=[(x0, y0), (x1, y0), (x1, y1), (x0, y1)]).start()   # fail-safe Watcher\n```\n\n### `mrcf/vlm.py`, `mrcf/scene_state.py`, `mrcf/action_registry.py`, `mrcf/controller.py` — models, world model, actions\n\n`mrcf/vlm.py` talks to the models (perceive, discover, decompose, plan).\n`mrcf/scene_state.py` is the world model they read. `mrcf/action_registry.py`\nholds the actions a plan may use and runs them (`dispatch`). `vlm` re-exports\nboth. `mrcf/controller.py` is the loop every deployment runs. It decomposes a\ncommand, plans it, checks the plan and dispatches it step by step, re-planning\nfrom a fresh look after a failed step. The deployment supplies hooks\n(`controller.Deployment`): how it scans, where the arm waits during a scan,\nand where home is.\n\n``` python\nfrom mrcf import vlm\nfrom mrcf.vlm import SceneState, register_action, register_condition, plan, dispatch\n\nvlm.configure(model_server=\"ollama\",          # or \"openai\", at model_url=...\n              model=\"gemma4:31b\", planning_model=\"gemma4:31b\",\n              observe_cameras=[\"overhead\"])\n\n@register_action(\"nudge\", description=\"Push an object a short distance.\",\n                 parameters={\"object_name\": \"Exact name of the object.\"},\n                 conditions={\"pre\": [\"object_exists\", \"nothing_carried\"]})\ndef skill_nudge(env, scene_state, object_name, **_):\n    ...\n    return success            # dispatch() passes this back to the controller\n```\n\nThe `description` is the planner's only clue about when to use an action.\nPre-conditions block an action. Post-conditions warn when the world model and\nthe robot disagree afterwards.\n\n`run_policy(fn, name, env, **kwargs)` runs a policy under the execution\nmonitor, whose limits are checked every control cycle through the interlock.\nWhen the policy fails, it asks the vision model to describe the scene (but\nnot when it refused before moving, or was stopped). `run_skill` does the same for a function that returns `(success, message)`.\n`safety.validate_plan(actions, scene_state)` checks a plan before anything\nmoves. The controller runs it on every plan. If you run skills yourself,\noutside the controller, call it yourself.\n`safety.configure()` sets the workspace bounds, force thresholds and any\nsequence rules (for example, no `pick` while already holding something).\n\nA scan says what is where now. The memory says which of those things is which. It matches each scan against what it remembers. An object moved by hand is recognised as having moved. One taken away is kept as missing, and recognised when it comes back. The arm's own picks and places are recorded with certainty. Each label records who gave it: the vision model's guess, a shape match, a taught layout, or the user. A label from a better source is never overwritten by one from a worse source. The memory is saved to disk, so it survives restarts. Its recent events go into the planner's prompt, so \"put it back\" has a \"back\".\n\nFrames and camera models go in, and measurements come out. Nothing in\n`mrcf/perception/` knows which arm holds a camera, what the task is, or what\nthe objects are called. A test checks that it imports no world model, memory,\nplanner, arm or policy.\n\nGiven a camera that knows where it is relative to the table, an object's\noutline (from SAM2, via `mrcf/perception/segment.py`) becomes measurements:\nwhere its foot stands in the arm's frame, how wide it is, and, from a slanted\nview, its height and its width at every height. `surface_scan.scan()` does\nthis for everything on the surface, and `scene_scan.observe()` feeds the\nresults to the memory without knowing what the objects are. On a patterned\nsurface, a photo of the empty surface tells objects apart from the pattern.\nThe two are compared after levelling the light, so a change of exposure or\ndaylight does not count as a change of scene.\n\nIt works out where a camera bolted to the gripper sits relative to the\ngripper, from views of a flat grid at several arm poses. Once that is known,\nevery frame from that camera comes with its pose from the joint angles. The\nSO-101's `tools/so101/calibrate_gripper_pose.py` uses it.\n\n[POLICIES.md](https://github.com/mitos-robotics/MRCF/blob/main/POLICIES.md) covers adding a policy, planned or learned, step by\nstep. [DEPLOYMENT_SPEC.md](https://github.com/mitos-robotics/MRCF/blob/main/DEPLOYMENT_SPEC.md) covers adding a task or an arm,\nwith checklists. [CONTRIBUTING.md](https://github.com/mitos-robotics/MRCF/blob/main/CONTRIBUTING.md#the-rules-that-keep-the-structure)\nlists the rules that keep the structure, each with the test that checks it.\nThe main points:\n\n- \n**A capability.** Write a policy in`mrcf/policies/` (geometry in,`Outcome` out), and give it to the planner with`manipulation.object_action` or your\nown`@register_action` . For a new way to pick, add an`Approach` and maybe\nan`Aligner` . A learned capability is trained elsewhere and runs on the\narm's stream.\n- \n**A deployment.** One arm, one layout, one task, in`deployments/<name>/` .\nIt is a package (`__init__.py` ) whose modules import each other relatively\n(`from . import config as cfg` ), with:\n  - `config.py` : names its arm (`ARM_NAME` ) and serves the arm's`robot_config` live instead of restating it\n  - `skills.py` : calls`manipulation.install()` with the arm's policies\n  - `llm_controller.py` : short; its`main()` runs`controller.run()` with the\ndeployment's hooks\n  - `profile.py` (optional): its rules for its arm\n `run.py` offers the deployment when its arm is chosen. The same task on\nanother arm or layout is another deployment. A task two deployments share\nbelongs to the framework (`mrcf/tabletop/` ), so a table deployment is only a\nconfig, an optional profile and a few lines. To start one from the nearest, run`python tools/new_deployment.py NAME --from SOURCE [--arm ARM]` . It copies\nthe code and offers the source's rules as candidates.\n- \n**An arm.** Copy`mrcf/backends/_template` to`mrcf/backends/<arm>/` . It\nexports`NAME` ,`config` ,`make_env()` and`make_policies()` , and has`env.py` ,`robot_config.py` (the rig settings every arm has, plus its own)\nand, for what only it needs,`tools/` . Run the tools with`MRCF_ARM=<arm>` ,\nand give the arm its own deployment. Build the env on`backends.rig.RigEnv` :\nyou give it the gripper's pose and drive the motors, and the cameras'\ngeometry, the wrist servo and the sentry come with it. Add`RealRobotEnv` if\nthe framework should own the cameras.`check_backend()` (`mrcf/backends/contract.py` ) checks the arm offline before it moves.`mrcf/capabilities.py` lists the optional features the\npolicies use when an arm has them.\n- \n**A model server.** For an API that is neither Ollama's nor\nOpenAI-compatible, write a`model_server.ModelServer` whose`send(request)` returns the answer's text, in a package of your own.`post()` sends HTTP and\nraises an error for what the status means:`Unreachable` ,`TimedOut` ,`Busy` (retried),`Refused` , or`FormatRefused` (retried without the schema). The\nkey goes as`self.headers()` 's bearer token unless you send it your own way.\nName the server in the package's`pyproject.toml` , then run with`MRCF_MODEL_SERVER=my_api` :\n\n```\n[project.entry-points.\"mrcf.model_servers\"]\nmy_api = \"my_package.server:MyAPI\"\npython\nfrom mrcf.model_server import ModelServer, Request\n\nclass MyAPI(ModelServer):\n    name = \"My API\"\n    default_url = \"https://api.example.com/v1/answer\"\n\n    def send(self, request: Request) -> str:\n        # request.model, .system, .turns (the last is the question), .images (base64,\n        # shown with the last turn), .json_mode, .schema, .max_tokens, .temperature\n        body = {\"model\": request.model, \"instructions\": request.system, \"input\": request.turns[-1][\"content\"],\n                \"pictures\": request.images, \"schema\": request.schema}\n        return self.post(self.url, body, request).json()[\"text\"]\n```\n\n[SKILL_LIBRARY.md](https://github.com/mitos-robotics/MRCF/blob/main/SKILL_LIBRARY.md) explains how to debug the pipeline one\nstage at a time.\n\n| [COMMANDS.md](https://github.com/mitos-robotics/MRCF/blob/main/COMMANDS.md) | Every command, the first-time setup in order (for the SO-101 and for another arm), and what to re-run after a change | \n| [HARDWARE.md](https://github.com/mitos-robotics/MRCF/blob/main/HARDWARE.md) | The rig: the cameras, board and tags, where they go, and the SO-101 rig as built | \n| [POLICIES.md](https://github.com/mitos-robotics/MRCF/blob/main/POLICIES.md) | Adding a policy, planned or learned, step by step | \n| [DEPLOYMENT_SPEC.md](https://github.com/mitos-robotics/MRCF/blob/main/DEPLOYMENT_SPEC.md) | Adding a skill, a task or an arm, and where to record what you learn about each | \n| `mrcf/NOTES.md` ,`mrcf/backends/<backend>/NOTES.md` ,`deployments/<task>/NOTES.md` | What the framework, each robot and each task cannot do yet, and what each has shown that its code cannot say: quirks, failures and workarounds | \n| `HISTORY.md` beside the code (`mrcf/` ,`mrcf/policies/` , each backend, each task) | Why the code is the way it is: the dated runs behind its values and fixes | \n| [SKILL_LIBRARY.md](https://github.com/mitos-robotics/MRCF/blob/main/SKILL_LIBRARY.md) | The action registry, and debugging one stage at a time | \n| [CONTRIBUTING.md](https://github.com/mitos-robotics/MRCF/blob/main/CONTRIBUTING.md) | The rules that keep the structure, step-by-step guides for a new arm or deployment, and what to do when something goes wrong | \n| [CHANGELOG.md](https://github.com/mitos-robotics/MRCF/blob/main/CHANGELOG.md) | What changed in each release | \n| [SECURITY.md](https://github.com/mitos-robotics/MRCF/blob/main/SECURITY.md) | Reporting a security hole, or the robot moving when it should not. Both are reported privately | \n\nApache-2.0. See [LICENSE](https://github.com/mitos-robotics/MRCF/blob/main/LICENSE) and [NOTICE](https://github.com/mitos-robotics/MRCF/blob/main/NOTICE). Contributions are\naccepted under the same license.", "url": "https://wpnews.pro/news/mrcf-an-open-source-robot-control-framework-that-runs-on-a-laptop", "canonical_source": "https://github.com/mitos-robotics/MRCF", "published_at": "2026-11-24 12:26:39+00:00", "updated_at": "2026-11-24 12:42:16.166588+00:00", "lang": "en", "topics": ["robotics", "ai-agents", "artificial-intelligence", "ai-tools", "developer-tools"], "entities": ["MRCF", "Mitos Robotics", "Ollama", "SO-101", "LeRobot", "UR5", "SAM2", "ACT"], "also_reported_by": [], "takeaway": "MRCF keeps the LLM out of motor control: it picks from a fixed action list (`pick`, `place`, `observe`) that deterministic planned or learned policies execute, and a safety validator blocks any plan that violates workspace bounds, object existence or sequence rules before it runs.", "recommendation": null, "alternates": {"html": "https://wpnews.pro/news/mrcf-an-open-source-robot-control-framework-that-runs-on-a-laptop", "markdown": "https://wpnews.pro/news/mrcf-an-open-source-robot-control-framework-that-runs-on-a-laptop.md", "text": "https://wpnews.pro/news/mrcf-an-open-source-robot-control-framework-that-runs-on-a-laptop.txt", "jsonld": "https://wpnews.pro/news/mrcf-an-open-source-robot-control-framework-that-runs-on-a-laptop.jsonld"}}