MIT License

项目介绍

ian-chuang/Manipulator-Mujoco 是一个托管在 GitHub 上的开源项目,主要使用 Python 编写,采用 MIT License 许可证,目前获得 304 个 Star、32 次 Fork。

仓库全名
ian-chuang/Manipulator-Mujoco
开源许可证
MIT License
Star 数
304
Fork 数
32
未关闭 Issue
2

README 摘要

Manipulator-Mujoco Manipulator-Mujoco is a template repository that simplifies the setup and control of manipulators in Mujoco. It provides a generic operational space controller that can work with any robot arm. It offers a Gymnasium base environment that can be tailored for reinforcement learning tasks. This repository is built with dmcontrol, providing effortless configuration for different Mujoco environments…

完整内容见 GitHub 原始 README 或本页 。

常见问题

Manipulator-Mujoco 用什么语言开发?

主要使用 Python 编写,采用 MIT License 许可证,目前有 304 个 Star。

Manipulator-Mujoco 可以免费商用吗?

仓库采用 MIT License 许可证,可免费使用与修改,商业使用请遵守许可证条款(例如保留版权声明与许可声明)。

如何获取 Manipulator-Mujoco 的源码?

可以直接克隆仓库:git clone https://github.com/ian-chuang/Manipulator-Mujoco.git,默认分支为 main;安装与运行步骤见仓库 README。

Manipulator-Mujoco 最近还在维护吗?

仓库最近一次更新为 2024年12月10日,当前有 2 个未关闭 Issue;Star 数为 304,可作为社区活跃度的参考。

关于

Base Mujoco Gymnasium environment for easily controlling any robot arm with operational space control. Built with dm-control PyMJCF for easy configuration.

描述取自 GitHub 官方 API,中文内容由 GitRead 中文社区 编辑团队整理。

语言占比

Python

贡献者

README

Manipulator-Mujoco

a_bot GIF b_bot GIF

Manipulator-Mujoco is a template repository that simplifies the setup and control of manipulators in Mujoco. It provides a generic operational space controller that can work with any robot arm. It offers a Gymnasium base environment that can be tailored for reinforcement learning tasks. This repository is built with dm_control, providing effortless configuration for different Mujoco environments.

Supported Robots

Currently, the following robot arms and grippers are supported in this repository:

Robot Arms

  1. Aubo i5
  2. UR5e

Grippers

  1. DH Robotics AG95

Installation

To get started, follow these steps to install the repository:

  1. Clone this repository to your local machine:

    git clone https://github.com/ian-chuang/Manipulator-Mujoco.git
    
  2. Navigate to the root directory of the repository:

    cd Manipulator-Mujoco
    
  3. Install the repository in editable mode:

    pip install -e .
    

Demos

Explore the capabilities of Manipulator-Mujoco with the provided demos located in the /demo folder:

Aubo i5 Arm with AG95 Gripper

To run the demo for the Aubo i5 arm with the AG95 gripper, execute:

python aubo_i5_demo.py

UR5e Arm

To run the demo for the UR5e arm, execute:

python ur5e_demo.py

In the demos, you can manipulate the arm by double-clicking and selecting the target red box mocap. Hold the Ctrl key and left-click and drag to rotate or Ctrl key and right-click and drag to translate. The arm will utilize operational space control to follow the target mocap.

Setting Up Your Own Environment

If you want to create your own environment, follow the structure defined in manipulator_mujoco/envs. Here’s a simplified example of how to set up an environment:

# create checkerboard floor arena
self._arena = StandardArena()

# create mocap target that OSC will try to follow
self._target = Target(self._arena.mjcf_model)

# ur5e arm
self._arm = Arm(
    xml_path=os.path.join(
        os.path.dirname(__file__),
        '../assets/robots/ur5e/ur5e.xml',
    ),
    eef_site_name='eef_site',
    attachment_site_name='attachment_site'
)

# attach arm to arena
self._arena.attach(
    self._arm.mjcf_model, pos=[0, 0, 0], quat=[0.7071068, 0, 0, -0.7071068]
)

# generate model
self._physics = mjcf.Physics.from_mjcf_model(self._arena.mjcf_model)

Operational space control setup is designed to be straightforward:

# set up OSC controller
self._controller = OperationalSpaceController(
    physics=self._physics,
    joints=self._arm.joints,
    eef_site=self._arm.eef_site,
    min_effort=-150.0,
    max_effort=150.0,
    kp=200,
    ko=200,
    kv=50,
    vmax_xyz=1.0,
    vmax_abg=2.0,
)

Before running physics.step(), simply calculate the target pose and run the OSC controller to move to the target pose:

target_pose = calculate_target_pose_for_OSC()  # [x, y, z, qx, qy, qz, qw]

# run OSC controller to move to target pose
self._controller.run(target_pose)

# step physics
self._physics.step()

The OperationalSpaceController and Arm classes handle the details of tracking the mjcf element IDs, eliminating the need to specify joint names or actuator names. It should work seamlessly with any robot arm model, including various joint types, as long as the actuators are removed from the model since the controller automatically applies torques to each joint.

Inspiration

This repository drew inspiration from the following repositories:

Feel free to explore, experiment, and contribute to this repository as you work on your robotic manipulation tasks in Mujoco with operational space control.

评论

暂无评论