Skip to content

Commit 13cfbce

Browse files
chore: release v0.0.2
1 parent 5133830 commit 13cfbce

7 files changed

Lines changed: 370 additions & 48 deletions

File tree

README.md

Lines changed: 36 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -1,34 +1,36 @@
1+
**Language**: [English](README.md) | [简体中文](README.zh-CN.md)
2+
13
# MotrixLab
24

35
![GitHub License](https://img.shields.io/github/license/Motphys/MotrixLab)
46
![Python Version](https://img.shields.io/badge/python-3.10-blue)
57

6-
`MotrixLab` 是一个基于 [MotrixSim](https://github.com/Motphys/motrixsim-docs) 仿真引擎的强化学习框架,专为机器人仿真和训练设计。该项目提供了一个完整的强化学习开发平台,集成了多种仿真环境和训练框架。
8+
`MotrixLab` is a reinforcement learning framework based on the [MotrixSim](https://github.com/Motphys/motrixsim-docs) simulation engine, designed specifically for robot simulation and training. This project provides a complete reinforcement learning development platform that integrates multiple simulation environments and training frameworks.
79

8-
## 项目概述
10+
## Project Overview
911

10-
该项目分为两个核心部分:
12+
The project is divided into two core components:
1113

12-
- **motrix_envs**: 基于 MotrixSim 构建的各种 RL 仿真环境,定义了 observationactionreward。与具体的 RL 框架无关,目前支持 MotrixSim 的 CPU 后端
13-
- **motrix_rl**: 集成 RL 框架,并使用 motrix_envs 里的各种环境参数进行训练。目前支持 SKRL 框架的 PPO 算法
14+
- **motrix_envs**: Various RL simulation environments built on MotrixSim, defining observation, action, and reward. Framework-agnostic and currently supports MotrixSim's CPU backend
15+
- **motrix_rl**: Integrates RL frameworks and uses various environment parameters from motrix_envs for training. Currently supports SKRL framework's PPO algorithm
1416

15-
> 文档地址:https://motrixlab.readthedocs.io
17+
> Documentation: https://motrixlab.readthedocs.io
1618
17-
## 主要特性
19+
## Key Features
1820

19-
- **统一接口**: 提供简洁统一的强化学习训练和评估接口
20-
- **多后端支持**: 支持 JAX PyTorch 训练后端,可根据硬件环境灵活选择
21-
- **丰富环境**: 包含基础控制、运动、操作等多种机器人仿真环境
22-
- **高性能仿真**: 基于 MotrixSim 的高性能物理仿真引擎
23-
- **可视化训练**: 支持实时渲染和训练过程可视化
21+
- **Unified Interface**: Provides a concise and unified reinforcement learning training and evaluation interface
22+
- **Multi-backend Support**: Supports JAX and PyTorch training backends, with flexible selection based on hardware environment
23+
- **Rich Environments**: Includes various robot simulation environments such as basic control, locomotion, and manipulation tasks
24+
- **High-performance Simulation**: Built on MotrixSim's high-performance physics simulation engine
25+
- **Visual Training**: Supports real-time rendering and training process visualization
2426

25-
## 🚀 快速开始
27+
## 🚀 Quick Start
2628

27-
> 以下示例使用了 Python 项目管理工具:[UV](https://docs.astral.sh/uv/)
29+
> The following examples use the Python project management tool: [UV](https://docs.astral.sh/uv/)
2830
>
29-
> 在开始之前,请先[安装](https://docs.astral.sh/uv/getting-started/installation/)该工具。
31+
> Before starting, please [install](https://docs.astral.sh/uv/getting-started/installation/) this tool.
3032
31-
### 克隆仓库
33+
### Clone Repository
3234

3335
```bash
3436
git clone https://github.com/Motphys/MotrixLab
@@ -38,63 +40,63 @@ cd MotrixLab
3840
git lfs pull
3941
```
4042

41-
### 安装依赖
43+
### Install Dependencies
4244

43-
安装全部依赖:
45+
Install all dependencies:
4446

4547
```bash
4648
uv sync --all-packages --all-extras
4749
```
4850

49-
SKRL 框架支持 JAX(Flax)PyTorch 作为训练后端,您也可以根据自己的设备环境,选择只安装其中一种训练后端:
51+
SKRL framework supports JAX(Flax) or PyTorch as training backends. You can also choose to install only one training backend based on your hardware environment:
5052

51-
安装 JAX 作为训练后端(仅支持 Linux 平台):
53+
Install JAX as training backend (Linux only):
5254

5355
```bash
5456
uv sync --all-packages --extra skrl-jax
5557
```
5658

57-
安装 PyTorch 作为训练后端:
59+
Install PyTorch as training backend:
5860

5961
```bash
6062
uv sync --all-packages --extra skrl-torch
6163
```
6264

63-
## 🎯 使用指南
65+
## 🎯 Usage Guide
6466

65-
### 环境可视化
67+
### Environment Visualization
6668

67-
查看环境而不执行训练:
69+
View environments without executing training:
6870

6971
```bash
7072
uv run scripts/view.py --env cartpole
7173
```
7274

73-
### 训练模型
75+
### Model Training
7476

7577
```bash
7678
uv run scripts/train.py --env cartpole
7779
```
7880

79-
训练结果会保存在 `runs/{env-name}/` 目录下。
81+
Training results are saved in the `runs/{env-name}/` directory.
8082

81-
通过 TensorBoard 查看训练数据:
83+
View training data through TensorBoard:
8284

8385
```bash
8486
uv run tensorboard --logdir runs/{env-name}
8587
```
8688

87-
### 模型推理
89+
### Model Inference
8890

89-
```
91+
```bash
9092
uv run scripts/play.py --env cartpole
9193
```
9294

93-
更多使用方式请参考[用户文档](https://motrixlab.readthedocs.io)
95+
For more usage methods, please refer to the [User Documentation](https://motrixlab.readthedocs.io)
9496

95-
## 📬 联系方式
97+
## 📬 Contact
9698

97-
有问题或建议?欢迎通过以下方式联系我们:
99+
Have questions or suggestions? Feel free to contact us through:
98100

99-
- GitHub Issues: [提交问题](https://github.com/Motphys/MotrixLab/issues)
100-
- Discussions: [加入讨论](https://github.com/Motphys/MotrixLab/discussions)
101+
- GitHub Issues: [Submit Issues](https://github.com/Motphys/MotrixLab/issues)
102+
- Discussions: [Join Discussion](https://github.com/Motphys/MotrixLab/discussions)

README.zh-CN.md

Lines changed: 102 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,102 @@
1+
**语言**: [English](README.md) | [简体中文](README.zh-CN.md)
2+
3+
# MotrixLab
4+
5+
![GitHub License](https://img.shields.io/github/license/Motphys/MotrixLab)
6+
![Python Version](https://img.shields.io/badge/python-3.10-blue)
7+
8+
`MotrixLab` 是一个基于 [MotrixSim](https://github.com/Motphys/motrixsim-docs) 仿真引擎的强化学习框架,专为机器人仿真和训练设计。该项目提供了一个完整的强化学习开发平台,集成了多种仿真环境和训练框架。
9+
10+
## 项目概述
11+
12+
该项目分为两个核心部分:
13+
14+
- **motrix_envs**: 基于 MotrixSim 构建的各种 RL 仿真环境,定义了 observation、action、reward。与具体的 RL 框架无关,目前支持 MotrixSim 的 CPU 后端
15+
- **motrix_rl**: 集成 RL 框架,并使用 motrix_envs 里的各种环境参数进行训练。目前支持 SKRL 框架的 PPO 算法
16+
17+
> 文档地址:https://motrixlab.readthedocs.io
18+
19+
## 主要特性
20+
21+
- **统一接口**: 提供简洁统一的强化学习训练和评估接口
22+
- **多后端支持**: 支持 JAX 和 PyTorch 训练后端,可根据硬件环境灵活选择
23+
- **丰富环境**: 包含基础控制、运动、操作等多种机器人仿真环境
24+
- **高性能仿真**: 基于 MotrixSim 的高性能物理仿真引擎
25+
- **可视化训练**: 支持实时渲染和训练过程可视化
26+
27+
## 🚀 快速开始
28+
29+
> 以下示例使用了 Python 项目管理工具:[UV](https://docs.astral.sh/uv/)
30+
>
31+
> 在开始之前,请先[安装](https://docs.astral.sh/uv/getting-started/installation/)该工具。
32+
33+
### 克隆仓库
34+
35+
```bash
36+
git clone https://github.com/Motphys/MotrixLab
37+
38+
cd MotrixLab
39+
40+
git lfs pull
41+
```
42+
43+
### 安装依赖
44+
45+
安装全部依赖:
46+
47+
```bash
48+
uv sync --all-packages --all-extras
49+
```
50+
51+
SKRL 框架支持 JAX(Flax)或 PyTorch 作为训练后端,您也可以根据自己的设备环境,选择只安装其中一种训练后端:
52+
53+
安装 JAX 作为训练后端(仅支持 Linux 平台):
54+
55+
```bash
56+
uv sync --all-packages --extra skrl-jax
57+
```
58+
59+
安装 PyTorch 作为训练后端:
60+
61+
```bash
62+
uv sync --all-packages --extra skrl-torch
63+
```
64+
65+
## 🎯 使用指南
66+
67+
### 环境可视化
68+
69+
查看环境而不执行训练:
70+
71+
```bash
72+
uv run scripts/view.py --env cartpole
73+
```
74+
75+
### 训练模型
76+
77+
```bash
78+
uv run scripts/train.py --env cartpole
79+
```
80+
81+
训练结果会保存在 `runs/{env-name}/` 目录下。
82+
83+
通过 TensorBoard 查看训练数据:
84+
85+
```bash
86+
uv run tensorboard --logdir runs/{env-name}
87+
```
88+
89+
### 模型推理
90+
91+
```
92+
uv run scripts/play.py --env cartpole
93+
```
94+
95+
更多使用方式请参考[用户文档](https://motrixlab.readthedocs.io)
96+
97+
## 📬 联系方式
98+
99+
有问题或建议?欢迎通过以下方式联系我们:
100+
101+
- GitHub Issues: [提交问题](https://github.com/Motphys/MotrixLab/issues)
102+
- Discussions: [加入讨论](https://github.com/Motphys/MotrixLab/discussions)

docs/source/zh_CN/user_guide/getting_started/installation.md

Lines changed: 43 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,51 +1,86 @@
11
# 安装环境
22

3-
## 安装要求
3+
本文档将引导您完成 MotrixLab 的安装与配置。请仔细阅读系统要求,并根据您的使用场景选择合适的安装方式。
4+
5+
## 系统要求
46

57
- **Python 版本**:{bdg-danger-line}`3.10.*`
68

9+
本项目依赖特定 Python 版本,其他版本暂不受支持:
10+
711
| Python 版本 | 支持状态 |
812
| :---------: | :------: |
913
| ≤ 3.9 ||
1014
| 3.10 ||
1115
| ≥ 3.11 ||
1216

1317
- **包管理器**:{bdg-danger-line}`UV`
14-
[UV 安装参考](https://docs.astral.sh/uv/getting-started/installation/)
18+
19+
本项目采用 UV 作为唯一的包管理工具,以提供快速、可复现的依赖管理环境。UV 的安装方法请参考[官方文档](https://docs.astral.sh/uv/getting-started/installation/)
1520

1621
- **系统及架构**
1722

1823
- {bdg-danger-line}`Windows(x86_64)`
1924
- {bdg-danger-line}`Linux(x86_64)`
2025

2126
```{note}
22-
各平台支持的功能如下
27+
不同操作系统对 MotrixLab 各功能模块的支持情况如下
2328
2429
| 操作系统 | CPU 仿真 | 交互式查看器 | GPU 仿真 |
2530
| :------: | :------: | :----------: | :------: |
2631
| Linux | ✅ | ✅ | 🛠️ 开发中 |
2732
| Windows | ✅ | ✅ | 🛠️ 开发中 |
2833
```
2934
30-
## 安装方法
35+
## 安装步骤
3136
32-
### 克隆项目
37+
### 克隆项目仓库
3338
3439
```bash
3540
git clone https://github.com/Motphys/MotrixLab.git
3641
cd MotrixLab
3742
```
3843

39-
### 安装依赖
44+
### 配置依赖环境
45+
46+
:::{dropdown} 配置国内镜像源(可选)
47+
:animate: fade-in
48+
:color: warning
49+
:icon: desktop-download
50+
如果您身处中国大陆,建议配置国内镜像源以加速依赖下载:
51+
52+
1. 修改项目根目录的 `uv.toml` 文件
53+
54+
```toml
55+
[[index]]
56+
name = "mirror"
57+
# 请填写您选择的国内镜像源,例如:
58+
# 清华源: "https://mirrors.tuna.tsinghua.edu.cn/pypi/web/simple"
59+
url = ""
60+
61+
62+
[[index]]
63+
name = "pytorch"
64+
url = "https://download.pytorch.org/whl/cu128"
65+
default = true
66+
```
67+
68+
2. 在执行 `uv sync` 命令时添加 `--index-strategy unsafe-best-match` 参数:
69+
70+
```
71+
uv sync --all-packages --all-extras --index-strategy unsafe-best-match
72+
```
73+
74+
:::
4075

41-
使用 UV 安装项目依赖
76+
执行以下命令安装完整依赖
4277

4378
```bash
4479
# 安装所有依赖
4580
uv sync --all-packages --all-extras
4681
```
4782

48-
如果只需要安装一种训练后端,可以选择单独安装指定的后端类型
83+
如果仅需特定训练框架,可选择性安装以减少依赖体积
4984

5085
```bash
5186

motrix_envs/pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ build-backend = "uv_build"
44

55
[project]
66
name = "motrix-envs"
7-
version = "0.0.1"
7+
version = "0.0.2"
88
description = "Robot simulation environment library based on MotrixSim providing multi-task RL environments."
99
authors = [{ name = "Motphys", email = "developers@motphys.com" }]
1010
requires-python = "==3.10.*"

motrix_rl/pyproject.toml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ build-backend = "uv_build"
44

55
[project]
66
name = "motrix-rl"
7-
version = "0.0.1"
7+
version = "0.0.2"
88
description = "Reinforcement learning training framework based on SKRL with multi-backend unified training interface."
99
authors = [{ name = "Motphys", email = "developers@motphys.com" }]
1010
requires-python = "==3.10.*"
@@ -17,6 +17,7 @@ skrl-jax = [
1717
"skrl===1.4.3; sys_platform == 'linux'",
1818
"jax[cuda12]==0.4.34; sys_platform == 'linux'",
1919
"flax===0.10.4; sys_platform == 'linux'",
20+
"tensorflow===2.20.0; sys_platform == 'linux'",
2021
]
2122
skrl-torch = [
2223
"skrl===1.4.3",

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[project]
22
name = "motrix-lab"
3-
version = "0.0.1"
3+
version = "0.0.2"
44
description = "A general-purpose machine learning architecture designed for robot training"
55
authors = [{ name = "Motphys", email = "developers@motphys.com" }]
66
requires-python = "==3.10.*"

0 commit comments

Comments
 (0)