Upload MicroDuck RL policies and MuJoCo simulation assets
Browse filesThis view is limited to 50 files because it contains too many changes. See raw diff
- .gitattributes +42 -0
- README.md +53 -0
- app.py +203 -0
- infer_engine.py +206 -0
- packages.txt +4 -0
- policies/alpha_ground_pick.onnx +3 -0
- policies/alpha_sitstand.onnx +3 -0
- policies/alpha_stand.onnx +3 -0
- policies/alpha_walking.onnx +3 -0
- policies/ball_kick_left.onnx +3 -0
- policies/ball_kick_right.onnx +3 -0
- policies/roller.onnx +3 -0
- policies/roller_crouch.onnx +3 -0
- policies/roulade.onnx +3 -0
- requirements.txt +6 -0
- robot/add_backlash.py +139 -0
- robot/additional.xml +13 -0
- robot/assets/ankle_l_v1.part +13 -0
- robot/assets/ankle_l_v1.stl +3 -0
- robot/assets/ankle_left.part +13 -0
- robot/assets/ankle_left.stl +3 -0
- robot/assets/ankle_r_v1.part +13 -0
- robot/assets/ankle_r_v1.stl +3 -0
- robot/assets/ankle_right.part +13 -0
- robot/assets/ankle_right.stl +3 -0
- robot/assets/banana_pcb_locker.part +13 -0
- robot/assets/banana_pcb_locker.stl +0 -0
- robot/assets/bearing_roll.part +13 -0
- robot/assets/bearing_roll.stl +3 -0
- robot/assets/bottom_head_shell.part +13 -0
- robot/assets/bottom_head_shell.stl +3 -0
- robot/assets/elec_rpi_robot_hat_pcb.part +13 -0
- robot/assets/elec_rpi_robot_hat_pcb.stl +3 -0
- robot/assets/face_part.part +13 -0
- robot/assets/face_part.stl +3 -0
- robot/assets/foot_left.part +13 -0
- robot/assets/foot_left.stl +3 -0
- robot/assets/foot_right.part +13 -0
- robot/assets/foot_right.stl +3 -0
- robot/assets/hip_l.part +13 -0
- robot/assets/hip_l.stl +3 -0
- robot/assets/jaw.part +13 -0
- robot/assets/jaw.stl +3 -0
- robot/assets/jaw_soft.part +14 -0
- robot/assets/jaw_soft.stl +3 -0
- robot/assets/left_shell.part +13 -0
- robot/assets/left_shell.stl +3 -0
- robot/assets/left_upper_leg.part +13 -0
- robot/assets/left_upper_leg.stl +3 -0
- robot/assets/leg.part +13 -0
.gitattributes
CHANGED
|
@@ -33,3 +33,45 @@ saved_model/**/* filter=lfs diff=lfs merge=lfs -text
|
|
| 33 |
*.zip filter=lfs diff=lfs merge=lfs -text
|
| 34 |
*.zst filter=lfs diff=lfs merge=lfs -text
|
| 35 |
*tfevents* filter=lfs diff=lfs merge=lfs -text
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 33 |
*.zip filter=lfs diff=lfs merge=lfs -text
|
| 34 |
*.zst filter=lfs diff=lfs merge=lfs -text
|
| 35 |
*tfevents* filter=lfs diff=lfs merge=lfs -text
|
| 36 |
+
robot/assets/ankle_l_v1.stl filter=lfs diff=lfs merge=lfs -text
|
| 37 |
+
robot/assets/ankle_left.stl filter=lfs diff=lfs merge=lfs -text
|
| 38 |
+
robot/assets/ankle_r_v1.stl filter=lfs diff=lfs merge=lfs -text
|
| 39 |
+
robot/assets/ankle_right.stl filter=lfs diff=lfs merge=lfs -text
|
| 40 |
+
robot/assets/bearing_roll.stl filter=lfs diff=lfs merge=lfs -text
|
| 41 |
+
robot/assets/bottom_head_shell.stl filter=lfs diff=lfs merge=lfs -text
|
| 42 |
+
robot/assets/elec_rpi_robot_hat_pcb.stl filter=lfs diff=lfs merge=lfs -text
|
| 43 |
+
robot/assets/face_part.stl filter=lfs diff=lfs merge=lfs -text
|
| 44 |
+
robot/assets/foot_left.stl filter=lfs diff=lfs merge=lfs -text
|
| 45 |
+
robot/assets/foot_right.stl filter=lfs diff=lfs merge=lfs -text
|
| 46 |
+
robot/assets/hip_l.stl filter=lfs diff=lfs merge=lfs -text
|
| 47 |
+
robot/assets/jaw.stl filter=lfs diff=lfs merge=lfs -text
|
| 48 |
+
robot/assets/jaw_soft.stl filter=lfs diff=lfs merge=lfs -text
|
| 49 |
+
robot/assets/left_shell.stl filter=lfs diff=lfs merge=lfs -text
|
| 50 |
+
robot/assets/left_upper_leg.stl filter=lfs diff=lfs merge=lfs -text
|
| 51 |
+
robot/assets/leg.stl filter=lfs diff=lfs merge=lfs -text
|
| 52 |
+
robot/assets/m12_lens_holder.stl filter=lfs diff=lfs merge=lfs -text
|
| 53 |
+
robot/assets/motor_support.stl filter=lfs diff=lfs merge=lfs -text
|
| 54 |
+
robot/assets/neck_pitch.stl filter=lfs diff=lfs merge=lfs -text
|
| 55 |
+
robot/assets/np_f970.stl filter=lfs diff=lfs merge=lfs -text
|
| 56 |
+
robot/assets/pcb__raspberry_pi_zero_2_w.stl filter=lfs diff=lfs merge=lfs -text
|
| 57 |
+
robot/assets/power_support.stl filter=lfs diff=lfs merge=lfs -text
|
| 58 |
+
robot/assets/right_shell.stl filter=lfs diff=lfs merge=lfs -text
|
| 59 |
+
robot/assets/right_upper_leg.stl filter=lfs diff=lfs merge=lfs -text
|
| 60 |
+
robot/assets/rim.stl filter=lfs diff=lfs merge=lfs -text
|
| 61 |
+
robot/assets/roller_blade.stl filter=lfs diff=lfs merge=lfs -text
|
| 62 |
+
robot/assets/seeed_bearing__configuration__22x16x4.stl filter=lfs diff=lfs merge=lfs -text
|
| 63 |
+
robot/assets/seeed_bearing__configuration_default.stl filter=lfs diff=lfs merge=lfs -text
|
| 64 |
+
robot/assets/soft_mouth_top.stl filter=lfs diff=lfs merge=lfs -text
|
| 65 |
+
robot/assets/sole_left.stl filter=lfs diff=lfs merge=lfs -text
|
| 66 |
+
robot/assets/sole_right.stl filter=lfs diff=lfs merge=lfs -text
|
| 67 |
+
robot/assets/tire.stl filter=lfs diff=lfs merge=lfs -text
|
| 68 |
+
robot/assets/top_head_shell.stl filter=lfs diff=lfs merge=lfs -text
|
| 69 |
+
robot/assets/trunk_base.stl filter=lfs diff=lfs merge=lfs -text
|
| 70 |
+
robot/assets/trunk_shell_left.stl filter=lfs diff=lfs merge=lfs -text
|
| 71 |
+
robot/assets/trunk_shell_right.stl filter=lfs diff=lfs merge=lfs -text
|
| 72 |
+
robot/assets/upper_leg_left.stl filter=lfs diff=lfs merge=lfs -text
|
| 73 |
+
robot/assets/upper_leg_right.stl filter=lfs diff=lfs merge=lfs -text
|
| 74 |
+
robot/assets/upper_leg_rigidity_plate.stl filter=lfs diff=lfs merge=lfs -text
|
| 75 |
+
robot/assets/xl330.stl filter=lfs diff=lfs merge=lfs -text
|
| 76 |
+
robot/assets/yaw2roll.stl filter=lfs diff=lfs merge=lfs -text
|
| 77 |
+
robot/assets/yaw_roll_motion.stl filter=lfs diff=lfs merge=lfs -text
|
README.md
ADDED
|
@@ -0,0 +1,53 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
---
|
| 2 |
+
language:
|
| 3 |
+
- en
|
| 4 |
+
- ko
|
| 5 |
+
tags:
|
| 6 |
+
- robotics
|
| 7 |
+
- reinforcement-learning
|
| 8 |
+
- mujoco
|
| 9 |
+
- onnx
|
| 10 |
+
- humanoid
|
| 11 |
+
- bipedal
|
| 12 |
+
license: mit
|
| 13 |
+
pipeline_tag: robotics
|
| 14 |
+
---
|
| 15 |
+
|
| 16 |
+
# 🦆 MicroDuck: Bipedal Robot Reinforcement Learning Policies
|
| 17 |
+
|
| 18 |
+
This repository contains trained Deep Reinforcement Learning (RL) policy models and MuJoCo simulation assets for the **MicroDuck** small bipedal robot.
|
| 19 |
+
|
| 20 |
+
## 📦 Repository Contents
|
| 21 |
+
|
| 22 |
+
- `policies/`: Pre-trained ONNX policy checkpoints
|
| 23 |
+
- `alpha_walking.onnx`: Dynamic omnidirectional bipedal locomotion
|
| 24 |
+
- `alpha_stand.onnx`: Stable posture hold and disturbance rejection
|
| 25 |
+
- `alpha_sitstand.onnx`: Continuous sit and stand-up transition
|
| 26 |
+
- `alpha_ground_pick.onnx`: Ground object picking motion
|
| 27 |
+
- `ball_kick_left.onnx`: Precision left foot ball kick
|
| 28 |
+
- `roulade.onnx`: Dynamic forward roll (roulade) motion recovery
|
| 29 |
+
- `robot/`: MuJoCo MJCF XML definitions and 3D mesh assets (`scene.xml`, `robot_allcollisions.xml`, `assets/*.stl`)
|
| 30 |
+
- `infer_engine.py`: Standalone policy inference engine
|
| 31 |
+
- `app.py`: Interactive simulation viewer and rendering script
|
| 32 |
+
|
| 33 |
+
## 🚀 Quick Start
|
| 34 |
+
|
| 35 |
+
### 1. Requirements
|
| 36 |
+
```bash
|
| 37 |
+
pip install mujoco onnxruntime numpy imageio imageio-ffmpeg
|
| 38 |
+
```
|
| 39 |
+
|
| 40 |
+
### 2. Run Inference
|
| 41 |
+
You can load the ONNX models directly with ONNX Runtime and MuJoCo to simulate and control the robot.
|
| 42 |
+
|
| 43 |
+
```python
|
| 44 |
+
import mujoco
|
| 45 |
+
from infer_engine import SpacePolicyInference
|
| 46 |
+
|
| 47 |
+
model = mujoco.MjModel.from_xml_path("robot/scene.xml")
|
| 48 |
+
data = mujoco.MjData(model)
|
| 49 |
+
engine = SpacePolicyInference(model, data, policies_dir="policies")
|
| 50 |
+
|
| 51 |
+
# Set forward walking velocity
|
| 52 |
+
engine.set_vel_cmd(lin_vel_x=0.25, lin_vel_y=0.0, ang_vel_z=0.0)
|
| 53 |
+
```
|
app.py
ADDED
|
@@ -0,0 +1,203 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
import os
|
| 2 |
+
import tempfile
|
| 3 |
+
import numpy as np
|
| 4 |
+
import imageio
|
| 5 |
+
import gradio as gr
|
| 6 |
+
import mujoco
|
| 7 |
+
|
| 8 |
+
from infer_engine import SpacePolicyInference
|
| 9 |
+
|
| 10 |
+
CURRENT_DIR = os.path.dirname(os.path.abspath(__file__))
|
| 11 |
+
ROBOT_DIR = os.path.join(CURRENT_DIR, "robot")
|
| 12 |
+
POLICIES_DIR = os.path.join(CURRENT_DIR, "policies")
|
| 13 |
+
|
| 14 |
+
def simulate_motion(motion_type, duration, camera_angle, progress=gr.Progress()):
|
| 15 |
+
progress(0, desc="시뮬레이션 환경 초기화 중...")
|
| 16 |
+
|
| 17 |
+
# Select XML model
|
| 18 |
+
if motion_type == "⚽ 왼발 공차기 (Ball Kick)":
|
| 19 |
+
xml_path = os.path.join(ROBOT_DIR, "scene_ball.xml")
|
| 20 |
+
else:
|
| 21 |
+
xml_path = os.path.join(ROBOT_DIR, "scene.xml")
|
| 22 |
+
|
| 23 |
+
model = mujoco.MjModel.from_xml_path(xml_path)
|
| 24 |
+
model.opt.timestep = 0.005
|
| 25 |
+
data = mujoco.MjData(model)
|
| 26 |
+
|
| 27 |
+
# Initialize policy
|
| 28 |
+
engine = SpacePolicyInference(model, data, POLICIES_DIR)
|
| 29 |
+
|
| 30 |
+
# Reset robot position to standing default
|
| 31 |
+
freejoint_id = mujoco.mj_name2id(model, mujoco.mjtObj.mjOBJ_JOINT, "trunk_base_freejoint")
|
| 32 |
+
qpos_adr = model.jnt_qposadr[freejoint_id]
|
| 33 |
+
data.qpos[qpos_adr + 0] = 0.0
|
| 34 |
+
data.qpos[qpos_adr + 1] = 0.0
|
| 35 |
+
data.qpos[qpos_adr + 2] = 0.125
|
| 36 |
+
data.qpos[qpos_adr + 3:qpos_adr + 7] = [1, 0, 0, 0]
|
| 37 |
+
for i, idx in enumerate(engine.joint_qpos_indices):
|
| 38 |
+
data.qpos[idx] = engine.default_pose[i]
|
| 39 |
+
data.ctrl[:] = engine.default_pose
|
| 40 |
+
mujoco.mj_forward(model, data)
|
| 41 |
+
|
| 42 |
+
# Configure behavior
|
| 43 |
+
if motion_type == "🚶 전진 걷기 (Forward Walk)":
|
| 44 |
+
engine.set_vel_cmd(0.25, 0.0, 0.0)
|
| 45 |
+
elif motion_type == "🚶 후진 걷기 (Backward Walk)":
|
| 46 |
+
engine.set_vel_cmd(-0.2, 0.0, 0.0)
|
| 47 |
+
elif motion_type == "🔄 좌회전 (Turn Left)":
|
| 48 |
+
engine.set_vel_cmd(0.1, 0.0, 0.8)
|
| 49 |
+
elif motion_type == "🔄 우회전 (Turn Right)":
|
| 50 |
+
engine.set_vel_cmd(0.1, 0.0, -0.8)
|
| 51 |
+
elif motion_type == "🧍 제자리 서기 (Standing Balance)":
|
| 52 |
+
engine.set_vel_cmd(0.0, 0.0, 0.0)
|
| 53 |
+
elif motion_type == "🤸 앞구르기 (Roulade)":
|
| 54 |
+
engine.trigger_behavior("roulade")
|
| 55 |
+
elif motion_type == "⚽ 왼발 공차기 (Ball Kick)":
|
| 56 |
+
engine.trigger_behavior("kick_left")
|
| 57 |
+
elif motion_type == "🧎 바닥 줍기 (Ground Pick)":
|
| 58 |
+
engine.trigger_ground_pick()
|
| 59 |
+
elif motion_type == "🪑 앉기 (Sit Down)":
|
| 60 |
+
engine.trigger_sit()
|
| 61 |
+
|
| 62 |
+
# Offscreen renderer
|
| 63 |
+
width, height = 640, 480
|
| 64 |
+
renderer = mujoco.Renderer(model, height, width)
|
| 65 |
+
|
| 66 |
+
# Setup camera
|
| 67 |
+
camera = mujoco.MjvCamera()
|
| 68 |
+
mujoco.mjv_defaultCamera(camera)
|
| 69 |
+
|
| 70 |
+
frames = []
|
| 71 |
+
fps = 30
|
| 72 |
+
control_freq = 50 # Hz
|
| 73 |
+
decimation = 4
|
| 74 |
+
total_steps = int(duration * control_freq)
|
| 75 |
+
dt = 1.0 / control_freq
|
| 76 |
+
|
| 77 |
+
# Render frequency (every ~1.66 control steps to reach 30 fps)
|
| 78 |
+
sim_time = 0.0
|
| 79 |
+
next_render_time = 0.0
|
| 80 |
+
|
| 81 |
+
for step_i in range(total_steps):
|
| 82 |
+
engine.update(dt)
|
| 83 |
+
engine.step()
|
| 84 |
+
|
| 85 |
+
for _ in range(decimation):
|
| 86 |
+
mujoco.mj_step(model, data)
|
| 87 |
+
|
| 88 |
+
sim_time += dt
|
| 89 |
+
|
| 90 |
+
if sim_time >= next_render_time:
|
| 91 |
+
# Update camera to track robot
|
| 92 |
+
robot_pos = data.qpos[qpos_adr:qpos_adr + 3]
|
| 93 |
+
camera.lookat = [robot_pos[0], robot_pos[1], robot_pos[2] + 0.05]
|
| 94 |
+
|
| 95 |
+
if camera_angle == "측면 추적 (Side View)":
|
| 96 |
+
camera.distance = 1.1
|
| 97 |
+
camera.elevation = -15
|
| 98 |
+
camera.azimuth = 90
|
| 99 |
+
elif camera_angle == "정면 뷰 (Front View)":
|
| 100 |
+
camera.distance = 1.0
|
| 101 |
+
camera.elevation = -10
|
| 102 |
+
camera.azimuth = 180
|
| 103 |
+
elif camera_angle == "대각선 뷰 (Isometric)":
|
| 104 |
+
camera.distance = 1.2
|
| 105 |
+
camera.elevation = -22
|
| 106 |
+
camera.azimuth = 135
|
| 107 |
+
elif camera_angle == "후방 3인칭 (Behind View)":
|
| 108 |
+
camera.distance = 1.1
|
| 109 |
+
camera.elevation = -12
|
| 110 |
+
camera.azimuth = 0
|
| 111 |
+
|
| 112 |
+
renderer.update_scene(data, camera=camera)
|
| 113 |
+
img = renderer.render()
|
| 114 |
+
frames.append(img)
|
| 115 |
+
next_render_time += 1.0 / fps
|
| 116 |
+
|
| 117 |
+
if step_i % 15 == 0:
|
| 118 |
+
progress(step_i / total_steps, desc=f"시뮬레이션 진행 중... ({step_i}/{total_steps})")
|
| 119 |
+
|
| 120 |
+
progress(0.95, desc="비디오 파일 생성 중...")
|
| 121 |
+
temp_dir = tempfile.mkdtemp()
|
| 122 |
+
video_path = os.path.join(temp_dir, "output.mp4")
|
| 123 |
+
imageio.mimsave(video_path, frames, fps=fps)
|
| 124 |
+
|
| 125 |
+
final_pos = data.qpos[qpos_adr:qpos_adr + 3]
|
| 126 |
+
distance = np.linalg.norm(final_pos[:2])
|
| 127 |
+
|
| 128 |
+
status_md = f"""
|
| 129 |
+
### 📊 시뮬레이션 결과 요약
|
| 130 |
+
- **선택된 동작**: `{motion_type}`
|
| 131 |
+
- **시뮬레이션 시간**: `{duration:.1f}초` (총 {len(frames)} 프레임 / 30 FPS)
|
| 132 |
+
- **최종 이동 거리**: `{distance:.3f} m` (X: `{final_pos[0]:.2f}m`, Y: `{final_pos[1]:.2f}m`, Z: `{final_pos[2]:.2f}m`)
|
| 133 |
+
- **로봇 상태**: `정상 안정 상태 유지 완료`
|
| 134 |
+
"""
|
| 135 |
+
return video_path, status_md
|
| 136 |
+
|
| 137 |
+
# Gradio Interface
|
| 138 |
+
custom_css = """
|
| 139 |
+
#container { max-width: 960px; margin: 0 auto; }
|
| 140 |
+
.gr-button-primary { background: linear-gradient(90deg, #F59E0B 0%, #D97706 100%) !important; border: none !important; }
|
| 141 |
+
"""
|
| 142 |
+
|
| 143 |
+
with gr.Blocks(title="🦆 MicroDuck 3D Robot Simulator", css=custom_css, theme=gr.themes.Soft()) as demo:
|
| 144 |
+
gr.Markdown(
|
| 145 |
+
"""
|
| 146 |
+
# 🦆 MicroDuck 3D 로봇 강화학습 시뮬레이터
|
| 147 |
+
MuJoCo 물리 엔진과 온닉스(ONNX) 심층강화학습(Deep RL) 정책 모델로 구동되는 **MicroDuck** 로봇의 동작을 웹에서 직접 실행하고 관찰해보세요.
|
| 148 |
+
"""
|
| 149 |
+
)
|
| 150 |
+
|
| 151 |
+
with gr.Row():
|
| 152 |
+
with gr.Column(scale=4):
|
| 153 |
+
motion_input = gr.Radio(
|
| 154 |
+
label="🎯 로봇 동작 (Motion Policy)",
|
| 155 |
+
choices=[
|
| 156 |
+
"🚶 전진 걷기 (Forward Walk)",
|
| 157 |
+
"🚶 후진 걷기 (Backward Walk)",
|
| 158 |
+
"🔄 좌회전 (Turn Left)",
|
| 159 |
+
"🔄 우회전 (Turn Right)",
|
| 160 |
+
"🧍 제자리 서기 (Standing Balance)",
|
| 161 |
+
"🤸 앞구르기 (Roulade)",
|
| 162 |
+
"⚽ 왼발 공차기 (Ball Kick)",
|
| 163 |
+
"🧎 바닥 줍기 (Ground Pick)",
|
| 164 |
+
"🪑 앉기 (Sit Down)",
|
| 165 |
+
],
|
| 166 |
+
value="🚶 전진 걷기 (Forward Walk)"
|
| 167 |
+
)
|
| 168 |
+
|
| 169 |
+
duration_input = gr.Slider(
|
| 170 |
+
label="⏱️ 시뮬레이션 시간 (초)",
|
| 171 |
+
minimum=1.5,
|
| 172 |
+
maximum=4.5,
|
| 173 |
+
value=2.5,
|
| 174 |
+
step=0.5
|
| 175 |
+
)
|
| 176 |
+
|
| 177 |
+
camera_input = gr.Dropdown(
|
| 178 |
+
label="🎥 카메라 앵글",
|
| 179 |
+
choices=["측면 추적 (Side View)", "정면 뷰 (Front View)", "대각선 뷰 (Isometric)", "후방 3인칭 (Behind View)"],
|
| 180 |
+
value="대각선 뷰 (Isometric)"
|
| 181 |
+
)
|
| 182 |
+
|
| 183 |
+
run_btn = gr.Button("🎬 3D 시뮬레이션 렌더링 시작", variant="primary", size="lg")
|
| 184 |
+
|
| 185 |
+
with gr.Column(scale=6):
|
| 186 |
+
video_output = gr.Video(label="📹 시뮬레이션 렌더링 영상", autoplay=True, loop=True)
|
| 187 |
+
status_output = gr.Markdown("시뮬레이션을 실행하면 결과 통계가 표시됩니다.")
|
| 188 |
+
|
| 189 |
+
run_btn.click(
|
| 190 |
+
fn=simulate_motion,
|
| 191 |
+
inputs=[motion_input, duration_input, camera_input],
|
| 192 |
+
outputs=[video_output, status_output]
|
| 193 |
+
)
|
| 194 |
+
|
| 195 |
+
gr.Markdown(
|
| 196 |
+
"""
|
| 197 |
+
---
|
| 198 |
+
💡 **MicroDuck 기술 스택**: MuJoCo Physics, ONNX Runtime, Isaac Gym / Genesis RL Trained Policies.
|
| 199 |
+
"""
|
| 200 |
+
)
|
| 201 |
+
|
| 202 |
+
if __name__ == "__main__":
|
| 203 |
+
demo.launch()
|
infer_engine.py
ADDED
|
@@ -0,0 +1,206 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
import os
|
| 2 |
+
import math
|
| 3 |
+
import numpy as np
|
| 4 |
+
import mujoco
|
| 5 |
+
import onnxruntime as ort
|
| 6 |
+
|
| 7 |
+
# Default pose used by the policy (14 DoF)
|
| 8 |
+
DEFAULT_POSE = np.array([
|
| 9 |
+
0.0, # left_hip_yaw
|
| 10 |
+
-0.0873, # left_hip_roll
|
| 11 |
+
-0.4579, # left_hip_pitch
|
| 12 |
+
-0.0049, # left_knee
|
| 13 |
+
0.4530, # left_ankle
|
| 14 |
+
0.3491, # neck_pitch
|
| 15 |
+
0.3491, # head_pitch
|
| 16 |
+
0.0, # head_yaw
|
| 17 |
+
0.0, # head_roll
|
| 18 |
+
0.0, # right_hip_yaw
|
| 19 |
+
0.0873, # right_hip_roll
|
| 20 |
+
0.4579, # right_hip_pitch
|
| 21 |
+
0.0049, # right_knee
|
| 22 |
+
-0.4530, # right_ankle
|
| 23 |
+
], dtype=np.float32)
|
| 24 |
+
|
| 25 |
+
BALL_OFFSET_X = 0.09
|
| 26 |
+
BALL_OFFSET_ABS_Y = 0.042
|
| 27 |
+
BALL_RADIUS = 0.035
|
| 28 |
+
|
| 29 |
+
class SpacePolicyInference:
|
| 30 |
+
def __init__(self, model, data, policies_dir):
|
| 31 |
+
self.model = model
|
| 32 |
+
self.data = data
|
| 33 |
+
self.action_scale = 1.0
|
| 34 |
+
self.use_projected_gravity = True
|
| 35 |
+
self.new_cmd_obs = True
|
| 36 |
+
self.switch_threshold = 0.05
|
| 37 |
+
|
| 38 |
+
# Load ONNX policies
|
| 39 |
+
walking_path = os.path.join(policies_dir, "alpha_walking.onnx")
|
| 40 |
+
standing_path = os.path.join(policies_dir, "alpha_stand.onnx")
|
| 41 |
+
sitstand_path = os.path.join(policies_dir, "alpha_sitstand.onnx")
|
| 42 |
+
ground_pick_path = os.path.join(policies_dir, "alpha_ground_pick.onnx")
|
| 43 |
+
kick_left_path = os.path.join(policies_dir, "ball_kick_left.onnx")
|
| 44 |
+
roulade_path = os.path.join(policies_dir, "roulade.onnx")
|
| 45 |
+
|
| 46 |
+
self.walking_session = ort.InferenceSession(walking_path) if os.path.exists(walking_path) else None
|
| 47 |
+
self.standing_session = ort.InferenceSession(standing_path) if os.path.exists(standing_path) else None
|
| 48 |
+
self.sit_session = ort.InferenceSession(sitstand_path) if os.path.exists(sitstand_path) else None
|
| 49 |
+
self.ground_pick_session = ort.InferenceSession(ground_pick_path) if os.path.exists(ground_pick_path) else None
|
| 50 |
+
|
| 51 |
+
self.behavior_sessions = {}
|
| 52 |
+
self.behavior_durations = {}
|
| 53 |
+
if os.path.exists(kick_left_path):
|
| 54 |
+
self.behavior_sessions["kick_left"] = ort.InferenceSession(kick_left_path)
|
| 55 |
+
self.behavior_durations["kick_left"] = 3.0
|
| 56 |
+
if os.path.exists(roulade_path):
|
| 57 |
+
self.behavior_sessions["roulade"] = ort.InferenceSession(roulade_path)
|
| 58 |
+
self.behavior_durations["roulade"] = 2.0
|
| 59 |
+
|
| 60 |
+
self.is_sitstand = True
|
| 61 |
+
self.sit_mode = False
|
| 62 |
+
self.ground_pick_mode = False
|
| 63 |
+
self.ground_pick_phase = 0.0
|
| 64 |
+
self.ground_pick_period = 4.0
|
| 65 |
+
self.behavior_mode = None
|
| 66 |
+
self.behavior_time_left = 0.0
|
| 67 |
+
|
| 68 |
+
self.current_policy = "walking" if self.walking_session else "standing"
|
| 69 |
+
self.ort_session = self.walking_session if self.walking_session else self.standing_session
|
| 70 |
+
self.input_name = self.ort_session.get_inputs()[0].name
|
| 71 |
+
self.output_name = self.ort_session.get_outputs()[0].name
|
| 72 |
+
|
| 73 |
+
self.imu_ang_vel_id = mujoco.mj_name2id(model, mujoco.mjtObj.mjOBJ_SENSOR, "imu_ang_vel")
|
| 74 |
+
self.trunk_base_id = mujoco.mj_name2id(model, mujoco.mjtObj.mjOBJ_BODY, "trunk_base")
|
| 75 |
+
_trunk_jid = mujoco.mj_name2id(model, mujoco.mjtObj.mjOBJ_JOINT, "trunk_base_freejoint")
|
| 76 |
+
self._trunk_qpos_adr = int(model.jnt_qposadr[_trunk_jid])
|
| 77 |
+
_ball_jid = mujoco.mj_name2id(model, mujoco.mjtObj.mjOBJ_JOINT, "ball_free")
|
| 78 |
+
self.ball_qpos_adr = int(model.jnt_qposadr[_ball_jid]) if _ball_jid >= 0 else None
|
| 79 |
+
self.ball_qvel_adr = int(model.jnt_dofadr[_ball_jid]) if _ball_jid >= 0 else None
|
| 80 |
+
|
| 81 |
+
self.n_joints = model.nu
|
| 82 |
+
self.joint_qpos_indices = [int(model.jnt_qposadr[model.actuator_trnid[i, 0]]) for i in range(model.nu)]
|
| 83 |
+
self.joint_qvel_indices = [int(model.jnt_dofadr[model.actuator_trnid[i, 0]]) for i in range(model.nu)]
|
| 84 |
+
|
| 85 |
+
self.default_pose = DEFAULT_POSE[:self.n_joints]
|
| 86 |
+
self.last_action = np.zeros(self.n_joints, dtype=np.float32)
|
| 87 |
+
self.vel_cmd = np.zeros(3, dtype=np.float32)
|
| 88 |
+
self.body_cmd = np.zeros(6, dtype=np.float32)
|
| 89 |
+
self.head_offset = np.zeros(4, dtype=np.float32)
|
| 90 |
+
self.command = np.zeros(13, dtype=np.float32)
|
| 91 |
+
|
| 92 |
+
def _update_command(self):
|
| 93 |
+
if self.behavior_mode is not None:
|
| 94 |
+
self.command = np.zeros(13, dtype=np.float32)
|
| 95 |
+
return
|
| 96 |
+
cmd = np.zeros(13, dtype=np.float32)
|
| 97 |
+
if self.current_policy == "walking":
|
| 98 |
+
cmd[0:3] = self.vel_cmd
|
| 99 |
+
elif self.current_policy == "sit" and self.is_sitstand:
|
| 100 |
+
cmd[0] = 1.0 if self.sit_mode else 0.0
|
| 101 |
+
cmd[3:7] = self.head_offset
|
| 102 |
+
cmd[7:13] = self.body_cmd
|
| 103 |
+
self.command = cmd
|
| 104 |
+
|
| 105 |
+
def set_vel_cmd(self, lin_vel_x=0.0, lin_vel_y=0.0, ang_vel_z=0.0):
|
| 106 |
+
self.vel_cmd = np.array([lin_vel_x, lin_vel_y, ang_vel_z], dtype=np.float32)
|
| 107 |
+
magnitude = float(np.linalg.norm(self.vel_cmd))
|
| 108 |
+
if magnitude <= self.switch_threshold and self.standing_session:
|
| 109 |
+
self.current_policy = "standing"
|
| 110 |
+
self.ort_session = self.standing_session
|
| 111 |
+
elif self.walking_session:
|
| 112 |
+
self.current_policy = "walking"
|
| 113 |
+
self.ort_session = self.walking_session
|
| 114 |
+
self._update_command()
|
| 115 |
+
|
| 116 |
+
def trigger_behavior(self, name):
|
| 117 |
+
if name in self.behavior_sessions:
|
| 118 |
+
if name == "kick_left":
|
| 119 |
+
self._place_ball()
|
| 120 |
+
self.behavior_mode = name
|
| 121 |
+
self.behavior_time_left = self.behavior_durations[name]
|
| 122 |
+
self.current_policy = name
|
| 123 |
+
self.ort_session = self.behavior_sessions[name]
|
| 124 |
+
self._update_command()
|
| 125 |
+
|
| 126 |
+
def trigger_sit(self):
|
| 127 |
+
if self.sit_session:
|
| 128 |
+
self.sit_mode = True
|
| 129 |
+
self.current_policy = "sit"
|
| 130 |
+
self.ort_session = self.sit_session
|
| 131 |
+
self._update_command()
|
| 132 |
+
|
| 133 |
+
def trigger_ground_pick(self):
|
| 134 |
+
if self.ground_pick_session:
|
| 135 |
+
self.ground_pick_mode = True
|
| 136 |
+
self.ground_pick_phase = 0.0
|
| 137 |
+
self.current_policy = "ground_pick"
|
| 138 |
+
self.ort_session = self.ground_pick_session
|
| 139 |
+
|
| 140 |
+
def _place_ball(self):
|
| 141 |
+
if self.ball_qpos_adr is None:
|
| 142 |
+
return
|
| 143 |
+
adr = self._trunk_qpos_adr
|
| 144 |
+
x, y = float(self.data.qpos[adr]), float(self.data.qpos[adr + 1])
|
| 145 |
+
qw, qx, qy, qz = self.data.qpos[adr + 3:adr + 7]
|
| 146 |
+
yaw = math.atan2(2.0 * (qw * qz + qx * qy), 1.0 - 2.0 * (qy * qy + qz * qz))
|
| 147 |
+
off_y = BALL_OFFSET_ABS_Y
|
| 148 |
+
bx = x + math.cos(yaw) * BALL_OFFSET_X - math.sin(yaw) * off_y
|
| 149 |
+
by = y + math.sin(yaw) * BALL_OFFSET_X + math.cos(yaw) * off_y
|
| 150 |
+
self.data.qpos[self.ball_qpos_adr:self.ball_qpos_adr + 7] = [bx, by, BALL_RADIUS, 1, 0, 0, 0]
|
| 151 |
+
if self.ball_qvel_adr is not None:
|
| 152 |
+
self.data.qvel[self.ball_qvel_adr:self.ball_qvel_adr + 6] = 0.0
|
| 153 |
+
|
| 154 |
+
def update(self, dt: float):
|
| 155 |
+
if self.ground_pick_mode:
|
| 156 |
+
new_phase = self.ground_pick_phase + dt / self.ground_pick_period
|
| 157 |
+
if new_phase >= 0.7:
|
| 158 |
+
self.ground_pick_mode = False
|
| 159 |
+
self.current_policy = "walking" if self.walking_session else "standing"
|
| 160 |
+
self.ort_session = self.walking_session if self.walking_session else self.standing_session
|
| 161 |
+
self._update_command()
|
| 162 |
+
else:
|
| 163 |
+
self.ground_pick_phase = new_phase
|
| 164 |
+
self.command[0] = np.cos(2 * np.pi * self.ground_pick_phase)
|
| 165 |
+
self.command[1] = np.sin(2 * np.pi * self.ground_pick_phase)
|
| 166 |
+
self.command[2] = 0.0
|
| 167 |
+
elif self.behavior_mode is not None:
|
| 168 |
+
self.behavior_time_left -= dt
|
| 169 |
+
if self.behavior_time_left <= 0.0:
|
| 170 |
+
self.behavior_mode = None
|
| 171 |
+
self.current_policy = "walking" if self.walking_session else "standing"
|
| 172 |
+
self.ort_session = self.walking_session if self.walking_session else self.standing_session
|
| 173 |
+
self._update_command()
|
| 174 |
+
|
| 175 |
+
def quat_rotate_inverse(self, quat, vec):
|
| 176 |
+
w = quat[0]
|
| 177 |
+
xyz = quat[1:4]
|
| 178 |
+
t = np.cross(xyz, vec) * 2
|
| 179 |
+
return vec - w * t + np.cross(xyz, t)
|
| 180 |
+
|
| 181 |
+
def get_observations(self):
|
| 182 |
+
obs = []
|
| 183 |
+
sensor_adr = self.model.sensor_adr[self.imu_ang_vel_id]
|
| 184 |
+
ang_vel = self.data.sensordata[sensor_adr:sensor_adr + 3].copy().astype(np.float32)
|
| 185 |
+
obs.append(ang_vel)
|
| 186 |
+
|
| 187 |
+
quat = self.data.xquat[self.trunk_base_id].copy().astype(np.float32)
|
| 188 |
+
proj_grav = self.quat_rotate_inverse(quat, np.array([0.0, 0.0, -1.0], dtype=np.float32))
|
| 189 |
+
obs.append(proj_grav)
|
| 190 |
+
|
| 191 |
+
current_pos = self.data.qpos[self.joint_qpos_indices].copy().astype(np.float32)
|
| 192 |
+
obs.append(current_pos - self.default_pose)
|
| 193 |
+
|
| 194 |
+
joint_vel = self.data.qvel[self.joint_qvel_indices].copy().astype(np.float32)
|
| 195 |
+
obs.append(joint_vel)
|
| 196 |
+
|
| 197 |
+
obs.append(self.last_action)
|
| 198 |
+
obs.append(self.command)
|
| 199 |
+
return np.concatenate(obs).astype(np.float32)
|
| 200 |
+
|
| 201 |
+
def step(self):
|
| 202 |
+
obs = self.get_observations().reshape(1, -1)
|
| 203 |
+
action = self.ort_session.run([self.output_name], {self.input_name: obs})[0].squeeze(0).astype(np.float32)
|
| 204 |
+
self.last_action = action.copy()
|
| 205 |
+
target_positions = self.default_pose + action * self.action_scale
|
| 206 |
+
self.data.ctrl[:] = target_positions
|
packages.txt
ADDED
|
@@ -0,0 +1,4 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
libgl1-mesa-glx
|
| 2 |
+
libosmesa6-dev
|
| 3 |
+
libglib2.0-0
|
| 4 |
+
ffmpeg
|
policies/alpha_ground_pick.onnx
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:ffbf5109982ff999b0ba53afe86b9ae731bbec679d67fb7f8ab4c52152c88872
|
| 3 |
+
size 793685
|
policies/alpha_sitstand.onnx
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:c6c40e35e726eabd803d633e090d112994f469921152448367953fbaf9799bc8
|
| 3 |
+
size 793695
|
policies/alpha_stand.onnx
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:1569268713e40deea795dd2922dba50d3621e15a872855408b6b1b125b1c094b
|
| 3 |
+
size 793705
|
policies/alpha_walking.onnx
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:e36332d383997d51401897734cd3e79cf5038406feddb18b4d57ecfb141daa6c
|
| 3 |
+
size 793705
|
policies/ball_kick_left.onnx
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:d6928284dccd3dd61e08bf2f760effa74309fbefd97b2b31afb2a60f526d196a
|
| 3 |
+
size 793685
|
policies/ball_kick_right.onnx
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:147a32c388c6b19111b3ac3b550a9a6dc8b8bf267118af4d8c3712522eedb5af
|
| 3 |
+
size 793685
|
policies/roller.onnx
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:cf05651d2708a2f9364212e86b866c97a70ace8131c492500105e8f28bf99afd
|
| 3 |
+
size 793685
|
policies/roller_crouch.onnx
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:a1a084be240469c76ac9d3fa44d4792f16d4b1da60398b3ecd3cfc5e2244d990
|
| 3 |
+
size 793685
|
policies/roulade.onnx
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:3d60da08fc13f29c1b57f41977aa898132c0d60042100149d8e775affcbca32b
|
| 3 |
+
size 793685
|
requirements.txt
ADDED
|
@@ -0,0 +1,6 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
gradio>=4.44.0
|
| 2 |
+
mujoco>=3.1.0
|
| 3 |
+
onnxruntime>=1.18.0
|
| 4 |
+
numpy
|
| 5 |
+
imageio
|
| 6 |
+
imageio-ffmpeg
|
robot/add_backlash.py
ADDED
|
@@ -0,0 +1,139 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
#!/usr/bin/env python3
|
| 2 |
+
"""Inject gearbox-backlash joints into an onshape-to-robot MJCF export.
|
| 3 |
+
|
| 4 |
+
For every actuated servo joint (``class="chosen_actuator"``) this inserts an
|
| 5 |
+
unactuated hinge on the same body / same axis right after it:
|
| 6 |
+
|
| 7 |
+
<joint axis="0 0 1" name="left_hip_yaw" ... class="chosen_actuator"/>
|
| 8 |
+
<joint axis="0 0 1" name="passive_left_hip_yaw_backlash" class="backlash"/>
|
| 9 |
+
|
| 10 |
+
The composite link rotation is main + backlash: the main joint is the servo
|
| 11 |
+
output (BAM drives it), the backlash joint is the play between the servo and
|
| 12 |
+
the link, free to wander within ±(backlash/2).
|
| 13 |
+
|
| 14 |
+
Naming: the ``passive_`` prefix means the new joints are automatically excluded
|
| 15 |
+
by every existing regex in the task configs (actuators ``^(?!passive_).*``,
|
| 16 |
+
joint obs, pose reward). The encoder-through-backlash handling lives on the
|
| 17 |
+
mjlab side (BacklashEncoderBamActuatorCfg + joint_pos/vel_rel_backlash obs).
|
| 18 |
+
|
| 19 |
+
Meant to run as the LAST post_import_command of an onshape-to-robot config
|
| 20 |
+
(see config_mjcf_allcollisions_backlash.json), but works standalone on any
|
| 21 |
+
already-exported robot xml:
|
| 22 |
+
|
| 23 |
+
python3 add_backlash.py robot_allcollisions_backlash.xml --backlash-deg 2.0
|
| 24 |
+
|
| 25 |
+
``--backlash-deg`` is the TOTAL peak-to-peak play (what you measure wiggling
|
| 26 |
+
the horn with the servo held); the joint range is symmetric ±deg/2.
|
| 27 |
+
"""
|
| 28 |
+
|
| 29 |
+
import argparse
|
| 30 |
+
import math
|
| 31 |
+
import re
|
| 32 |
+
import sys
|
| 33 |
+
|
| 34 |
+
JOINT_RE = re.compile(r'^(\s*)<joint\b[^>]*/>\s*$')
|
| 35 |
+
ATTR_RE = re.compile(r'(\w+)="([^"]*)"')
|
| 36 |
+
|
| 37 |
+
|
| 38 |
+
def build_backlash_default(half_range_rad: float, damping: float,
|
| 39 |
+
armature: float, frictionloss: float,
|
| 40 |
+
total_deg: float) -> str:
|
| 41 |
+
return (
|
| 42 |
+
f" <!-- Backlash injected by add_backlash.py: {total_deg:g} deg total play"
|
| 43 |
+
f" (symmetric +/-{total_deg / 2:g} deg) -->\n"
|
| 44 |
+
f" <default>\n"
|
| 45 |
+
f" <default class=\"backlash\">\n"
|
| 46 |
+
f" <!-- stiff limit constraint: with a range this small the default\n"
|
| 47 |
+
f" solref (0.02,1) lets the joint overshoot its limits ~2x under\n"
|
| 48 |
+
f" load. 0.01 = 2*sim_dt (mjlab velocity tasks run dt=0.005),\n"
|
| 49 |
+
f" the stiffest stable setting; solimp raises the impedance so\n"
|
| 50 |
+
f" the gear-teeth contact is nearly rigid. -->\n"
|
| 51 |
+
f" <joint damping=\"{damping:g}\" frictionloss=\"{frictionloss:g}\""
|
| 52 |
+
f" armature=\"{armature:g}\" limited=\"true\""
|
| 53 |
+
f" range=\"{-half_range_rad:.17g} {half_range_rad:.17g}\""
|
| 54 |
+
f" solreflimit=\"0.01 1\" solimplimit=\"0.95 0.999 0.0001 0.5 2\"/>\n"
|
| 55 |
+
f" </default>\n"
|
| 56 |
+
f" </default>\n"
|
| 57 |
+
)
|
| 58 |
+
|
| 59 |
+
|
| 60 |
+
def main() -> int:
|
| 61 |
+
parser = argparse.ArgumentParser(description=__doc__)
|
| 62 |
+
parser.add_argument("xml", help="MJCF file to modify in place")
|
| 63 |
+
parser.add_argument("--backlash-deg", type=float, default=2.0,
|
| 64 |
+
help="TOTAL backlash play in degrees (peak-to-peak); "
|
| 65 |
+
"joint range is symmetric +/-deg/2 (default: 2.0)")
|
| 66 |
+
parser.add_argument("--damping", type=float, default=0.01,
|
| 67 |
+
help="backlash joint damping (default: 0.01)")
|
| 68 |
+
parser.add_argument("--armature", type=float, default=0.001,
|
| 69 |
+
help="backlash joint armature, kept small but non-zero "
|
| 70 |
+
"for solver conditioning (default: 0.001)")
|
| 71 |
+
parser.add_argument("--frictionloss", type=float, default=0.0,
|
| 72 |
+
help="backlash joint frictionloss (default: 0)")
|
| 73 |
+
parser.add_argument("--joint-class", default="chosen_actuator",
|
| 74 |
+
help="default class of the joints that get backlash "
|
| 75 |
+
"(default: chosen_actuator)")
|
| 76 |
+
parser.add_argument("--exclude", default=None,
|
| 77 |
+
help="optional regex of joint names to skip "
|
| 78 |
+
"(e.g. '.*(neck|head).*')")
|
| 79 |
+
args = parser.parse_args()
|
| 80 |
+
|
| 81 |
+
half_range = math.radians(args.backlash_deg) / 2.0
|
| 82 |
+
exclude = re.compile(args.exclude) if args.exclude else None
|
| 83 |
+
|
| 84 |
+
with open(args.xml) as f:
|
| 85 |
+
lines = f.readlines()
|
| 86 |
+
|
| 87 |
+
if any('class="backlash"' in line for line in lines):
|
| 88 |
+
print(f"[add_backlash] {args.xml} already contains backlash joints — aborting.")
|
| 89 |
+
return 1
|
| 90 |
+
|
| 91 |
+
out = []
|
| 92 |
+
added = []
|
| 93 |
+
default_inserted = False
|
| 94 |
+
for line in lines:
|
| 95 |
+
# Insert the defaults block right before <worldbody>.
|
| 96 |
+
if not default_inserted and "<worldbody>" in line:
|
| 97 |
+
out.append(build_backlash_default(
|
| 98 |
+
half_range, args.damping, args.armature, args.frictionloss,
|
| 99 |
+
args.backlash_deg))
|
| 100 |
+
default_inserted = True
|
| 101 |
+
|
| 102 |
+
out.append(line)
|
| 103 |
+
|
| 104 |
+
m = JOINT_RE.match(line)
|
| 105 |
+
if m is None:
|
| 106 |
+
continue
|
| 107 |
+
attrs = dict(ATTR_RE.findall(line))
|
| 108 |
+
if attrs.get("class") != args.joint_class:
|
| 109 |
+
continue
|
| 110 |
+
name = attrs.get("name")
|
| 111 |
+
if not name or (exclude and exclude.match(name)):
|
| 112 |
+
continue
|
| 113 |
+
indent = m.group(1)
|
| 114 |
+
axis = attrs.get("axis", "0 0 1")
|
| 115 |
+
pos = f' pos="{attrs["pos"]}"' if "pos" in attrs else ""
|
| 116 |
+
out.append(
|
| 117 |
+
f'{indent}<joint axis="{axis}"{pos} '
|
| 118 |
+
f'name="passive_{name}_backlash" type="hinge" class="backlash"/>\n'
|
| 119 |
+
)
|
| 120 |
+
added.append(name)
|
| 121 |
+
|
| 122 |
+
if not default_inserted:
|
| 123 |
+
print("[add_backlash] ERROR: no <worldbody> found — is this an MJCF file?")
|
| 124 |
+
return 1
|
| 125 |
+
if not added:
|
| 126 |
+
print(f"[add_backlash] ERROR: no joints with class=\"{args.joint_class}\" found.")
|
| 127 |
+
return 1
|
| 128 |
+
|
| 129 |
+
with open(args.xml, "w") as f:
|
| 130 |
+
f.writelines(out)
|
| 131 |
+
|
| 132 |
+
print(f"[add_backlash] added {len(added)} backlash joints "
|
| 133 |
+
f"(+/-{args.backlash_deg / 2:g} deg = +/-{half_range:.5f} rad) to {args.xml}: "
|
| 134 |
+
f"{', '.join(added)}")
|
| 135 |
+
return 0
|
| 136 |
+
|
| 137 |
+
|
| 138 |
+
if __name__ == "__main__":
|
| 139 |
+
sys.exit(main())
|
robot/additional.xml
ADDED
|
@@ -0,0 +1,13 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
<default>
|
| 2 |
+
<default class="self_collision_only">
|
| 3 |
+
<geom group="3" contype="2" conaffinity="2"/>
|
| 4 |
+
</default>
|
| 5 |
+
<equality solref="0.002 1" solimp="0.99 0.999 0.0005 0.5 2"/>
|
| 6 |
+
</default>
|
| 7 |
+
<!-- <contact> -->
|
| 8 |
+
<!-- Jaw collision mesh overlaps the bottom head shell by ~2cm because the closed -->
|
| 9 |
+
<!-- loop linkage positions it inside the head. Without these excludes the -->
|
| 10 |
+
<!-- self-collision sensor reports a constant 2 contacts, giving a -->
|
| 11 |
+
<!-- permanent ~-2.0 reward penalty in the standup env. -->
|
| 12 |
+
<!-- <exclude body1="jaw" body2="bottom_head_shell"/> -->
|
| 13 |
+
<!-- </contact> -->
|
robot/assets/ankle_l_v1.part
ADDED
|
@@ -0,0 +1,13 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"configuration": "default",
|
| 3 |
+
"documentId": "804927696f06d877f3f1803e",
|
| 4 |
+
"documentMicroversion": "fc8237658b0c3e9ada6f813b",
|
| 5 |
+
"elementId": "a48e2e3940da29620aa227db",
|
| 6 |
+
"fullConfiguration": "default",
|
| 7 |
+
"id": "MnipPqhb15cTaf16d",
|
| 8 |
+
"isStandardContent": false,
|
| 9 |
+
"name": "ankle-l-v1 <1>",
|
| 10 |
+
"partId": "RbFD",
|
| 11 |
+
"suppressed": false,
|
| 12 |
+
"type": "Part"
|
| 13 |
+
}
|
robot/assets/ankle_l_v1.stl
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:70ecf0629559e3edf8f194f286a5fa0bd0ef77b75429b5f24f8bae70c7aa7446
|
| 3 |
+
size 235984
|
robot/assets/ankle_left.part
ADDED
|
@@ -0,0 +1,13 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"configuration": "default",
|
| 3 |
+
"documentId": "804927696f06d877f3f1803e",
|
| 4 |
+
"documentMicroversion": "48ccc523b8461dff097d59f9",
|
| 5 |
+
"elementId": "451317b8e3aacc7f88e8f8ed",
|
| 6 |
+
"fullConfiguration": "default",
|
| 7 |
+
"id": "MnipPqhb15cTaf16d",
|
| 8 |
+
"isStandardContent": false,
|
| 9 |
+
"name": "ankle_left <1>",
|
| 10 |
+
"partId": "RTBH",
|
| 11 |
+
"suppressed": false,
|
| 12 |
+
"type": "Part"
|
| 13 |
+
}
|
robot/assets/ankle_left.stl
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:98f14ba6e6cd138740aa822a615aaa0db34527d499c40b2379aacd13427a1379
|
| 3 |
+
size 248984
|
robot/assets/ankle_r_v1.part
ADDED
|
@@ -0,0 +1,13 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"configuration": "default",
|
| 3 |
+
"documentId": "804927696f06d877f3f1803e",
|
| 4 |
+
"documentMicroversion": "fc8237658b0c3e9ada6f813b",
|
| 5 |
+
"elementId": "a48e2e3940da29620aa227db",
|
| 6 |
+
"fullConfiguration": "default",
|
| 7 |
+
"id": "M/kz+prC94C355xoU",
|
| 8 |
+
"isStandardContent": false,
|
| 9 |
+
"name": "ankle_r_v1 <1>",
|
| 10 |
+
"partId": "RNHH",
|
| 11 |
+
"suppressed": false,
|
| 12 |
+
"type": "Part"
|
| 13 |
+
}
|
robot/assets/ankle_r_v1.stl
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:e3f277879aa6eb24e118795f4d8d8525acab9192c202a569d1403408ec656754
|
| 3 |
+
size 235784
|
robot/assets/ankle_right.part
ADDED
|
@@ -0,0 +1,13 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"configuration": "default",
|
| 3 |
+
"documentId": "804927696f06d877f3f1803e",
|
| 4 |
+
"documentMicroversion": "48ccc523b8461dff097d59f9",
|
| 5 |
+
"elementId": "451317b8e3aacc7f88e8f8ed",
|
| 6 |
+
"fullConfiguration": "default",
|
| 7 |
+
"id": "M/kz+prC94C355xoU",
|
| 8 |
+
"isStandardContent": false,
|
| 9 |
+
"name": "ankle_right <1>",
|
| 10 |
+
"partId": "R8CD",
|
| 11 |
+
"suppressed": false,
|
| 12 |
+
"type": "Part"
|
| 13 |
+
}
|
robot/assets/ankle_right.stl
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:836032fdeaa4b1f47f75cb24fa4ad9ebdb09acec158a0d787b3890c6dc4d4c6e
|
| 3 |
+
size 248884
|
robot/assets/banana_pcb_locker.part
ADDED
|
@@ -0,0 +1,13 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"configuration": "default",
|
| 3 |
+
"documentId": "804927696f06d877f3f1803e",
|
| 4 |
+
"documentMicroversion": "fc8237658b0c3e9ada6f813b",
|
| 5 |
+
"elementId": "d6fcdccc8b25aaa256e7e213",
|
| 6 |
+
"fullConfiguration": "default",
|
| 7 |
+
"id": "MBeyWD9BcBiAC88kr",
|
| 8 |
+
"isStandardContent": false,
|
| 9 |
+
"name": "Banana_PCB_locker <1>",
|
| 10 |
+
"partId": "RfDD",
|
| 11 |
+
"suppressed": false,
|
| 12 |
+
"type": "Part"
|
| 13 |
+
}
|
robot/assets/banana_pcb_locker.stl
ADDED
|
Binary file (69.5 kB). View file
|
|
|
robot/assets/bearing_roll.part
ADDED
|
@@ -0,0 +1,13 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"configuration": "default",
|
| 3 |
+
"documentId": "804927696f06d877f3f1803e",
|
| 4 |
+
"documentMicroversion": "fc8237658b0c3e9ada6f813b",
|
| 5 |
+
"elementId": "d6fcdccc8b25aaa256e7e213",
|
| 6 |
+
"fullConfiguration": "default",
|
| 7 |
+
"id": "MnzpqZwaCaK4P1f41",
|
| 8 |
+
"isStandardContent": false,
|
| 9 |
+
"name": "bearing_roll <1>",
|
| 10 |
+
"partId": "RKBD",
|
| 11 |
+
"suppressed": false,
|
| 12 |
+
"type": "Part"
|
| 13 |
+
}
|
robot/assets/bearing_roll.stl
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:2b30cbdb110c5cca7092a9b2658c9e899e294bf2df71635828858e1d1a20abfe
|
| 3 |
+
size 121084
|
robot/assets/bottom_head_shell.part
ADDED
|
@@ -0,0 +1,13 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"configuration": "default",
|
| 3 |
+
"documentId": "804927696f06d877f3f1803e",
|
| 4 |
+
"documentMicroversion": "fc8237658b0c3e9ada6f813b",
|
| 5 |
+
"elementId": "cceb83ef371fcd79b077022f",
|
| 6 |
+
"fullConfiguration": "default",
|
| 7 |
+
"id": "MlY/PdlncxN6Lc433",
|
| 8 |
+
"isStandardContent": false,
|
| 9 |
+
"name": "bottom_head_shell <2>",
|
| 10 |
+
"partId": "J/H",
|
| 11 |
+
"suppressed": false,
|
| 12 |
+
"type": "Part"
|
| 13 |
+
}
|
robot/assets/bottom_head_shell.stl
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:3ce9532854a712c93e00e0fd2bbc2ce6b1c45f9418fd29d6e82f6ad8af8fc1af
|
| 3 |
+
size 1048584
|
robot/assets/elec_rpi_robot_hat_pcb.part
ADDED
|
@@ -0,0 +1,13 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"configuration": "default",
|
| 3 |
+
"documentId": "804927696f06d877f3f1803e",
|
| 4 |
+
"documentMicroversion": "fc8237658b0c3e9ada6f813b",
|
| 5 |
+
"elementId": "c1085f5be782740f05cd18b2",
|
| 6 |
+
"fullConfiguration": "default",
|
| 7 |
+
"id": "MReezno9wlhkqhOa/",
|
| 8 |
+
"isStandardContent": false,
|
| 9 |
+
"name": "elec_RPI_Robot_HAT_PCB <1>",
|
| 10 |
+
"partId": "JFD",
|
| 11 |
+
"suppressed": false,
|
| 12 |
+
"type": "Part"
|
| 13 |
+
}
|
robot/assets/elec_rpi_robot_hat_pcb.stl
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:45b904bcb378161d274d313cd067d3967305db0bf22c0955530145e18cdd2cd8
|
| 3 |
+
size 942884
|
robot/assets/face_part.part
ADDED
|
@@ -0,0 +1,13 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"configuration": "default",
|
| 3 |
+
"documentId": "804927696f06d877f3f1803e",
|
| 4 |
+
"documentMicroversion": "fc8237658b0c3e9ada6f813b",
|
| 5 |
+
"elementId": "cceb83ef371fcd79b077022f",
|
| 6 |
+
"fullConfiguration": "default",
|
| 7 |
+
"id": "M/rAeuKSeRbB6zGHy",
|
| 8 |
+
"isStandardContent": false,
|
| 9 |
+
"name": "face_part <1>",
|
| 10 |
+
"partId": "RQBD",
|
| 11 |
+
"suppressed": false,
|
| 12 |
+
"type": "Part"
|
| 13 |
+
}
|
robot/assets/face_part.stl
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:30eaa56fc38129ba16e2b4e247ac419b0ae9e5b0fe9e748697f4838d338b952e
|
| 3 |
+
size 570684
|
robot/assets/foot_left.part
ADDED
|
@@ -0,0 +1,13 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"configuration": "default",
|
| 3 |
+
"documentId": "804927696f06d877f3f1803e",
|
| 4 |
+
"documentMicroversion": "48ccc523b8461dff097d59f9",
|
| 5 |
+
"elementId": "451317b8e3aacc7f88e8f8ed",
|
| 6 |
+
"fullConfiguration": "default",
|
| 7 |
+
"id": "MWwuFYNVBMata0ArD",
|
| 8 |
+
"isStandardContent": false,
|
| 9 |
+
"name": "foot_left <1>",
|
| 10 |
+
"partId": "RACD",
|
| 11 |
+
"suppressed": false,
|
| 12 |
+
"type": "Part"
|
| 13 |
+
}
|
robot/assets/foot_left.stl
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:5de2622a7b894e0fc9988dc6cff6579ee1dc818ffaddd0319f49cf5d5bd05587
|
| 3 |
+
size 996184
|
robot/assets/foot_right.part
ADDED
|
@@ -0,0 +1,13 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"configuration": "default",
|
| 3 |
+
"documentId": "804927696f06d877f3f1803e",
|
| 4 |
+
"documentMicroversion": "48ccc523b8461dff097d59f9",
|
| 5 |
+
"elementId": "451317b8e3aacc7f88e8f8ed",
|
| 6 |
+
"fullConfiguration": "default",
|
| 7 |
+
"id": "Mf+5HUbxEOCokX7m4",
|
| 8 |
+
"isStandardContent": false,
|
| 9 |
+
"name": "foot_right <1>",
|
| 10 |
+
"partId": "R8CL",
|
| 11 |
+
"suppressed": false,
|
| 12 |
+
"type": "Part"
|
| 13 |
+
}
|
robot/assets/foot_right.stl
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:8ffa894b29578edc78f5e982a7d89a8f5e4fa1dc27232b88c22a8a0a74cfbaa7
|
| 3 |
+
size 995784
|
robot/assets/hip_l.part
ADDED
|
@@ -0,0 +1,13 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"configuration": "default",
|
| 3 |
+
"documentId": "804927696f06d877f3f1803e",
|
| 4 |
+
"documentMicroversion": "fc8237658b0c3e9ada6f813b",
|
| 5 |
+
"elementId": "451317b8e3aacc7f88e8f8ed",
|
| 6 |
+
"fullConfiguration": "default",
|
| 7 |
+
"id": "M+QhBpslsJGbwRNpO",
|
| 8 |
+
"isStandardContent": false,
|
| 9 |
+
"name": "hip_l <1>",
|
| 10 |
+
"partId": "RODD",
|
| 11 |
+
"suppressed": false,
|
| 12 |
+
"type": "Part"
|
| 13 |
+
}
|
robot/assets/hip_l.stl
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:02bc777ce76a31b3d5c415188f8268b989f4eca57bc440a2900825ac459dec38
|
| 3 |
+
size 1048584
|
robot/assets/jaw.part
ADDED
|
@@ -0,0 +1,13 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"configuration": "default",
|
| 3 |
+
"documentId": "804927696f06d877f3f1803e",
|
| 4 |
+
"documentMicroversion": "fc8237658b0c3e9ada6f813b",
|
| 5 |
+
"elementId": "cceb83ef371fcd79b077022f",
|
| 6 |
+
"fullConfiguration": "default",
|
| 7 |
+
"id": "MaQI9NUJXlumL8U6p",
|
| 8 |
+
"isStandardContent": false,
|
| 9 |
+
"name": "jaw <2>",
|
| 10 |
+
"partId": "J6D",
|
| 11 |
+
"suppressed": false,
|
| 12 |
+
"type": "Part"
|
| 13 |
+
}
|
robot/assets/jaw.stl
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:65c300349113d3c6cd4a2cc587f76f7228115565a854492e42358ba8df71796a
|
| 3 |
+
size 495984
|
robot/assets/jaw_soft.part
ADDED
|
@@ -0,0 +1,14 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"configuration": "default",
|
| 3 |
+
"documentId": "804927696f06d877f3f1803e",
|
| 4 |
+
"documentMicroversion": "9306fb07735e782de209a230",
|
| 5 |
+
"documentVersion": "f0b9dc2ed2b65290c37daecc",
|
| 6 |
+
"elementId": "cceb83ef371fcd79b077022f",
|
| 7 |
+
"fullConfiguration": "default",
|
| 8 |
+
"id": "M4M8XlOWpIPvmIr8/",
|
| 9 |
+
"isStandardContent": false,
|
| 10 |
+
"name": "jaw_soft <1>",
|
| 11 |
+
"partId": "RaCD",
|
| 12 |
+
"suppressed": false,
|
| 13 |
+
"type": "Part"
|
| 14 |
+
}
|
robot/assets/jaw_soft.stl
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:61a426890f748713d45a9c0844149bcb0340d326f75295dcf7de2a4d768cbc85
|
| 3 |
+
size 336384
|
robot/assets/left_shell.part
ADDED
|
@@ -0,0 +1,13 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"configuration": "default",
|
| 3 |
+
"documentId": "804927696f06d877f3f1803e",
|
| 4 |
+
"documentMicroversion": "fc8237658b0c3e9ada6f813b",
|
| 5 |
+
"elementId": "d6fcdccc8b25aaa256e7e213",
|
| 6 |
+
"fullConfiguration": "default",
|
| 7 |
+
"id": "Mx9wCEl1i0Lb7LDyx",
|
| 8 |
+
"isStandardContent": false,
|
| 9 |
+
"name": "left_shell <1>",
|
| 10 |
+
"partId": "RiED",
|
| 11 |
+
"suppressed": false,
|
| 12 |
+
"type": "Part"
|
| 13 |
+
}
|
robot/assets/left_shell.stl
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:efc16f55a4c32d21d74bf834faba27346788f154e29b40850cbcc69fda2f2396
|
| 3 |
+
size 1048584
|
robot/assets/left_upper_leg.part
ADDED
|
@@ -0,0 +1,13 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"configuration": "default",
|
| 3 |
+
"documentId": "804927696f06d877f3f1803e",
|
| 4 |
+
"documentMicroversion": "49900cb439825f734c36e098",
|
| 5 |
+
"elementId": "d6fcdccc8b25aaa256e7e213",
|
| 6 |
+
"fullConfiguration": "default",
|
| 7 |
+
"id": "MCzyiRc5ESe5zlNkJ",
|
| 8 |
+
"isStandardContent": false,
|
| 9 |
+
"name": "left_upper_leg <1>",
|
| 10 |
+
"partId": "RoCD",
|
| 11 |
+
"suppressed": false,
|
| 12 |
+
"type": "Part"
|
| 13 |
+
}
|
robot/assets/left_upper_leg.stl
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:b84e46d681cb971029e421c252de85e2f31e8858abee610dc26cd18037ef0224
|
| 3 |
+
size 612584
|
robot/assets/leg.part
ADDED
|
@@ -0,0 +1,13 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"configuration": "default",
|
| 3 |
+
"documentId": "804927696f06d877f3f1803e",
|
| 4 |
+
"documentMicroversion": "fc8237658b0c3e9ada6f813b",
|
| 5 |
+
"elementId": "451317b8e3aacc7f88e8f8ed",
|
| 6 |
+
"fullConfiguration": "default",
|
| 7 |
+
"id": "MS3g6LBmQDJMHE7cl",
|
| 8 |
+
"isStandardContent": false,
|
| 9 |
+
"name": "leg <2>",
|
| 10 |
+
"partId": "R1ED",
|
| 11 |
+
"suppressed": false,
|
| 12 |
+
"type": "Part"
|
| 13 |
+
}
|