Skip to content

v0.0.9 - Calibrated Gripper G2 Dynamics, G2 v2 Assets & Pure-PPO RL Pick-and-Place v2

Choose a tag to compare

@DanielWang123321 DanielWang123321 released this 30 Oct 07:47
· 62 commits to master since this release

Release v0.0.9

Delivers calibrated Gripper G2 4-bar linkage kinematics and speed/force hybrid servo dynamics, synchronizes v2 Gripper G2 3D visual/collision assets across standalone and multi-arm models, upgrades RL tabletop pick-and-place to recursive model-hash contract v2 (70-dim observations, randomized spawns), and ships pure-PPO training from scratch achieving 100% (64/64) held-out evaluation success.


🚀 Key Features & Highlights

1. Calibrated Gripper G2 Dynamics, 4-Bar Linkage & Speed/Force Control (ufactory_mujoco/g2_model.py, g2_controller.py, grippers.py, sim_robot.py)

  • Non-Linear 4-Bar Linkage & Force Lookup (G2LinkageGeometry, ForceCurve, G2Model): Exact drive-angle to jaw-gap mapping (0.0572..0.8651 rad $\leftrightarrow$ 84..0 mm, -25.68 mm closed-finger inward offset, 99.80 mm/rad reference Jacobian at raw_position=230), empirical $7 \times 5$ speed-current static pinch-force lookup (15.86..70.20 N / 1.58..7.01 Nm), and SDK pulse/RPM conversion helpers.
  • Rate-Limited PI+PD Hybrid Servo (G2Controller): Pure-NumPy scalar and batched position-torque servo (kp=40, kv=5, ki=40, trajectory parity < 1e-10 against ufactory_genesis), integrated into SimRobot, XArmRobot, RobotInterface, and examples/simulation/04_gripper_control.py (--speed-percent, --force-percent).

2. Gripper G2 v2 3D Assets & Multi-Arm Synchronization (models/gripper_g2/, models/*_with_gripper/, scripts/build_all_mjcf.py)

  • SHA-256 Locked Source Snapshot (models/gripper_g2/source/): Preserves upstream 7-part Draco GLBs, 7 collision STLs, URDFs, and 85-pose SolidWorks reference table (snapshot.json).
  • Canonical Flange-Aligned Meshes & Combos: Updated visual OBJs, collision STLs, joint Z offsets (outer knuckle Z=0.0606 m, inner knuckle Z=0.075602 m), and TCP (Z=0.1735 m) across gripper_g2 and xarm5 / xarm6 / xarm7 / uf850 gripper combinations, verified to < 0.005 mm across all 85 CAD reference poses.

3. RL Pick-and-Place Model-Hash Contract v2 & Pure-PPO from Scratch (ufactory_mujoco/rl/, scripts/train_pick_place_rl.py, examples/rl/pick_place/)

  • Recursive Model-Hash Contract v2 (ufactory_mujoco/rl/model_hash.py, artifacts.py): Fingerprints the scene, recursively included MJCFs, and referenced mesh files (runtime_model_sha256: bfd917fb...35a8c, invariant to packaged wheel meshdir rewrites) and enforces contract matching during training, evaluation, and rollout; adds scripts/migrate_pick_place_checkpoint.py for evaluated legacy checkpoint migration/rejection.
  • Pure-PPO Pick-and-Place from Scratch (pick_place_env.py, ik.py): Fast inner-loop DLS IK (mj_kinematics + mj_comPos), 50 Hz calibrated G2Controller (50% speed / 50% force), 70-dim phase-free contact/clearance observation space, randomized spawn domain ($x \in [0.30, 0.50]\text{ m}$, $y \in [-0.20, 0.20]\text{ m} \to [0.30, 0.30]\text{ m}$), and GroupedSubprocVecEnv multi-worker pure-PPO training with zero expert demonstrations or behavior-cloning warmstart.
  • 64-Episode Held-Out Benchmark (--seed 18001): Both the pure-PPO v2 policy (9.0M steps) and PickPlaceExpert achieve 100.0% (64/64) success, with pure-PPO max touchdown press 0.124 mm (<= 1.0 mm), max release height 0.105 mm (<= 3.0 mm), mean placement error 4.71 mm (<= 20.0 mm), and 0% collision, drag, tilt, or high-release failures.

✅ Verification Summary

  • Python 3.12 / 3.13 / 3.14 Test Matrix: 280 core unit tests, 100 calibrated G2 / G2 v2 asset / model-contract pytest checks, 44 RL tests (test_reach_env.py + test_pick_place_rl.py), and 24 CI headless example smoke runs (+ 1 expected failure) all passing.
  • Self-Contained Packaging & Read-Only Wheel Acceptance: Rebuilt sdist & wheel (48 MJCF XMLs, 135 meshes, 11 YAML configs, 5 license texts) passing twine check, check_distribution.py, 44 checkout-free read-only CLI checks, and bundled runtime_model_sha256 verification across Python 3.12, 3.13, and 3.14.