Skip to content

v0.1.8 - Native MjSpec Composition, Rigid G2 Grasps, and Unified Pick-Place

Choose a tag to compare

@DanielWang123321 DanielWang123321 released this 20 Nov 10:26
· 5 commits to master since this release

Runtime model composition with MuJoCo's native MjSpec.attach (19 atomic parts assembling all 46 named combinations and task scenes), in-package models and configs without setup.py, unified all-zero home / init / task start poses, shared five-arm pick-place layout with one-motion descent and rapid grasp lift, rigid anti-creep Gripper G2 contacts, and streamlined simulation docs. See CHANGELOG.md.

Install

pip install ufactory_mujoco-0.1.8-py3-none-any.whl   # attached below; Python 3.12–3.14
ufactory-mujoco pick-place --robot xarm6              # opens the viewer; add --headless without a display
python -c "import ufactory_mujoco; print(ufactory_mujoco.__version__)"

The wheel is a 117.2 MiB download (645.5 MiB of bundled models, meshes, task configs and licenses once installed) and requires MuJoCo >=4,<5.

Added

  • Native model assembly (ufactory_mujoco.compose): one MjSpec.attach mounting routine and the data in ufactory_mujoco/robots.py (recipes, tool mounting rules, combo keyframes, mount poses, task scene geometry) build all 46 named combinations from 19 atomic parts, plus custom stacks such as arm + base plate + F/T sensor + gripper + D435. Exported XML keeps authored values exactly (compiler.savecompiled disabled).
  • load_model(): compiles a model given by name, MJCF path, MjSpec or MjModel; SimRobot, XArmRobot, CollisionChecker, ArmDynamics and attach_payload accept the same inputs. TaskConfig.scene_spec() and config.arm_scene_spec() return scenes in memory.
  • CLI subcommands: ufactory-mujoco export-model (--list, custom composition flags, --copy-meshes), export-calibration and kinematics-check, alongside pick-place, box-pack, dynamics and the four dynamics-* entry points.
  • Task config presets: load_task_config(..., preset=...), get_task_preset() and list_task_presets(), backed by presets: in configs/default.yaml.

Changed

  • Models: models/ moved to ufactory_mujoco/models/ and holds 19 atomic part directories (39 XML files including xarm6/scene_obstacles.xml, 482 meshes, no symlinks). The five *_with_gripper combinations and the ten pick-place / box-pack scenes are generated; task props come from the presets. Mesh and material ids of base-plate and F/T + tool combinations are ordered differently; geometry, physics and rendering are unchanged.
  • Configs: configs/ moved to ufactory_mujoco/configs/; the ten task overlays are presets in default.yaml, which no longer repeat robot, scene or the default executor.
  • Packaging: setup.py and MANIFEST.in are removed; pyproject.toml ships models/ and configs/ as package data, so the wheel layout equals the source layout.
  • Model lookup: package runs load composites in memory; resolve_model_path(), resolve_arm_scene() and TaskConfig.scene_path (now computed on first use) export them to a cache keyed by installation and model name. resolve_arm_scene moved to ufactory_mujoco.config; top-level imports are unchanged.
  • Code: SimRobot and XArmRobot share their IK and planning helpers through RobotInterface; XARM_IP is resolved by one helper; robot-key aliases live in robots.py.
  • Tests and CI: the zero-warning compile check of every model runs in pytest; the CI example smoke step keeps only what pytest does not run; docs no longer hard-code model counts.
  • Keyframes and start pose: home is all-zero joints on every model. xArm 5/6/7 combinations, whose tools reach below the floor at zero, add an init keyframe equal to ready; SimRobot and 01_load_and_view.py start from init when present, otherwise from keyframe 0. SimRobot(start=...) takes arm joint angles or a TCP pose (pos, quat). Simulated pick-place and box-pack start every arm with the TCP at [300, 0, 300] mm, RPY = [180, 0, 0]°; hardware modes start from the measured pose. The xArm 6 combination ready now puts the G2 TCP exactly at (300, 0, 300) mm (it was 2 mm low).
  • Pick-place layout: all five arms take the cube from (300, 0) mm on the floor to (300, 300) mm and lift it to the same TCP height. xArm 5, xArm 7, UF850 and Lite 6 used to have their own spots, and the Lite 6 cube stood on a 20 mm stand. Lite 6 preset: flange_grasp_z_m 0.115 → 0.095, lift_z_m 0.24 → 0.21, approach_m 0.06 → 0.10.
  • Simulation docs and --help: examples/simulation/README.md and README_zh.md are about a quarter of their former length: one viewer command per example, model names as a pattern, and short start-pose, real-robot and viewer sections. The option tables are gone; --help now also describes --executor, --cycles and --speed of pick-place / box-pack and --robot, --samples and --seed of dynamics, and keeps the line breaks of the task descriptions. Commands meant for watching the 3D view no longer pass --headless.

Fixed

  • Gripper G2 grasps: the finger pads use rigid contacts that take priority over the object's, and the linkage couplings are stiff, so the force-limited servo stops at the object's surface (0.5 mm instead of 3.5 mm penetration per side) with the full calibrated pinch force. Task scenes enable MuJoCo's noslip pass, so a held cube no longer creeps out of the fingers (6.4 mm slip during transport, now 0.02 mm).
  • Pick-place timing: the arm descends from the task start, which is above the cube, to the grasp in one straight motion without stops (it used to stop above the cube). The jaw closes as soon as the TCP reaches the grasp height, and the lift starts as soon as both pads hold (about 0.45 s after closing instead of 2.5 s).

Breaking (Internal Submodule Paths)

Top-level imports (from ufactory_mujoco import ...) are unchanged, and load_model was added. Callers importing internal submodules directly should migrate as follows:

Removed internal path (0.1.7) Replacement
ufactory_mujoco.model_paths ufactory_mujoco.compose (resolve_model_path, available_models), ufactory_mujoco.config (resolve_arm_scene), ufactory_mujoco.robots (registry data)
ufactory_mujoco.ik ufactory_mujoco.kinematics
ufactory_mujoco.collision, ufactory_mujoco.path_planning ufactory_mujoco.planning
ufactory_mujoco.task_geometry ufactory_mujoco.preflight
ufactory_mujoco.g2_model, ufactory_mujoco.g2_controller ufactory_mujoco.g2
ufactory_mujoco.bio_g2_model, ufactory_mujoco.bio_g2_controller ufactory_mujoco.bio_g2
ufactory_mujoco.tasks.{_reporting,_motion,_command} ufactory_mujoco.tasks._common
ufactory_mujoco.dynamics.{poses,runtime} ufactory_mujoco.dynamics.profiles
ufactory_mujoco.dynamics.{reference,probe} ufactory_mujoco.dynamics.backends
ufactory_mujoco.dynamics.plot ufactory_mujoco.dynamics.report
ufactory_mujoco.data/ resources ufactory_mujoco/models/, ufactory_mujoco/configs/; licenses in .dist-info/licenses/

Removed

  • models/*_with_gripper/ (15 XML files, 10 symlinks) and the 41 other static combination directories; configs/{pick_place,box_pack}/.
  • setup.py, MANIFEST.in, _build_support.py, scripts/gen_kinematics_params.py (use ufactory-mujoco export-calibration).
  • dynamics-hardware-check --include-stress and the stress pose plumbing; the stress pose set was always empty.
  • BioGripperG2Model, the test-only Gripper G2 joint constants (G2_JOINT_NAMES, G2_ARMATURE, G2_DAMPING, G2_FRICTIONLOSS, G2_MIMIC_SOLREF, G2_MIMIC_SOLIMP), five unused aliases in dynamics.analysis, ft_sensor.SENSOR_INTERNAL_HZ, xarm6_default_dynamics_configs and HoldTimeSeriesSample.

Verified

  • Local 3-environment sequential acceptance (py312, py313, py314): ruff check ., git diff --check, 39 static XML + 46 composed model compilation (0 errors, 0 warnings across all 3 envs), full pytest tests (py312: 528 passed, 833 subtests passed; py313: 528 passed, 833 subtests passed including Pinocchio checks; py314: 521 passed, 7 skipped, 828 subtests passed), CI headless example smoke suite (SMOKE PASS across all 3 envs), 30 golden task reports per env (30/30 byte-identical across py312/py313/py314; all 30 reports passing; expected config_sha256 updates only on xarm5/xarm7/uf850/lite6 pick-place from the shared layout), twine check --strict, distribution verification (39 static models, 46 composed models, 482 meshes, 2 configs / 11 task presets, 7 licenses), and isolated wheel acceptance (52 commands PASS across all 3 envs).
  • GitHub Actions CI run #44714560371: all 8 jobs passed (lint, build, test and installed across Python 3.12, 3.13, 3.14 with MuJoCo 4).

SHA-256

4a6e74b6aa40d90932ae09002231814c03500615b1adb7ded795599e2a083657  ufactory_mujoco-0.1.8-py3-none-any.whl
2f442acc48368261a9df33eef8be8f3b9bbdfa827e61a59c123a5175f7723f44  ufactory_mujoco-0.1.8.tar.gz