Robotics
LeRobot
Safetensors
English
temporal_unet_diffusion_policy
diffusion-policy
embodied-ai
imitation-learning
visuomotor-control
ddim
inverse-kinematics
Eval Results (legacy)
Instructions to use At1uri/visuomotor-diffusion-policy-engine with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- LeRobot
How to use At1uri/visuomotor-diffusion-policy-engine with LeRobot:
# No code snippets available yet for this library. # To use this model, check the repository files and the library's documentation. # Want to help? PRs adding snippets are welcome at: # https://github.com/huggingface/huggingface.js
- Notebooks
- Google Colab
- Kaggle
Download inference.py from At1uri/visuomotor-diffusion-policy-engine: direct link, hf CLI and curl.
- Browser
- Download file 1.43 kB
-
https://huggingface.co/At1uri/visuomotor-diffusion-policy-engine/resolve/main/inference.py
- Command line
-
hf download hf://At1uri/visuomotor-diffusion-policy-engine/inference.py
-
curl -L -o inference.py https://huggingface.co/At1uri/visuomotor-diffusion-policy-engine/resolve/main/inference.py
1.43 kB
| """ | |
| Inference Script for Visuomotor Diffusion Policy Engine | |
| ======================================================= | |
| Author: Ramprasad Atluri (At1uri) | |
| Repository: At1uri/visuomotor-diffusion-policy-engine | |
| """ | |
| from diffusion_policy_engine import VisuomotorDiffusionPolicyEngine | |
| def run_robotics_demo(): | |
| policy = VisuomotorDiffusionPolicyEngine() | |
| print("=" * 70) | |
| print("VISUOMOTOR DIFFUSION POLICY: MULTIMODAL OBSTACLE AVOIDANCE (DDIM-10)") | |
| print("=" * 70) | |
| for seed in [42, 7, 101]: | |
| 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=seed | |
| ) | |
| print(f"\n[Rollout Seed = {seed}]") | |
| print(f" Selected Multimodal Branch: {res['selected_mode']}") | |
| print(f" DDIM Denoising Steps: {res['ddim_steps']}") | |
| print(f" Min Obstacle Clearance: {res['min_obstacle_clearance_m']} m (Collision-Free: {res['collision_free']})") | |
| print(f" Terminal Goal Error: {res['terminal_error_m']} m") | |
| # Solve 3-DOF Inverse Kinematics for target endpoint | |
| ik = policy.solve_inverse_kinematics(res["trajectory_xy"][-1]) | |
| print(f" 3-DOF IK Joint Angles (rad): {ik['joint_angles_rad']} | IK Error: {ik['position_error_m']} m") | |
| if __name__ == "__main__": | |
| run_robotics_demo() | |