Contact-driven surgical robotics for simulation, clinician demonstration, robot learning, and patient-effect evaluation.
Real seed-17 RTX render: tissue puncture, opposite-arm handover, and receiver-only pullout.
Needle pickup, lift, presentation, receiver acquisition, giver release, and retained handover.
Important
Running the complete local simulator requires Linux x86-64 and at least an NVIDIA RTX 4090 with 24 GB of VRAM. Install a compatible NVIDIA driver, Isaac Sim, and Isaac Lab before continuing. macOS and Windows can inspect the source and browser UI, but they do not run the supported simulator backend.
Clone Dr.Anmar with its pinned asset catalog:
git clone --recurse-submodules https://github.com/Numi2/drAnmar.git
cd drAnmar
cp .env.example .envEdit .env and set ISAAC_PYTHON to the Python executable from your
Isaac Sim / Isaac Lab environment. Then install the Dr.Anmar extensions once:
export IsaacLab_PATH=/absolute/path/to/IsaacLab
./orbitsurgical.shStart Doctor Studio and open it in the local browser:
./dr_anmar_suite.sh start
xdg-open http://localhost:2360If xdg-open is unavailable, visit
http://localhost:2360 manually. The suite binds to
loopback by default. Useful lifecycle commands are:
./dr_anmar_suite.sh status
./dr_anmar_suite.sh logs
./dr_anmar_suite.sh restart
./dr_anmar_suite.sh stopRecorded native-simulator lanes include Isaac Sim 5.1 / Isaac Lab 2.3.2 and
Isaac Sim 6.0.1.0. To reproduce a particular result, use the exact runtime,
driver, and package versions named by its evidence artifact or by
config/physics-next-lock.json. See
SECURITY.md before exposing Doctor Studio beyond the local
machine.
A robot may command motion and intervention intent. It may not write the patient outcome.
Dr.Anmar owns the clinician-facing workflow, procedure rooms, robot-control contracts, patient-effect architecture, demonstration pipeline, evaluation surface, and evidence lifecycle. NVIDIA Isaac Sim, Isaac Lab, PhysX, ORBIT-Surgical-derived foundations, and optional providers perform bounded technical roles.
The result is a research platform in which robot behavior stays inspectable: articulations and contacts advance in the simulator, post-physics evidence drives patient effects, and learning algorithms receive reward only after the environment computes the resulting benefit or harm.
Caution
Dr.Anmar is research software for simulation, synthetic data, and evaluation. It is not clinically validated, is not a medical device, and must not control physical surgical hardware or be used for patient care.
| Robot layer | Dr.Anmar responsibility |
|---|---|
| Control | Bounded Cartesian or joint commands, instrument selection, gripper state, immediate stop, operator takeover, and command provenance |
| Simulation | Articulations, rigid and deformable contact, attachments, particles, sensors, tool state, and procedure geometry |
| Patient effects | Bleeding, perfusion, repair integrity, fluid balance, ventilation, oxygenation, tissue damage, and physiological response |
| Learning | Causally aligned observations and actions, complete-episode datasets, policy loading, seeded rollout evaluation, and failure analysis |
The browser never declares contact, repair, division, perfusion, or success. Those remain environment-owned outputs.
Dr.Anmar currently integrates seven procedure-focused robot systems plus the multi-arm OncoSurgery training cell. Each system ships with a standalone mechanism, a composable robot payload, OpenUSD assets, interaction frames, controller/task contracts, and a named evidence boundary.
| System | Robotic capability | Research surface |
|---|---|---|
| Wound preparation | Contact-guarded debridement, irrigation, aspiration, interchangeable cartridges | Contact work, debris release, fluid accounting |
| Atraumatic exposure | Bilateral distributed soft-tissue capture, lift, pitch, hold, and release | Force symmetry, visibility, capture retention |
| Adaptive hemostasis | Compression, irrigation, suction, clip delivery, patching, pressure verification | Flow reduction, retained repair, overload damage |
| Adaptive anastomosis | Alignment, approximation, eversion, stapling, reinforcement, leak and patency assessment | Closure geometry, retention, pressure decay |
| Adaptive seal and divide | Centering, compression, sealing, guarded division, irrigation and suction | Seal state, energy observables, blade interlock |
| SafePlane dissection | Distributed traction, blunt spreading, hydrodissection, guarded scissors and spatula | Protected-structure clearance and continuity |
| Perfusion viability | Registered RGB, NIR/ICG, speckle, thermal, oxygenation, Doppler and ultrasound sensing | Multimodal fusion, fault diagnosis, abstention |
| OncoSurgery cell | Three-station resection, margin sensing, specimen handling and cavity verification | Resection topology, protected structures, margin state |
| Adaptive hemostasis | Adaptive anastomosis |
|---|---|
![]() |
![]() |
| Compression, clip, patch, suction, irrigation, and verification modes. | Alignment, approximation, staple formation, reinforcement, leak test, and patency. |
Robotic motion media belongs beside the exact replay that produced it. The front page therefore uses revision-stable system and mechanism views; procedure video should come from complete replays that visibly include approach, contact, patient effect, release, and recovery rather than phase labels alone.
The learning environment owns the transition from intervention to outcome. Temporary effects require current evidence; retained repairs require persistent attachment and integrity.
flowchart LR
A["Clinician or policy<br/>motion + intervention intent"] --> B["Robot controller<br/>bounded commands"]
B --> C["Isaac Sim + PhysX<br/>articulation + contact"]
C --> D["Post-physics evidence<br/>force, geometry, flow,<br/>pressure, attachment, dwell"]
D --> E["Dr.Anmar patient effects<br/>conservation + damage + repair"]
E --> F["Patient state<br/>bleeding, MAP, perfusion,<br/>oxygenation, integrity"]
F --> G["Transition reward<br/>improvement minus harm"]
G --> A
A -. "no outcome write path" .-> D
Examples of mutually supported evidence:
| Intervention | Environment-owned evidence | Failure remains visible |
|---|---|---|
| Compress or clip | Bilateral force, symmetry, separation, placement, speed, retained attachment | Release, migration, overload, distal perfusion loss |
| Patch or anastomose | Distributed contact, closure gap, integrity, pressure hold, leaked particles | Delamination, residual leak, stenosis, rupture |
| Infuse | Plunger travel, outlet flow, reservoir loss, access attachment, line pressure | Disconnection, occlusion, overpressure, extravasation |
| Ventilate | Airway attachment, valve travel, delivered/leaked flow, pressure, oxygen fraction, chest excursion | Leak, unsafe pressure, inadequate delivery |
The complete mechanics and learning contracts live in the canonical Dr.Anmar asset catalog.
Autonomous Rescue OR connects clinician demonstration to policy evaluation without giving the policy patient-outcome controls:
record complete expert episode
↓
pack causally aligned observations and actions
↓
train behavior cloning policy
↓
load immutable checkpoint into the live room
↓
run seeded patient-effect rollouts
↓
compare benefit, harm, release, and failure
./dr_anmar_rescue_il.sh policy-room /path/to/model_epoch_200.pth 2361
./dr_anmar_rescue_il.sh rollout 2361
./dr_anmar_rescue_il.sh evaluate-policy 2361 20 --continue-on-errorRobot, contact, vessel, vital-sign, fluid-balance, and causal camera signals are observations. Patient-effect fields are excluded from the policy action space, and train/validation masks are assigned at complete-episode boundaries.
The reinforcement-learning path starts with measurable PSM pose control and
promotes policies through dual-tool coordination, contact-qualified lift, and
physical handover. The current handover incumbent is a frozen 98-observation,
14-action actor composed with a fixed pickup correction and a learned receiver
candidate-value head. It uses stable DrAnmar-* task IDs, GPU-native scene
cloning, seeded evaluation, live RAM/VRAM fitting, and typed benchmark evidence.
./dr_anmar_learning.sh validate
./dr_anmar_learning.sh smoke
./dr_anmar_learning.sh sweep
./dr_anmar_learning.sh tqta-start
./dr_anmar_learning.sh train
./dr_anmar_learning.sh tqta-report
./dr_anmar_learning.sh promoted-handover 1200 2000See the complete DrAnmar Learning Path for task stages, efficiency controls, promotion gates, and evidence boundaries. The adopted robotic-surgery RL technical direction minimizes time to qualified task achievement: wall-clock time from a frozen task contract to the first checkpoint that passes held-out competence, safety, and recovery gates.
The simulation champion now completes the full entry-and-pullout sequence with both PSMs in opposing, above-tissue operative geometry. The giver enters the top of the left collision-enabled span, follows the 21 mm curved needle below the surface, punctures the underside of the separate right span, re-emerges through its top, presents more than one fifth of the arc, and stops. The opposite PSM then acquires the exposed arc, the giver releases, and the receiver continues rotating the needle about its curvature centre until the trailing tip is completely clear on the right. There is no surface-normal lift in either stage.
The native backend owns explicit slab identities and requires three ordered, one-time events: left-top entry, right-underside puncture, then right-top exit. The top exit cannot occur unless the underside puncture has already occurred; same-slab, wound-gap, outside-span, and skipped-surface routes fail closed. PhysX remains authoritative for both complete PSM chains. Any jaw, distal-link, shaft, or wrist tissue contact is a hard failure; puncture permission applies only to the needle.
The rendered seed-17 receipt records one left entry, one right-underside
puncture, and one right-top exit; 0.884 mm entry error; 0.053 mm immutable
exit-event error; 7.11 degree tangent error; 7.59 degree plane error; zero hard
failures; zero embedded arc after pullout; and 100% final exposure. The
analytical policy runs at 50 Hz with 0.25 mm and 0.5 degree command bounds,
four tissue-supported giver regrips, a fixed giver hold during receiver
approach, sustained receiver custody, a 203 degree unwrapped giver drive, and
855 receiver-owned curvature steps before success is declared. The receiver
rotated 149.49 degrees after handover while its measured curvature-centre drift
remained below 0.77 mm; drift above 1.5 mm is a hard failure. The
machine-readable rendered evidence is in
docs/tissue_puncture_pullout/seed17_fem_rendered_success.json.
The receiver applies matched circular translation and rotation about the
needle's curvature centre, avoiding the previous late upward cross-surface
motion. The GIF uses only frames from this successful RTX rollout, keeps the
first-entry and final curved-clearance intervals near real-time, compresses the
long middle handover, and omits the post-success reset frame.
The same seed-17 sequence now succeeds with DrAnmar Mimithread, the refined white 4-0 strand paired with the validated needle. Mimithread retains the pinned source strand's volume topology but replaces its legacy body setup, material, rendering, reset, swage, and tissue interaction. It is a 549-node PhysX FEM body with four kinematic swage nodes; the other 545 nodes remain deformable. Dynamic friction is 0.01.
At reset the neutral strand is aimed diagonally across the entry flap and all nodes are verified outside the closed tissue volume. Exposed nodes use one-sided swept contact against the live FEM top surface, so a thin strand cannot cross the entire surface between 50 Hz control samples. After the force-gated puncture event, embedded nodes instead receive low-drag radial confinement to the recorded needle-tip tract. This preserves surface rest and glide without letting the closed deformable tissue volume eject a legitimately threaded strand.
Real seed-17 RTX render using DrAnmar Mimithread: supported surface rest, curved two-span puncture, opposite-arm acquisition, and receiver-owned clearance with the trailing strand retained through the stitch path.
The unchanged controller completed the sequence in 4,173 control steps with
exactly one left entry, one right-underside puncture, one right-top exit, full
receiver-owned clearance, and zero hard failures. Final evidence records four
active swage nodes, 549 finite deformable nodes, 0.877 mm entry error, 0.067 mm
exit error, 4.6% peak-force overshoot, 145.30 degrees of receiver curvature
rotation, and 0.69 mm maximum curvature-centre drift. During the rollout the
contact layer supported up to 168 exposed nodes and guided up to 49 embedded
nodes; the post-reset state remained finite with zero nodes inside either
tissue volume. The exact rendered receipt is
seed17_mimithread_rendered_success.json.
The rejected ribbon-like surface-FEM and violet v0.3 adapter experiments are
retained outside the selectable catalog under
Props/SurgicalClosure/Needle/ExperimentalSurfaceFEM/ for reproducibility.
These are simulator-engineering results only; they are not biomechanical, clinical, or autonomous-surgery validation.
The in-house DrAnmar FEM tissue supports an energy-gated moving scalpel front, persistent two-sided wound geometry, retained anchors, and post-cut bilateral gripper contact. These are real solver trajectories with no generated imagery or displacement exaggeration.
Moving scalpel: fracture occurs only behind the blade; the incision reaches and mechanically opens at both physical tissue boundaries.
Post-cut separation: bilateral jaw custody pulls one flap 3.88 mm while the opposite flap moves 0.17 mm, then releases for elastic recovery.
The cutter and separator evidence, qualification limits, CPU/CUDA receipts, and blocked claims are documented in the cuttable-tissue development lane.
This is the real promoted composite running the
DrAnmar-Handover-Needle-Dual-PSM-IK-Rel-v0 task, not an authored animation.
The showcase was recorded on an NVIDIA RTX 4090 with seed 104729; the episode
terminated in success after 746 control frames with no drop, premature release,
retention-loss, excessive-force, or protected-surface termination. The
showcase evidence
records the source revision, runtime, checkpoint hashes, controller settings,
episode trace, and terminal counts.
The champion is deliberately a provenance-locked hybrid policy, not a claim that one end-to-end neural network learned the full handover:
| Component | Role in the rollout |
|---|---|
| Frozen base actor | An analytic phase controller produces the physical sequence, while a residual MLP consumes the 98-value handover observation and adds bounded corrections to the resulting 14-D dual-PSM action. The immutable checkpoint is identified by SHA-256 in the promotion lock. |
| Pickup correction | A fixed post-reset pose correction, capped at 1.875 mm translation and 1.5 deg orientation, preserves the strongest verified needle-pickup behavior. |
| Receiver value head | A learned candidate-value model ranks the receiver's first acquisition correction. The selected correction is locally refined within 1.0 mm and 1.0 deg, with final caps of 2.5 mm and 2.0 deg. |
| Runtime bounds | Receiver retries, retention servo, and giver stabilization are disabled in the promoted configuration, so the displayed success is one bounded pickup-and-transfer attempt. |
| Physics authority | Isaac Sim and PhysX contacts own custody, drops, force failures, release validity, retention, and the final success terminal; the policy cannot write its own outcome. |
Across the locked development cohort, the composite succeeded in 1,292 of 1,800 episodes (71.78%). Needle lift reached 98.94%; receiver acquisition given lift reached 80.40%; retention after acquisition reached 90.22%. The owner accepted it as the current simulation champion while explicitly overriding the original 80% target. It remains a research baseline, not a qualification claim.
The promoted handover actor and the new custody-risk model solve different problems and are meant to compose, not replace one another:
| Artifact | Output | Current evidence-backed status |
|---|---|---|
| Promoted handover actor | Robot motion | 1,292 / 1,800 development successes (71.78%). This is the owner-promoted simulation incumbent; the original 80% development goal was explicitly overridden and no qualification claim is made. |
| One-decision receiver residual | Bounded motion correction | Not promoted. Its best held-out result was +3 / 3,600 in aggregate while one seed regressed by 12; a fresh-stream update also lost to the incumbent on development seeds. |
| Calibrated active-custody risk model | Failure probability | Preserved as the leading risk model. Across three left-out physics seeds, AUC was 0.704–0.776 and nested cross-fitted Brier score improved to 0.07455 from a 0.08063 base-rate reference. |
| Counterfactual receiver trajectory | Bounded receiver XYZ scaling | Not promoted. Exact no-op replay passed, but uniform scale 0.6 reduced the activated cohort from 93 to 87 successes and added 4 receiver safety failures on the first prespecified seed. |
| Recurrent hybrid full-action successor | Complete 14-D dual-arm action | Candidate only; not promoted. The final source-locked checkpoint learned from 8 exact incumbent episodes plus 8 exact safe DAgger episodes across two rounds. It combines GRU episode memory, binary gripper decisions, and learned negative-limit / precision / positive-limit motion modes, but its first network-only replay still ended in phase 0 with protected_surface_force. The 71.78% incumbent therefore remains unchanged. |
The actor still moves the robot. The risk model observes the one-frame active-custody transition and estimates whether retention is likely to fail; it does not emit actions and has no release or motion authority.
The causal trajectory screen is complete. Separate same-index Isaac processes reproduced prebranch tensors and no-op terminal outcomes exactly, while neighboring vectorized PhysX clones did not remain isolated after an intervention. The only surviving speed candidate was negative, so no behavior-cloning or PPO update was started from it and the promoted actor remains unchanged.
The next learning stage is executable through
dr_anmar_handover_successor.py.
Bit-identical safe successes from the frozen incumbent can be admitted as
distillation demonstrations, which is how the hand-authored runtime is replaced
by one network without treating failed incumbent actions as expertise. Offline
action error is not a promotion metric: the first eight-episode clone failed
closed loop despite low held-out error. Two prespecified DAgger rounds then used
an oracle fraction of 0.9. In each round, exactly four of eight screened seeds
produced safe terminal successes and were admitted; all retention, drop, or
force failures were quarantined. The candidate visits states under the
oracle/student mixture, while the frozen promoted composite supplies labels for
every visited state. A trajectory enters training only when two
single-environment replays are bit-identical, end in success, contain no safety
event, preserve source and checkpoint hashes, and cover all four
action-bearing phases.
The custody-risk model only allocates independent collection for failure states. Better-than-incumbent actions there must still come from constrained trajectory optimization or clinician teleoperation, then beat two bit-identical no-op controls without any safety event. Accepted offline successes, accepted DAgger episodes, and independently verified rescues train one compact phase-conditioned recurrent network that emits the full 14-D action. Episode order is preserved during training because grasp and release boundaries depend on history that is not fully represented by one observation. Grippers are binary decisions; each motion channel separately classifies negative saturation, precision control, or positive saturation before emitting its continuous precision value. This prevents regression from averaging a safety-critical limit command with the following fine-control command. Episode-level splitting prevents frame leakage, qualification seeds are forbidden from training, and every checkpoint is candidate-only until live seeded evaluation promotes it.
Incumbent-only DAgger is now stopped. It reduced held-out action MAE but did not produce a safe autonomous phase-0 policy. The next useful information must be independent safe expert action in student-visited phase-0 states and in the quarantined retention failures, sourced from constrained trajectory optimization or clinician teleoperation with immutable receipts. More cloning of the incumbent would repeat its capability ceiling without resolving the closed-loop error.
record exact incumbent success twice → admit offline distillation demonstration
→ train candidate → record exact safe oracle-mixture replay twice
→ admit on-policy DAgger labels → retrain
or lock teacher proposal → record control/control/teacher → accept rescue
→ train full-action successor → compare against the frozen incumbent
The hand-authored recovery composition remains sealed as the 71.78% regression baseline until a successor passes the live gate. It is the DAgger oracle during training only; none of its recovery wrappers are present in the successor runtime. It should be archived, not deleted, only after a learned checkpoint demonstrably replaces it.
The new source-bound successor record, including every screened seed, admitted dataset hash, candidate hash, and final failed gate, is the recurrent successor learning report. The earlier receiver-policy calibration record remains in the receiver policy learning report on the experiment branch.
Doctor Studio is the clinician-facing workspace for live simulation, teleoperation, demonstration recording, guidance, policy comparison, and failure analysis.
| Live operating room | Skills Twin |
|---|---|
![]() |
![]() |
| Robot control, cameras, guidance, immediate stop, recording, and room state. | Phase timing, trajectory inspection, replay comparison, and clinician-selected references. |
Control and data contracts:
- Keyboard and controller interaction
- Camera-native hand teleoperation
- Multimodal studies
- Executable expert guidance
flowchart TD
A["Clinician / researcher"] --> B["Doctor Studio<br/>control, guidance, studies, review"]
B --> C["Dr.Anmar hub<br/>identity, operator lease, lifecycle, provenance"]
C --> D["Isaac worker<br/>task, robot, sensor, controller, recorder"]
D --> E["Isaac Lab<br/>articulation + learning"]
D --> F["PhysX<br/>rigid + deformable + particles"]
D --> G["OpenUSD<br/>scenes + assets + variants"]
D --> H["Evidence<br/>trajectories + metrics + dataset cards"]
Downloaded assets, checkpoints, demonstrations, logs, and runtime state remain outside Git. The repository contains the code, contracts, authored assets, documentation, and revision-bound evidence references needed to reproduce a study.
Dr.Anmar keeps five claims separate:
| Level | Establishes | Does not establish |
|---|---|---|
| Product capability | A workflow is integrated and available | Numerical fidelity |
| Repository verification | Source, schemas, manifests, paths, and contracts are internally consistent | Native engine behavior |
| Native-simulator evidence | A named revision ran on a recorded simulator, stack, and GPU | Real-world transfer |
| Real-world evidence | Instrumented hardware or bench data support a specific correlation | Clinical effectiveness |
| Clinical evidence | A defined clinical study supports a specific claim | Claims outside that study |
Current parameters are engineering parameters unless a robot-specific artifact records instrumented calibration. Evidence does not transfer automatically between workcells, revisions, representations, simulator versions, GPUs, or physics configurations.
Start with:
web/ Doctor Studio browser application
scripts/ Hub, workers, control adapters, generators
examples/ Native CUDA evidence programs
source/extensions/ Simulator tasks and robot integrations
source/standalone/ Teleoperation, data, training, policy workflows
source/extensions/orbit.surgical.assets/
Pinned canonical dr-assets repository
physics_next/ Next-generation mechanics and evidence contracts
docs/ Architecture, mechanisms, operation, evidence
dr_anmar_*.sh Service, runtime, asset, and training launchers
- Ownership and provenance
- Architecture
- Asset catalog
- Native suture mechanics
- Warp suture research backend
- Dynamic-patient boundary
- Multimodal study contract
- Contributing
Dr.Anmar owns the product workflow, procedure rooms, robot integrations, patient-effect architecture, learning interface, and evidence lifecycle in this repository. The compatibility namespace and identified task/robot foundations retain their ORBIT-Surgical-derived BSD-3-Clause attribution. NVIDIA Isaac Sim, Isaac Lab, PhysX, Isaac for Healthcare, and optional providers retain their own licenses and are not bundled unless explicitly documented.
Dr.Anmar is distributed under the BSD 3-Clause License. Publications
should report the Dr.Anmar revision, pinned dr-assets revision, simulator and
Isaac Lab versions, GPU/driver, scenario and seed, control policy, sensor
profile, and applicable evidence artifact.

















