Skip to content

v0.1.7 - AI1500 F/T Sensor, Mounting Base Plates, and Safety/Planning Hardening

Choose a tag to compare

@DanielWang123321 DanielWang123321 released this 19 Nov 02:35
· 17 commits to master since this release

AI1500 6-axis force/torque sensor (ft_sensor), official mounting base plates (*_base_plate), hardware safety gate hardening, Cartesian SLERP / trajectory planning fixes, and API/governance improvements across 65 model directories (141 MJCF XMLs, 482 canonical meshes). See CHANGELOG.md.

Install

pip install ufactory_mujoco-0.1.7-py3-none-any.whl   # attached below; Python 3.12–3.14
ufactory-mujoco pick-place --robot xarm6 --headless
python -c "import ufactory_mujoco; print(ufactory_mujoco.__version__)"

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

Added

  • Force/Torque Sensor (ft_sensor): 13 new MJCF model directories (ft_sensor plus {xarm5,xarm6,xarm7,uf850}_with_ft_sensor, *_with_ft_sensor_and_gripper, and *_with_ft_sensor_and_vacuum_gripper) using 15 double-sided visual OBJs (inertia="shell"), stainless-steel adapter ring (part_02) and fastener materials, <headlight specular="0.55 0.57 0.6"/> scene lighting, and a convex collision STL hull (total mass=0.6 kg split into 0.45 kg base + 0.15 kg floating output head at CoM +3.87 mm ahead of the +32.0 mm sensing site ft_sensor_site, +58.6 mm output face, timestep="0.001").
  • Sensor Reader & SimRobot / XArmRobot Integration: ufactory_mujoco.ft_sensor (AI1500Reader, FTSensorReader, SensorReading, apply_ft_sensor_wrench, clear_ft_sensor_wrench, is_hardware_ft_sensor_enabled, read_hardware_ft_sensor_config, read_hardware_ft_sensor), re-exported from ufactory_mujoco, providing 200 Hz (5-step) IEEE-754 fp32 sampling, real-hardware +applied polarity, dual raw / ext (dynamically gravity- and zero-compensated) channels, optional hardware-calibrated noise (noise_std="calibrated", RAW_NOISE_STD, EXT_NOISE_STD), and ±400 N / ±20 Nm overrange / ±600 N / ±30 Nm overload tracking. SimRobot attaches AI1500Reader automatically (has_ft_sensor, ft_sensor, ft_sensor_reading, get_ft_sensor_reading(), reset_ft_sensor(), zero_ft_sensor()); XArmRobot adds read-only F/T config/reading APIs (avoiding SERVO_R16B state-reset queries) and fail-closed bare-arm preflight/motion gates across XArmRobot, tasks.dynamics, and dynamics CLI when a controller reports an enabled F/T sensor.
  • Simulation Example 11: examples/simulation/11_force_torque_sensor.py demonstrating dual-channel (raw/ext) baseline and +applied wrench verification across all 13 ft_sensor models plus strictly read-only live hardware F/T sampling (--ip <ROBOT_IP> --gripper ft_sensor).
  • Mounting Base Plates (base_plate): 8 new MJCF model directories ({xarm,uf850,lite6}_base_plate and {xarm5,xarm6,xarm7,uf850,lite6}_with_base_plate) with CAD-derived visual STLs (group=2), hole-filled convex collision prism STLs (group=3), top mounting planes at z=0, scene floors at -thickness (-8 / -10 / -5 mm), long edges parallel to base Y (with the two-chamfered long side of xarm_base_plate facing base +X), and least-squares mounting-hole alignments (< 0.01 mm fit residual).
  • Public API, Hardware Telemetry & Safety Controls: exported __version__ ("0.1.7"), quat_error, and clear_ft_sensor_wrench from ufactory_mujoco; exposed SimRobot public helpers (step, step_hook, n_arm_actuators, has_viewer, viewer_is_running, sync_viewer, gripper_actuator_id, gripper_ctrl_range, gripper_qpos, gripper_wait_duration); added ControllerConfigSnapshot / restore_controller_config(), --no-return-home, and --gripper hardware preflight support across dynamics-hardware-check and ufactory-mujoco dynamics; and added real-gripper telemetry fields (gripper_actuated, commanded_grasp_gap_m, measured_grasp_gap_m, object_grasped_inferred) to --mode real task reports.
  • Licenses & Tests: added licenses/ufactory_robot_viewer.LICENSE (BSD-3-Clause) and Sections 5–6 in NOTICE; added tests/test_ft_sensor.py, tests/test_base_plates.py, and regression tests across test_hardware_safety.py, test_dynamics_suite.py, test_trajectory.py, test_kinematics.py, test_preflight.py, and test_installable_tasks.py.

Changed

  • Updated pyproject.toml version to 0.1.7 with [tool.pytest.ini_options] pythonpath = ["."] and bumped ufactory_mujoco/__init__.py:__version__ to "0.1.7", updated ufactory_mujoco/robots.py ({xarm5,xarm6,xarm7,uf850} F/T gripper registries while keeping _PICK_PLACE_DIRS unchanged), and updated tests/test_all_models.py (65 models and ft_sensor* downward ready checks) and tests/test_converted_assets.py (DOUBLE_SIDED_COUNT = 51).
  • Modularized ufactory_mujoco/dynamics/cli.py:cli_hardware_check (reducing cyclomatic complexity and deduplicating DynamicsSample construction), added DOF-mismatch validation (exit 2) in dynamics-report-compare, added a 141-XML zero-warning compilation step in .github/workflows/ci.yml, and updated scripts/accept_installed.py (>= 141 XMLs, >= 482 meshes, 7 licenses, read-only checks for xarm6_with_ft_sensor_and_gripper / xarm6_with_base_plate, and directory/file permission restoration in finally).
  • Updated simulation examples (02, 03, 04, 06, 07, 09, 11) to use public SimRobot interfaces, CWD-independent MODELS_ROOT paths, explicit CLI argument validation, and non-zero exit self-checks; updated README.md, README_zh.md, examples/simulation/README.md, and examples/simulation/README_zh.md.
  • Note on golden task reports: all 10 pick-place and box-pack --dry-run preflight reports are byte-identical to 0.1.6, and all 30 task reports remain byte-identical across Python 3.12/3.13/3.14 and MuJoCo 4.0.0/4.0.1; the 20 simulation task reports reflect minor numeric refinement (<= 0.5 mm, e.g. xarm7 pick-place place_error_mm improved from 3.02 mm to 2.65 mm) from the body-frame SLERP and deterministic qpos0 IK seeding fixes below.

Fixed

  • Hardware safety gates: tasks.dynamics hardware preflight and shadow streams now start from measured q_now instead of all-zero home and block unmodeled non-zero tcp_load/tcp_offset or enabled F/T sensors when --gripper is omitted; dynamics-hardware-check --hold-current-only is strictly read-only (mutually exclusive with --dry-run/--clear-tcp-offset); Ctrl-C halts immediately via stop() (set_state(4)) without unpreflighted return_home, and normal exit runs collision preflight before returning home; dynamics-sim-collision-check requires --confirm-real; XArmRobot validates joint limits, single-step servo deltas, and trajectory start/peak-velocity bounds, flushes sdk-sim queues before leaving simulation mode, and stops motion cleanly in close(); kinematics_validation avoids firmware get_inverse_kinematics() queries that could latch warn_code=14; and preflight checks non-base floor contacts instead of globally ignoring "world".
  • Planning & kinematics: plan_cartesian_line now uses body-frame right-multiplied conj(quat0) * quat1 SLERP (eliminating world-frame orientation drift), copies and normalizes input quaternions without mutating caller arrays, and marks adjacent IK jumps (> 0.5 rad) with ok=False; plan_ptp_quintic and plan_ptp_lspb reject non-finite parameters and infeasible duration < t_min; JointTrajectory validates non-empty finite non-decreasing timestamps; manipulability restricts singular-value calculation to ancestor-chain DOFs so mounted grippers and free bodies no longer force zero manipulability; SimRobot with q=None syncs data.qpos and plan_cartesian_trajectory slices output to n_arm columns; _flange_tcp_offset seeds IK deterministically at model.qpos0; and preflight refines collision stepping (_CHECK_RES = 0.02 rad).
  • API & CLI validation: Gripper G2 / Bio Gripper G2 automatically resume their last positive speed after speed_percent=0 pause commands; SimRobot and ArmDynamics reject NaN/Inf and out-of-range inputs; config.py rejects bool values in numeric YAML fields and merges multi-level overlays; and task CLIs return exit code 2 on --robot vs --config conflicts, task/scene mismatches, or hardware dynamics --robot all.

Hardware Validation

  • xArm 6 + Gripper G2 + 8 mm base plate (firmware v2.8.0, Python 3.14.6, MuJoCo 4.0.1): read-only kinematics_validation, --hold-current-only, and dynamics --gripper gripper_g2 --mode real-read-only (max static residual 0.658 Nm, err/warn = 0/0); sdk-sim dynamics, pick-place, and dynamics-sim-collision-check (<= 0.000004 rad physical drift, full controller load/offset/collision config restoration); single-cycle --mode real dynamics (arrival_error_rad = 0.0) and empty-grasp pick-place (21.94 mm closed / 83.8 mm open, final_joint_error_rad = 4.94e-07, err/warn = 0/0); and compound-rotation plan_cartesian_line round-trip (+80 mm Y, +50 mm Z, +0.35 rad Z + 0.15 rad X: sdk-sim 2e-06 rad drift, --mode real 0.1882 mm / 0.0435° outbound and 0.1909 mm / 0.044° return arrival error, 0.0007 mm max lateral deviation, err/warn = 0/0).
  • xArm 6 + AI1500 F/T Sensor (firmware v2.8.0, Python 3.14.6, MuJoCo 4.0.1): 6-pose static gravity calibration (0.150 kg floating head mass, <= 0.013 N / 0.00124 Nm static residual, 200 Hz IEEE-754 fp32 polling, calibrated RAW_NOISE_STD/EXT_NOISE_STD); bare-arm --mode sdk-sim blocked (exit 1); --gripper ft_sensor real-read-only (1.758 Nm max static delta) and sdk-sim (272 samples, 7.43e-5 rad max joint error, 0.043 mm max EE error, 8e-6 rad physical drift); and 11_force_torque_sensor.py --ip read-only live sampling (86 samples over 0.5 s, err/warn = 0/0, state=2 preserved).

Verified

  • Local 3-environment sequential acceptance (py312, py313, py314): ruff check ., git diff --check, 141 XML compilation (0 errors, 0 warnings across all 3 envs), full pytest tests (py312: 517 passed, 724 subtests passed; py313: 517 passed, 724 subtests passed including Pinocchio checks; py314: 510 passed, 7 skipped, 719 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 10 dry-run reports byte-identical to 0.1.6; all 20 simulation reports passing with <= 0.5 mm refinement from planning fixes), twine check --strict, distribution verification (141 models, 482 meshes, 12 configs, 7 licenses), and isolated wheel acceptance (47 commands PASS across all 3 envs).
  • GitHub Actions CI run #44441069703: all 8 jobs passed (lint, build, test and installed across Python 3.12, 3.13, 3.14 with MuJoCo 4).

SHA-256

6cd198b304d161a55197a0f8ade21972f0359bb070e1ac099fb907b37fb2299f  ufactory_mujoco-0.1.7-py3-none-any.whl
4deb8d5648548a033f1e46c0594e0390f61a653ebc824858b806d2ac6fa08f0f  ufactory_mujoco-0.1.7.tar.gz