Skip to content

About

xArm 6 MuJoCo simulation: joint control, Cartesian IK, passive viewer

Resources

Code of conduct

Contributing

Security policy

Stars

1 star

Watchers

0 watching

Forks

Repository files navigation

ufactory_mujoco

Python MuJoCo License CI

English | 中文 · Changelog

MuJoCo simulation of UFACTORY robot arms (Lite 6, xArm 5/6/7, UF850) and their accessories, with kinematics, dynamics, motion planning, scripted manipulation tasks, and a safety-gated interface to real xArm controllers.

pick-place task box-pack task AL0700 linear motor
pick-place across grippers (G2 / Robotiq 2F-85 / 2F-140) box-pack with preflight AL0700 linear motor and drag chain

Features

  • Models: 5 arms, 7 end effectors (UFACTORY and Robotiq), 4 depth cameras, AI1500 F/T sensor, base plates, AL0700 linear motor; combinations assembled at runtime with MjSpec.attach, standalone MJCF via export-model.
  • Kinematics and planning: FK, Jacobians, DLS IK, quintic/LSPB/spline and Cartesian trajectories, collision checks, RRT-Connect.
  • Dynamics: mass matrix, gravity/Coriolis, inverse/forward dynamics, payloads, static torque checks against real controllers (validation).
  • Tasks: cube pick-and-place and box packing on all five arms, with preflight and JSON reports.
  • Real robot: read-only by default; motion needs a per-unit calibration, an sdk-sim replay and --confirm-real.

Quick Start

Requires Python 3.12–3.14 and MuJoCo 4.x (see Installation).

git clone --depth 1 https://github.com/DanielWang123321/ufactory_mujoco.git && cd ufactory_mujoco
python -m pip install -e .
python examples/simulation/01_load_and_view.py --model xarm6_with_gripper --pose ready
ufactory-mujoco box-pack --robot xarm7 --cycles 3

Add --headless when no display is available; on macOS start viewer scripts with mjpython.

Supported Models

Arm End effectors & sensors Mounting pick-place / box-pack / dynamics
lite6 lite6_gripper, lite6_vacuum_gripper, d435 lite6_base_plate tasks with lite6_gripper, dynamics yes
xarm5, xarm6, xarm7, uf850 gripper_g2, bio_gripper_g2, robotiq_2f_85, robotiq_2f_140, vacuum_gripper, ft_sensor, depth cameras xarm_base_plate, uf850_base_plate, al0700 (xArm 5/6/7) tasks default to gripper_g2 (task grippers), dynamics yes

Run ufactory-mujoco export-model --list for every model name; see Models and Limitations and examples/simulation/README.md.

Installation

Requires Python 3.12–3.14 and MuJoCo 4.x; clone with --depth 1 and install with python -m pip install -e .. See Installation for the dependency table, requirements-lock.txt, upgrading from MuJoCo 3, self-contained wheels, and platform notes.

Command Line

ufactory-mujoco pick-place --robot xarm6
ufactory-mujoco box-pack --robot lite6 --cycles 3
ufactory-mujoco dynamics --robot all --headless --report reports/dynamics.json
ufactory-mujoco export-model xarm6_with_ft_sensor_and_gripper --out-dir exported/xarm6_ft_g2

Run COMMAND --help for options; see Command-Line Tasks for calibration export, F/T sensor control, hardware modes, --base-plate, environment variables, and exit codes.

Documentation

Topic Document
Installation, dependencies, MuJoCo 3→4 upgrade, wheels, platform notes docs/installation.md (中文)
Command-line tasks, real-robot flags, task grippers, environment variables docs/cli.md (中文)
Supported models, runtime dynamics injection, limitations docs/models.md (中文)
Hardware torque validation and real-robot task runs docs/validation.md (中文)
Simulation examples 01–12, model names, start poses, viewer controls examples/simulation/README.md (中文)
Project structure, contributing, security policy, code of conduct CONTRIBUTING.md, SECURITY.md, CODE_OF_CONDUCT.md
Release history CHANGELOG.md

Running Tests

python -m pip install -e ".[test]"
python -m pytest tests
ruff check .                      # lint as in CI (pip install ruff)

Tests that need optional packages (trimesh, pinocchio, DracoPy) or maintainer-only source snapshots are skipped automatically when absent.

License

Code: MIT (see LICENSE). Robot and accessory models include assets derived from UFACTORY (xarm_ros, BSD-3-Clause; ufactory_genesis, MIT; ufactory_robot_viewer, BSD-3-Clause), Robotiq ROS (robotiq-ros, BSD-3-Clause), Intel RealSense ROS (realsense-ros, Apache-2.0), and published Orbbec / Stereolabs / UFACTORY mechanical CAD; see NOTICE.

About

xArm 6 MuJoCo simulation: joint control, Cartesian IK, passive viewer

Resources

Code of conduct

Contributing

Security policy

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Used by

Contributors

Languages