Repository navigation
v0.1.8 - Native MjSpec Composition, Rigid G2 Grasps, and Unified Pick-Place
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): oneMjSpec.attachmounting routine and the data inufactory_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.savecompileddisabled). load_model(): compiles a model given by name, MJCF path,MjSpecorMjModel;SimRobot,XArmRobot,CollisionChecker,ArmDynamicsandattach_payloadaccept the same inputs.TaskConfig.scene_spec()andconfig.arm_scene_spec()return scenes in memory.- CLI subcommands:
ufactory-mujoco export-model(--list, custom composition flags,--copy-meshes),export-calibrationandkinematics-check, alongsidepick-place,box-pack,dynamicsand the fourdynamics-*entry points. - Task config presets:
load_task_config(..., preset=...),get_task_preset()andlist_task_presets(), backed bypresets:inconfigs/default.yaml.
Changed
- Models:
models/moved toufactory_mujoco/models/and holds 19 atomic part directories (39 XML files includingxarm6/scene_obstacles.xml, 482 meshes, no symlinks). The five*_with_grippercombinations 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 toufactory_mujoco/configs/; the ten task overlays are presets indefault.yaml, which no longer repeatrobot,sceneor the defaultexecutor. - Packaging:
setup.pyandMANIFEST.inare removed;pyproject.tomlshipsmodels/andconfigs/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()andTaskConfig.scene_path(now computed on first use) export them to a cache keyed by installation and model name.resolve_arm_scenemoved toufactory_mujoco.config; top-level imports are unchanged. - Code:
SimRobotandXArmRobotshare their IK and planning helpers throughRobotInterface;XARM_IPis resolved by one helper; robot-key aliases live inrobots.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:
homeis all-zero joints on every model. xArm 5/6/7 combinations, whose tools reach below the floor at zero, add aninitkeyframe equal toready;SimRobotand01_load_and_view.pystart frominitwhen present, otherwise from keyframe 0.SimRobot(start=...)takes arm joint angles or a TCP pose(pos, quat). Simulatedpick-placeandbox-packstart every arm with the TCP at[300, 0, 300]mm,RPY = [180, 0, 0]°; hardware modes start from the measured pose. The xArm 6 combinationreadynow 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_m0.115 → 0.095,lift_z_m0.24 → 0.21,approach_m0.06 → 0.10. - Simulation docs and
--help:examples/simulation/README.mdandREADME_zh.mdare 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;--helpnow also describes--executor,--cyclesand--speedofpick-place/box-packand--robot,--samplesand--seedofdynamics, 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(useufactory-mujoco export-calibration).dynamics-hardware-check --include-stressand 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 indynamics.analysis,ft_sensor.SENSOR_INTERNAL_HZ,xarm6_default_dynamics_configsandHoldTimeSeriesSample.
Verified
- Local 3-environment sequential acceptance (
py312,py313,py314):ruff check .,git diff --check,39static XML +46composed model compilation (0errors,0warnings across all 3 envs), fullpytest tests(py312:528 passed, 833 subtests passed;py313:528 passed, 833 subtests passedincluding Pinocchio checks;py314:521 passed, 7 skipped, 828 subtests passed), CI headless example smoke suite (SMOKE PASSacross all 3 envs),30golden task reports per env (30/30byte-identical acrosspy312/py313/py314; all30reports passing; expectedconfig_sha256updates only onxarm5/xarm7/uf850/lite6pick-place from the shared layout),twine check --strict, distribution verification (39static models,46composed models,482meshes,2configs /11task presets,7licenses), and isolated wheel acceptance (52commandsPASSacross all 3 envs). - GitHub Actions CI run #44714560371: all 8 jobs passed (
lint,build,testandinstalledacross Python3.12,3.13,3.14with MuJoCo 4).
SHA-256
4a6e74b6aa40d90932ae09002231814c03500615b1adb7ded795599e2a083657 ufactory_mujoco-0.1.8-py3-none-any.whl
2f442acc48368261a9df33eef8be8f3b9bbdfa827e61a59c123a5175f7723f44 ufactory_mujoco-0.1.8.tar.gz