chore(project): 初始化项目基础配置文件

添加 .gitignore、README.md、LICENSE 和 pyproject.toml,
建立 Python 项目的基础工程结构。
This commit is contained in:
Vinman 2026-06-10 14:24:58 +08:00
commit c3028aa7b4
4 changed files with 244 additions and 0 deletions

85
.gitignore vendored Normal file
View File

@ -0,0 +1,85 @@
# ============================
# Python
# ============================
__pycache__/
*.py[cod]
*$py.class
*.so
*.egg
*.egg-info/
dist/
build/
eggs/
sdist/
wheels/
*.whl
.eggs/
Pipfile.lock
poetry.lock
# 虚拟环境
venv/
.venv/
env/
.env/
ENV/
env.bak/
venv.bak/
# ============================
# IDE / 编辑器
# ============================
.vscode/
.idea/
*.swp
*.swo
*~
.DS_Store
Thumbs.db
# ============================
# 环境变量 & 配置
# ============================
.env
.env.local
.env.*.local
*.local.toml
# ============================
# 测试 & 覆盖率
# ============================
.pytest_cache/
.coverage
.coverage.*
htmlcov/
.tox/
.nox/
coverage.xml
*.cover
.hypothesis/
# ============================
# Jupyter Notebook
# ============================
.ipynb_checkpoints/
*.ipynb
# ============================
# 打包 & 发布
# ============================
*.log
*.log.*
*.tar.gz
*.zip
# ============================
# 项目特定
# ============================
outputs/
checkpoints/
runs/
wandb/
models/
*.onnx
*.engine
*.trt

27
LICENSE Normal file
View File

@ -0,0 +1,27 @@
Copyright (c) 2026, UFACTORY Inc.
All rights reserved.
Redistribution and use in source and binary forms, with or without modification,
are permitted provided that the following conditions are met:
* Redistributions of source code must retain the above copyright notice,
this list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above copyright notice,
this list of conditions and the following disclaimer in the documentation
and/or other materials provided with the distribution.
* Neither the name of the copyright holder nor the names of its contributors
may be used to endorse or promote products derived from this software
without specific prior written permission.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR
CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

54
README.md Normal file
View File

@ -0,0 +1,54 @@
# uFactory LeRobot
uFactory 机械臂与 LeRobot 框架集成项目,用于机器人学习、数据采集和策略部署。
## 功能特性
- 🤖 uFactory 机械臂控制接口
- 📷 多摄像头数据采集
- 🧠 模仿学习行为克隆、ACT、扩散策略等
- 🚀 策略部署与实时推理
- 📊 训练过程可视化和日志记录
## 环境要求
- Python >= 3.10
- CUDA >= 12.0GPU 训练推荐)
- uFactory 机械臂xArm 系列)
## 安装
```bash
# 克隆仓库
git clone <repo-url>
cd ufactory_lerobot
# 创建虚拟环境
python -m venv .venv
source .venv/bin/activate # Linux/macOS
# .venv\Scripts\activate # Windows
# 安装依赖
pip install -e ".[dev]"
```
## 快速开始
```python
# TODO: 添加示例代码
```
## 项目结构
```
ufactory_lerobot/
├── src/ # 源代码
├── configs/ # 配置文件
├── scripts/ # 脚本
├── tests/ # 测试
└── docs/ # 文档
```
## 许可证
本项目基于 MIT 许可证发布。详见 [LICENSE](LICENSE) 文件。

78
pyproject.toml Normal file
View File

@ -0,0 +1,78 @@
[build-system]
requires = ["setuptools>=68.0", "wheel>=0.42"]
build-backend = "setuptools.build_meta"
[project]
name = "ufactory_lerobot"
version = "0.1.0"
description = "UFACTORY 机械臂与 LeRobot 框架集成"
readme = "README.md"
license = { text = "MIT" }
requires-python = ">=3.10"
authors = [
{ name = "ufactory_lerobot Contributors" },
]
keywords = ["robotics", "lerobot", "ufactory", "xarm", "imitation-learning"]
classifiers = [
"Development Status :: 3 - Alpha",
"Intended Audience :: Science/Research",
"License :: OSI Approved :: MIT License",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Topic :: Scientific/Engineering :: Artificial Intelligence",
]
[project.optional-dependencies]
dev = [
"pytest>=8.0",
"pytest-cov>=5.0",
"ruff>=0.8",
"mypy>=1.10",
"pre-commit>=3.7",
]
camera = [
"opencv-python>=4.9",
"pyrealsense2>=2.55",
]
lerobot = [
"lerobot==0.4.3",
]
train = [
"torch>=2.2",
"torchvision>=0.17",
"huggingface-hub>=0.25",
"wandb>=0.17",
]
[tool.setuptools.packages.find]
where = ["src"]
[tool.ruff]
line-length = 100
target-version = "py310"
[tool.ruff.lint]
select = [
"E", # pycodestyle errors
"W", # pycodestyle warnings
"F", # pyflakes
"I", # isort
"B", # flake8-bugbear
"UP", # pyupgrade
]
[tool.ruff.format]
quote-style = "double"
indent-style = "space"
[tool.pytest.ini_options]
testpaths = ["tests"]
python_files = ["test_*.py"]
addopts = "-v --tb=short"
[tool.mypy]
python_version = "3.10"
strict = true
ignore_missing_imports = true