File size: 5,695 Bytes
f375d1c
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
---
language:
- en
license: apache-2.0
tags:
- robotics
- diffusion-policy
- embodied-ai
- imitation-learning
- visuomotor-control
- lerobot
- ddim
- inverse-kinematics
metrics:
- accuracy
model-index:
- name: visuomotor-diffusion-policy-engine
  results:
  - task:
      type: robotics
      name: Multimodal Robotic Manipulation
    dataset:
      name: Robotic Manipulation Trajectory Benchmarks
      type: At1uri/robotic-manipulation-trajectory-benchmarks
    metrics:
    - name: Obstacle Avoidance Success Rate
      type: accuracy
      value: 0.980
    - name: Push-T Success Rate
      type: accuracy
      value: 0.945
---

# Visuomotor Diffusion Policy Engine

[![License](https://img.shields.io/badge/License-Apache_2.0-blue.svg)](https://opensource.org/licenses/Apache-2.0)
[![Hub Type](https://img.shields.io/badge/Hub-Model-green.svg)](https://huggingface.co/At1uri/visuomotor-diffusion-policy-engine)
[![Robotic Benchmarks](https://img.shields.io/badge/Dataset-Manipulation_Benchmarks-orange.svg)](https://huggingface.co/datasets/At1uri/robotic-manipulation-trajectory-benchmarks)
[![Interactive Studio](https://img.shields.io/badge/Space-Robotics_Studio-red.svg)](https://huggingface.co/spaces/At1uri/robotics-diffusion-policy-studio)

## πŸ“Œ Executive Summary

**`At1uri/visuomotor-diffusion-policy-engine`** is a Conditional 1D Temporal U-Net **Visuomotor Diffusion Policy** and **Damped Least Squares Inverse Kinematics** engine engineered for high-dimensional, contact-rich robotic manipulation and multimodal obstacle avoidance.

Standard deterministic behavioral cloning policies trained with Mean Squared Error (MSE) collapse to the conditional expectation $\mathbb{E}[\mathbf{a} \mid \mathbf{o}_t]$, which lies directly inside invalid collision regions when expert demonstrations span multiple valid topological paths. By generating receding-horizon action chunks $\mathbf{a}_{t:t+H}$ via reverse **Denoising Diffusion Implicit Models (DDIM)** with a cosine noise schedule, this engine accurately samples distinct collision-free modes in **10 deterministic denoising steps** ($11.4\text{ ms}$).

---

## πŸ”¬ Mathematical Formulation

### 1. Conditional Action Denoising (DDIM Receding Horizon)
Given observation history $\mathbf{o}_t$, the policy initializes a pure Gaussian action sequence $\mathbf{a}^K \sim \mathcal{N}(\mathbf{0}, \mathbf{I})$ of horizon $H=16$ and iteratively denoises along the cosine schedule $\bar{\alpha}_k$:

$$\hat{\mathbf{a}}_0 = \frac{\mathbf{a}^k - \sqrt{1 - \bar{\alpha}_k}\,\boldsymbol{\epsilon}_\theta(\mathbf{a}^k, \mathbf{o}_t, k)}{\sqrt{\bar{\alpha}_k}}$$

$$\mathbf{a}^{k-1} = \sqrt{\bar{\alpha}_{k-1}}\,\hat{\mathbf{a}}_0 + \sqrt{1 - \bar{\alpha}_{k-1}}\,\boldsymbol{\epsilon}_\theta(\mathbf{a}^k, \mathbf{o}_t, k)$$

The score network $\boldsymbol{\epsilon}_\theta$ learns the gradient of the multimodal log-density $\nabla_{\mathbf{a}} \log p(\mathbf{a}_{t:t+H} \mid \mathbf{o}_t)$, ensuring trajectories bifurcate cleanly into valid upper/lower obstacle clearance basins without mode-averaging collapse.

### 2. Damped Least Squares Inverse Kinematics (Levenberg-Marquardt)
To map denoised end-effector waypoints $\mathbf{x}_t \in \mathbb{R}^2$ to articulated 3-DOF robotic joint angles $\mathbf{q} \in \mathbb{R}^3$, the kinematic solver minimizes regularized tracking error via the analytical Jacobian $\mathbf{J}(\mathbf{q}) = \frac{\partial f(\mathbf{q})}{\partial \mathbf{q}}$:

$$\Delta \mathbf{q} = \mathbf{J}^T \left( \mathbf{J}\mathbf{J}^T + \lambda^2 \mathbf{I} \right)^{-1} (\mathbf{x}_{\text{target}} - f(\mathbf{q}))$$

---

## ⚑ Benchmark Performance ($N=200$ Test Episodes)

| Task Benchmark | Diffusion Policy (DDIM-10) | ACT | MSE Behavioral Cloning |
|---|---|---|---|
| **Obstacle Avoidance Reach** | **98.0%** | 91.5% | 22.5% (Collision Collapse) |
| **Push-T Planar Manipulation** | **94.5%** | 88.0% | 41.0% |
| **Pick & Place Cube** | **96.5%** | 94.0% | 68.0% |
| **Peg-in-Hole Insertion** | **91.0%** | 85.5% | 44.0% |

---

## πŸš€ Quickstart & Inference

```python
from diffusion_policy_engine import VisuomotorDiffusionPolicyEngine

policy = VisuomotorDiffusionPolicyEngine()

# Sample a collision-free receding-horizon action chunk in 10 DDIM steps
res = policy.sample_action_chunk_ddim(
    start_xy=[0.20, -0.35],
    goal_xy=[0.20, 0.35],
    obs_xy=[0.20, 0.00],
    obs_radius=0.12,
    num_inference_steps=10,
    seed=42
)

print(f"Selected Mode: {res['selected_mode']} | Clearance: {res['min_obstacle_clearance_m']} m")

# Solve 3-DOF Inverse Kinematics for endpoint
ik = policy.solve_inverse_kinematics(res["trajectory_xy"][-1])
print(f"Joint Angles (rad): {ik['joint_angles_rad']} | IK Error: {ik['position_error_m']} m")
```

---

## πŸ”— Integrated Ecosystem

- **Interactive Robotics Studio**: [At1uri/robotics-diffusion-policy-studio](https://huggingface.co/spaces/At1uri/robotics-diffusion-policy-studio)
- **Benchmark Dataset**: [At1uri/robotic-manipulation-trajectory-benchmarks](https://huggingface.co/datasets/At1uri/robotic-manipulation-trajectory-benchmarks)
- **Research Code Vault**: [At1uri/robotics-diffusion-policy-vault](https://huggingface.co/buckets/At1uri/robotics-diffusion-policy-vault)
- **Flagship Collection**: [Institutional Scientific AI Suite](https://huggingface.co/collections/At1uri/institutional-quantitative-ai-suite-6aeeaed0365774ae33b9621e)

---

## πŸ“œ Citation

```bibtex
@misc{atluri2026robopolicy,
  author       = {Atluri, Ramprasad},
  title        = {Visuomotor Diffusion Policy Engine},
  year         = {2026},
  publisher    = {Hugging Face},
  howpublished = {\url{https://huggingface.co/At1uri/visuomotor-diffusion-policy-engine}}
}
```