ezai-go2 1.3.1__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (57) hide show
  1. ezai_go2-1.3.1/GITHUB_README.md +118 -0
  2. ezai_go2-1.3.1/GIT_STRATEGY.md +236 -0
  3. ezai_go2-1.3.1/LICENSE +21 -0
  4. ezai_go2-1.3.1/MANIFEST.in +27 -0
  5. ezai_go2-1.3.1/PKG-INFO +254 -0
  6. ezai_go2-1.3.1/README.md +175 -0
  7. ezai_go2-1.3.1/RELEASE_CHECKLIST.md +166 -0
  8. ezai_go2-1.3.1/examples/basic_usage.py +165 -0
  9. ezai_go2-1.3.1/examples/go2_compare_test.py +169 -0
  10. ezai_go2-1.3.1/examples/go2_debug_frame.py +169 -0
  11. ezai_go2-1.3.1/examples/go2_debug_interface.py +52 -0
  12. ezai_go2-1.3.1/examples/go2_debug_test.py +109 -0
  13. ezai_go2-1.3.1/examples/go2_diagnostic.py +229 -0
  14. ezai_go2-1.3.1/examples/go2_display_test.py +165 -0
  15. ezai_go2-1.3.1/examples/go2_exact_copy.py +95 -0
  16. ezai_go2-1.3.1/examples/go2_final_test.py +135 -0
  17. ezai_go2-1.3.1/examples/go2_lingxin_exact.py +161 -0
  18. ezai_go2-1.3.1/examples/go2_minimal_video.py +27 -0
  19. ezai_go2-1.3.1/examples/go2_network_diagnostic.py +224 -0
  20. ezai_go2-1.3.1/examples/go2_opencv_test.py +171 -0
  21. ezai_go2-1.3.1/examples/go2_optimized_test.py +180 -0
  22. ezai_go2-1.3.1/examples/go2_pipe_debug.py +172 -0
  23. ezai_go2-1.3.1/examples/go2_simple_final.py +130 -0
  24. ezai_go2-1.3.1/examples/go2_simple_test.py +92 -0
  25. ezai_go2-1.3.1/examples/go2_simple_usage.py +177 -0
  26. ezai_go2-1.3.1/examples/go2_simple_video.py +169 -0
  27. ezai_go2-1.3.1/examples/go2_stable_test.py +172 -0
  28. ezai_go2-1.3.1/examples/go2_state.py +33 -0
  29. ezai_go2-1.3.1/examples/go2_test_fixed.py +89 -0
  30. ezai_go2-1.3.1/examples/go2_video_check.py +130 -0
  31. ezai_go2-1.3.1/examples/go2_video_stream.py +120 -0
  32. ezai_go2-1.3.1/examples/go2_video_test.py +80 -0
  33. ezai_go2-1.3.1/examples/go2_video_tkinter.py +233 -0
  34. ezai_go2-1.3.1/examples/go2_window_fix.py +113 -0
  35. ezai_go2-1.3.1/examples/go2_working_test.py +91 -0
  36. ezai_go2-1.3.1/examples/pipstream.py +71 -0
  37. ezai_go2-1.3.1/ezai/__init__.py +127 -0
  38. ezai_go2-1.3.1/ezai/camera.py +68 -0
  39. ezai_go2-1.3.1/ezai/cli.py +89 -0
  40. ezai_go2-1.3.1/ezai/go2.py +738 -0
  41. ezai_go2-1.3.1/ezai/go2_fixed.py +76 -0
  42. ezai_go2-1.3.1/ezai/onnxWorkflow.py +178 -0
  43. ezai_go2-1.3.1/ezai/rknnWorkflow.py +194 -0
  44. ezai_go2-1.3.1/ezai/ui.py +329 -0
  45. ezai_go2-1.3.1/ezai_go2.egg-info/PKG-INFO +254 -0
  46. ezai_go2-1.3.1/ezai_go2.egg-info/SOURCES.txt +55 -0
  47. ezai_go2-1.3.1/ezai_go2.egg-info/dependency_links.txt +1 -0
  48. ezai_go2-1.3.1/ezai_go2.egg-info/entry_points.txt +2 -0
  49. ezai_go2-1.3.1/ezai_go2.egg-info/not-zip-safe +1 -0
  50. ezai_go2-1.3.1/ezai_go2.egg-info/requires.txt +34 -0
  51. ezai_go2-1.3.1/ezai_go2.egg-info/top_level.txt +1 -0
  52. ezai_go2-1.3.1/pyproject.toml +114 -0
  53. ezai_go2-1.3.1/requirements.txt +18 -0
  54. ezai_go2-1.3.1/setup.cfg +4 -0
  55. ezai_go2-1.3.1/setup.py +96 -0
  56. ezai_go2-1.3.1/tests/__init__.py +3 -0
  57. ezai_go2-1.3.1/tests/test_ezai.py +102 -0
@@ -0,0 +1,118 @@
1
+ # EZAI-Go2 - 简单易用的AI机器人控制库
2
+
3
+ [![PyPI version](https://badge.fury.io/py/ezai-go2.svg)](https://badge.fury.io/py/ezai-go2)
4
+ [![Python versions](https://img.shields.io/pypi/pyversions/ezai-go2.svg)](https://pypi.org/project/ezai-go2/)
5
+ [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)
6
+
7
+ EZAI-Go2 是一个专为 Go2 机器狗和 AI 应用设计的简化 Python 接口库,让机器人控制和计算机视觉变得简单易用。
8
+
9
+ ## 🚀 快速安装
10
+
11
+ ```bash
12
+ pip install ezai-go2
13
+ ```
14
+
15
+ ## 📖 主要功能
16
+
17
+ - **🤖 Go2 机器狗控制**: 完整的运动控制、状态查询、视频流支持
18
+ - **📷 计算机视觉**: 集成 OpenCV,支持图像处理和显示
19
+ - **🧠 AI 工作流**: 支持 ONNX 和 RKNN 模型推理
20
+ - **🔧 模块化设计**: 支持按需导入,减少依赖冲突
21
+ - **🎓 教育友好**: 适合初学者和 STEM 教育
22
+
23
+ ## 🛠️ 开发者指南
24
+
25
+ ### 项目结构
26
+ ```
27
+ go2dog/
28
+ ├── ezai/ # 核心库代码
29
+ ├── examples/ # 示例代码
30
+ ├── tests/ # 测试代码
31
+ ├── DEVELOPMENT.md # 详细开发指南
32
+ ├── setup.py # 打包配置
33
+ ├── pyproject.toml # 项目配置
34
+ └── upload.py # 发布脚本
35
+ ```
36
+
37
+ ### 快速开始
38
+
39
+ 1. **克隆项目**:
40
+ ```bash
41
+ git clone https://github.com/nmww/go2dog.git
42
+ cd go2dog
43
+ ```
44
+
45
+ 2. **安装开发依赖**:
46
+ ```bash
47
+ pip install -e .
48
+ pip install ezai-go2[dev]
49
+ ```
50
+
51
+ 3. **配置 PyPI 认证**(发布时需要):
52
+ - 在用户主目录创建 `.pypirc` 文件
53
+ - 添加 PyPI API token(详见 [DEVELOPMENT.md](DEVELOPMENT.md))
54
+ - ⚠️ **重要**: `.pypirc` 文件绝对不能提交到 Git!
55
+
56
+ 4. **版本发布**:
57
+ ```bash
58
+ # 补丁版本
59
+ python quick_update.py patch
60
+
61
+ # 次版本
62
+ python quick_update.py minor
63
+
64
+ # 主版本
65
+ python quick_update.py major
66
+ ```
67
+
68
+ ### 基本使用示例
69
+
70
+ ```python
71
+ from ezai import Go2, Camera, OpenCVUI
72
+
73
+ # Go2 机器狗控制
74
+ dog = Go2()
75
+ if dog.connect():
76
+ dog.move(0.5, 0, 0) # 前进
77
+ time.sleep(2)
78
+ dog.move(0, 0, 0) # 停止
79
+ dog.disconnect()
80
+
81
+ # 摄像头和 UI
82
+ camera = Camera()
83
+ ui = OpenCVUI()
84
+ image = camera.capture()
85
+ if image:
86
+ ui.show_image("Camera", image)
87
+ ui.waitKey(0)
88
+ ```
89
+
90
+ ## 📚 文档
91
+
92
+ - **[DEVELOPMENT.md](DEVELOPMENT.md)** - 详细开发指南
93
+ - **[README.md](README.md)** - PyPI 展示文档
94
+ - **[examples/](examples/)** - 示例代码
95
+
96
+ ## 🤝 贡献
97
+
98
+ 1. Fork 项目
99
+ 2. 创建功能分支 (`git checkout -b feature/amazing-feature`)
100
+ 3. 提交更改 (`git commit -m 'Add amazing feature'`)
101
+ 4. 推送到分支 (`git push origin feature/amazing-feature`)
102
+ 5. 创建 Pull Request
103
+
104
+ ## 📄 许可证
105
+
106
+ 本项目采用 MIT 许可证 - 详见 [LICENSE](LICENSE) 文件
107
+
108
+ ## 📞 联系方式
109
+
110
+ - 邮箱: macnote@qq.com
111
+ - PyPI: https://pypi.org/project/ezai-go2/
112
+ - GitHub: https://github.com/nmww/go2dog
113
+
114
+ ---
115
+
116
+ ⚠️ **开发者注意**:
117
+ - 请勿将 `.pypirc` 文件提交到版本控制
118
+ - 发布前请阅读 [DEVELOPMENT.md](DEVELOPMENT.md) 了解详细流程
@@ -0,0 +1,236 @@
1
+ # EZAI-Go2 Git 提交策略
2
+
3
+ ## 🎯 提交原则
4
+
5
+ ### 应该提交的文件
6
+ - ✅ **源代码**: `ezai/*.py`
7
+ - ✅ **示例代码**: `examples/*.py`
8
+ - ✅ **测试代码**: `tests/*.py`
9
+ - ✅ **配置文件**: `setup.py`, `pyproject.toml`, `requirements.txt`
10
+ - ✅ **文档文件**: `README.md`, `DEVELOPMENT.md`, `GITHUB_README.md`
11
+ - ✅ **许可证**: `LICENSE`
12
+ - ✅ **打包清单**: `MANIFEST.in`
13
+ - ✅ **版本管理脚本**: `update_version.py`, `quick_update.py`
14
+ - ✅ **发布脚本**: `upload.py`
15
+
16
+ ### 绝对不能提交的文件
17
+ - ❌ **打包产物**: `dist/`, `*.egg-info/`, `build/`
18
+ - ❌ **敏感配置**: `.pypirc`, `.env`, API keys
19
+ - ❌ **缓存文件**: `__pycache__/`, `*.pyc`
20
+ - ❌ **IDE 配置**: `.vscode/`, `.idea/`
21
+ - ❌ **虚拟环境**: `venv/`, `env/`
22
+ - ❌ **模型文件**: `*.onnx`, `*.h5`, `*.pth`
23
+ - ❌ **数据文件**: `data/`, `datasets/`
24
+ - ❌ **日志文件**: `*.log`
25
+
26
+ ## 📝 .gitignore 策略
27
+
28
+ ### 核心排除项
29
+ ```gitignore
30
+ # 打包产物(最重要)
31
+ dist/
32
+ *.egg-info/
33
+ build/
34
+ *.egg
35
+
36
+ # 敏感配置
37
+ .pypirc
38
+ .env
39
+
40
+ # Python 缓存
41
+ __pycache__/
42
+ *.pyc
43
+ ```
44
+
45
+ ### 开发环境排除
46
+ ```gitignore
47
+ # 虚拟环境
48
+ venv/
49
+ env/
50
+
51
+ # IDE 配置
52
+ .vscode/
53
+ .idea/
54
+
55
+ # 测试覆盖率
56
+ .coverage
57
+ .pytest_cache/
58
+ ```
59
+
60
+ ## 🔄 分支策略
61
+
62
+ ### 主要分支
63
+ - **main**: 稳定发布版本
64
+ - **develop**: 开发分支(可选)
65
+
66
+ ### 功能分支
67
+ - **feature/功能名**: 新功能开发
68
+ - **fix/问题描述**: Bug 修复
69
+ - **docs/文档更新**: 文档更新
70
+ - **release/版本号**: 发布准备
71
+
72
+ ### 分支命名规范
73
+ ```bash
74
+ feature/video-stream-enhancement
75
+ fix/go2-connection-issue
76
+ docs/update-installation-guide
77
+ release/v1.1.0
78
+ ```
79
+
80
+ ## 📋 提交信息规范
81
+
82
+ ### 格式
83
+ ```
84
+ <类型>(<范围>): <描述>
85
+
86
+ [可选的详细描述]
87
+
88
+ [可选的关闭问题]
89
+ ```
90
+
91
+ ### 类型说明
92
+ - **feat**: 新功能
93
+ - **fix**: Bug 修复
94
+ - **docs**: 文档更新
95
+ - **style**: 代码格式化
96
+ - **refactor**: 代码重构
97
+ - **test**: 测试相关
98
+ - **chore**: 构建过程或辅助工具的变动
99
+ - **release**: 版本发布
100
+
101
+ ### 示例
102
+ ```bash
103
+ feat(go2): add video stream error handling
104
+ fix(camera): resolve image capture timeout issue
105
+ docs(readme): update installation instructions
106
+ style(ezai): apply black formatting
107
+ refactor(ui): simplify widget creation logic
108
+ test(go2): add connection test cases
109
+ chore(deps): update numpy version constraint
110
+ release(v1.0.9): patch release with documentation updates
111
+ ```
112
+
113
+ ## 🚀 发布流程
114
+
115
+ ### 1. 开发阶段
116
+ ```bash
117
+ # 创建功能分支
118
+ git checkout -b feature/new-function
119
+
120
+ # 开发和提交
121
+ git add .
122
+ git commit -m "feat(module): add new function"
123
+ git push origin feature/new-function
124
+ ```
125
+
126
+ ### 2. 发布准备
127
+ ```bash
128
+ # 切换到主分支
129
+ git checkout main
130
+ git pull origin main
131
+
132
+ # 合并功能分支
133
+ git merge feature/new-function
134
+
135
+ # 更新版本(使用脚本)
136
+ python quick_update.py patch
137
+
138
+ # 提交版本更新
139
+ git add .
140
+ git commit -m "release(v1.0.10): patch release"
141
+ ```
142
+
143
+ ### 3. 发布后
144
+ ```bash
145
+ # 推送主分支
146
+ git push origin main
147
+
148
+ # 创建标签
149
+ git tag -a v1.0.10 -m "Release version 1.0.10"
150
+ git push origin v1.0.10
151
+
152
+ # 删除功能分支
153
+ git branch -d feature/new-function
154
+ git push origin --delete feature/new-function
155
+ ```
156
+
157
+ ## 🔍 代码审查检查点
158
+
159
+ ### 提交前检查
160
+ - [ ] 代码格式化 (`black ezai/`)
161
+ - [ ] 代码检查 (`flake8 ezai/`)
162
+ - [ ] 测试通过 (`pytest tests/`)
163
+ - [ ] 文档更新
164
+ - [ ] 版本号更新(如需要)
165
+ - [ ] 无敏感信息泄露
166
+
167
+ ### 提交信息检查
168
+ - [ ] 类型正确
169
+ - [ ] 范围明确
170
+ - [ ] 描述清晰
171
+ - [ ] 关联问题(如有)
172
+
173
+ ## 📊 仓库大小优化
174
+
175
+ ### 定期清理
176
+ ```bash
177
+ # 清理 Git 历史(谨慎使用)
178
+ git filter-branch --force --index-filter 'git rm --cached --ignore-unmatch large-file.onnx' --prune-empty --tag-name-filter cat -- --all
179
+
180
+ # 清理未跟踪文件
181
+ git clean -fd
182
+ ```
183
+
184
+ ### 大文件处理
185
+ - 模型文件使用 Git LFS
186
+ - 数据文件放在外部存储
187
+ - 避免提交二进制文件
188
+
189
+ ## 🛡️ 安全最佳实践
190
+
191
+ ### 敏感信息保护
192
+ - `.pypirc` 永远不提交
193
+ - API token 使用环境变量
194
+ - 密钥使用配置文件模板
195
+
196
+ ### 代码审查
197
+ - 所有提交需要代码审查
198
+ - 检查硬编码的敏感信息
199
+ - 验证依赖安全性
200
+
201
+ ## 📋 常见问题
202
+
203
+ ### Q: 如何处理已提交的大文件?
204
+ ```bash
205
+ # 查找大文件
206
+ git rev-list --objects --all | git cat-file --batch-check='%(objecttype) %(objectname) %(objectsize) %(rest)' | sed -n 's/^blob //p' | sort --numeric-sort --key=2 | tail -10
207
+
208
+ # 从历史中移除
209
+ git filter-branch --force --index-filter 'git rm --cached --ignore-unmatch large-file' --prune-empty --tag-name-filter cat -- --all
210
+ ```
211
+
212
+ ### Q: 如何恢复误删的文件?
213
+ ```bash
214
+ # 从暂存区恢复
215
+ git restore --staged file.txt
216
+
217
+ # 从提交历史恢复
218
+ git checkout HEAD~1 -- file.txt
219
+ ```
220
+
221
+ ### Q: 如何撤销提交?
222
+ ```bash
223
+ # 撤销最后一次提交(保留修改)
224
+ git reset --soft HEAD~1
225
+
226
+ # 撤销最后一次提交(丢弃修改)
227
+ git reset --hard HEAD~1
228
+ ```
229
+
230
+ ---
231
+
232
+ ⚠️ **重要提醒**:
233
+ - 提交前务必检查 `.gitignore` 配置
234
+ - 绝对不要提交 `dist/` 和 `*.egg-info/` 目录
235
+ - 使用语义化提交信息
236
+ - 定期清理仓库,保持精简
ezai_go2-1.3.1/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2024 EZAI Team
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
@@ -0,0 +1,27 @@
1
+ # EZAI-Go2 Package Manifest
2
+
3
+ # Include core files
4
+ include README.md
5
+ include LICENSE
6
+ include requirements.txt
7
+ include MANIFEST.in
8
+
9
+ # Include examples
10
+ recursive-include examples *.py
11
+
12
+ # Include tests
13
+ recursive-include tests *.py
14
+
15
+ # Exclude development and unnecessary files
16
+ global-exclude *.pyc
17
+ global-exclude *.pyo
18
+ global-exclude *.pyd
19
+ global-exclude __pycache__
20
+ global-exclude .git*
21
+ global-exclude .DS_Store
22
+ global-exclude *.so
23
+ global-exclude .pypirc
24
+ global-exclude upload.py
25
+ global-exclude update_version.py
26
+ global-exclude quick_update.py
27
+ global-exclude DEVELOPMENT.md
@@ -0,0 +1,254 @@
1
+ Metadata-Version: 2.1
2
+ Name: ezai-go2
3
+ Version: 1.3.1
4
+ Summary: Easy AI Robot Control Library for Go2 and Computer Vision
5
+ Home-page: https://github.com/ezai-team/ezai
6
+ Author: EZAI Team
7
+ Author-email: EZAI Team <contact@ezai.com>
8
+ Maintainer-email: EZAI Team <contact@ezai.com>
9
+ License: MIT License
10
+
11
+ Copyright (c) 2024 EZAI Team
12
+
13
+ Permission is hereby granted, free of charge, to any person obtaining a copy
14
+ of this software and associated documentation files (the "Software"), to deal
15
+ in the Software without restriction, including without limitation the rights
16
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
17
+ copies of the Software, and to permit persons to whom the Software is
18
+ furnished to do so, subject to the following conditions:
19
+
20
+ The above copyright notice and this permission notice shall be included in all
21
+ copies or substantial portions of the Software.
22
+
23
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
24
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
25
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
26
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
27
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
28
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
29
+ SOFTWARE.
30
+ Project-URL: Homepage, https://github.com/nmww/go2dog
31
+ Project-URL: Documentation, https://github.com/nmww/go2dog/blob/main/DEVELOPMENT.md
32
+ Project-URL: Repository, https://github.com/nmww/go2dog.git
33
+ Project-URL: Bug Tracker, https://github.com/nmww/go2dog/issues
34
+ Keywords: robotics,ai,computer-vision,go2,unitree,machine-learning,education
35
+ Classifier: Development Status :: 4 - Beta
36
+ Classifier: Intended Audience :: Developers
37
+ Classifier: Intended Audience :: Education
38
+ Classifier: Topic :: Scientific/Engineering :: Artificial Intelligence
39
+ Classifier: Topic :: Software Development :: Libraries :: Python Modules
40
+ Classifier: License :: OSI Approved :: MIT License
41
+ Classifier: Programming Language :: Python :: 3
42
+ Classifier: Programming Language :: Python :: 3.7
43
+ Classifier: Programming Language :: Python :: 3.8
44
+ Classifier: Programming Language :: Python :: 3.9
45
+ Classifier: Programming Language :: Python :: 3.10
46
+ Classifier: Programming Language :: Python :: 3.11
47
+ Classifier: Operating System :: OS Independent
48
+ Requires-Python: >=3.7
49
+ Description-Content-Type: text/markdown
50
+ License-File: LICENSE
51
+ Provides-Extra: core
52
+ Requires-Dist: numpy<=1.24.3,>=1.19.0; extra == "core"
53
+ Requires-Dist: pillow>=8.0.0; extra == "core"
54
+ Requires-Dist: netifaces>=0.10.0; extra == "core"
55
+ Requires-Dist: typing-extensions<5.0.0,>=3.6.6; extra == "core"
56
+ Provides-Extra: opencv
57
+ Requires-Dist: opencv-python>=4.5.0; extra == "opencv"
58
+ Provides-Extra: dev
59
+ Requires-Dist: pytest>=6.0; extra == "dev"
60
+ Requires-Dist: pytest-cov>=2.0; extra == "dev"
61
+ Requires-Dist: black>=21.0; extra == "dev"
62
+ Requires-Dist: flake8>=3.8; extra == "dev"
63
+ Requires-Dist: twine>=4.0; extra == "dev"
64
+ Requires-Dist: build>=0.7.0; extra == "dev"
65
+ Provides-Extra: onnx
66
+ Requires-Dist: onnx>=1.12.0; extra == "onnx"
67
+ Requires-Dist: onnxruntime>=1.12.0; extra == "onnx"
68
+ Provides-Extra: rknn
69
+ Requires-Dist: rknn-toolkit2>=1.5.0; extra == "rknn"
70
+ Provides-Extra: all
71
+ Requires-Dist: numpy<=1.24.3,>=1.19.0; extra == "all"
72
+ Requires-Dist: pillow>=8.0.0; extra == "all"
73
+ Requires-Dist: netifaces>=0.10.0; extra == "all"
74
+ Requires-Dist: typing-extensions<5.0.0,>=3.6.6; extra == "all"
75
+ Requires-Dist: opencv-python>=4.5.0; extra == "all"
76
+ Requires-Dist: onnx>=1.12.0; extra == "all"
77
+ Requires-Dist: onnxruntime>=1.12.0; extra == "all"
78
+ Requires-Dist: rknn-toolkit2>=1.5.0; extra == "all"
79
+
80
+ # EZAI - 简单易用的AI机器人控制库
81
+
82
+ [![PyPI version](https://badge.fury.io/py/ezai-go2.svg)](https://badge.fury.io/py/ezai-go2)
83
+ [![Python versions](https://img.shields.io/pypi/pyversions/ezai-go2.svg)](https://pypi.org/project/ezai-go2/)
84
+ [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)
85
+
86
+ EZAI是一个专为Go2机器狗和AI应用设计的简化Python接口库,让机器人控制和计算机视觉变得简单易用。
87
+
88
+ ## 🚀 特性
89
+
90
+ - **简单易用**: 专为初学者设计的API接口
91
+ - **模块化设计**: 支持按需导入,减少依赖
92
+ - **Go2机器狗控制**: 完整的运动控制和视频流支持
93
+ - **计算机视觉**: 集成OpenCV,支持图像处理和显示
94
+ - **AI工作流**: 支持ONNX和RKNN模型推理
95
+ - **教育友好**: 适合STEM教育和编程学习
96
+
97
+ ## 📦 安装
98
+
99
+ ### 基础安装
100
+ ```bash
101
+ pip install ezai-go2
102
+ ```
103
+
104
+ ### 完整安装(包含所有可选依赖)
105
+ ```bash
106
+ pip install ezai-go2[all]
107
+ ```
108
+
109
+ ### 仅安装ONNX支持
110
+ ```bash
111
+ pip install ezai-go2[onnx]
112
+ ```
113
+
114
+ ### 仅安装RKNN支持
115
+ ```bash
116
+ pip install ezai-go2[rknn]
117
+ ```
118
+
119
+ ## 🔧 Go2 SDK安装
120
+
121
+ 要使用Go2机器狗控制功能,需要额外安装unitree-sdk2py:
122
+
123
+ ```bash
124
+ # 从官方源码安装
125
+ git clone https://github.com/unitreerobotics/unitree_sdk2_python.git
126
+ cd unitree_sdk2_python
127
+ pip install -e .
128
+ ```
129
+
130
+ ## 📖 快速开始
131
+
132
+ ### Go2机器狗控制
133
+
134
+ ```python
135
+ from ezai import Go2
136
+
137
+ # 创建Go2控制器
138
+ dog = Go2()
139
+
140
+ # 连接机器狗
141
+ if dog.connect():
142
+ # 前进
143
+ dog.move(0.5, 0, 0) # vx=0.5, vy=0, vyaw=0
144
+ time.sleep(2)
145
+
146
+ # 停止
147
+ dog.move(0, 0, 0)
148
+
149
+ # 断开连接
150
+ dog.disconnect()
151
+ ```
152
+
153
+ ### 计算机视觉
154
+
155
+ ```python
156
+ from ezai import Camera, OpenCVUI
157
+
158
+ # 创建摄像头
159
+ camera = Camera()
160
+ ui = OpenCVUI()
161
+
162
+ # 捕获图像
163
+ image = camera.capture()
164
+ if image is not None:
165
+ # 显示图像
166
+ ui.show_image("Camera", image)
167
+ ui.waitKey(0)
168
+ ```
169
+
170
+ ### AI推理(ONNX)
171
+
172
+ ```python
173
+ from ezai import ONNXWorkflow
174
+
175
+ # 创建ONNX工作流
176
+ workflow = ONNXWorkflow("model.onnx")
177
+
178
+ # 加载图像
179
+ image = cv2.imread("test.jpg")
180
+
181
+ # 运行推理
182
+ result = workflow.run(image)
183
+ print(f"推理结果: {result}")
184
+ ```
185
+
186
+ ## 📚 模块说明
187
+
188
+ ### Go2模块
189
+ - `Go2`: Go2机器狗主控制类
190
+ - 支持运动控制、状态查询、视频流等
191
+ - 自动网络接口检测和IP配置
192
+
193
+ ### Camera模块
194
+ - `Camera`: 摄像头控制类
195
+ - 支持USB摄像头和网络摄像头
196
+ - 简化的图像捕获接口
197
+
198
+ ### UI模块
199
+ - `OpenCVUI`: OpenCV显示界面类
200
+ - 简化的图像显示和交互接口
201
+ - 支持窗口管理和事件处理
202
+
203
+ ### AI工作流模块
204
+ - `ONNXWorkflow`: ONNX模型推理
205
+ - `RKNNWorkflow`: RKNN模型推理
206
+ - 统一的推理接口设计
207
+
208
+ ## 🛠️ 开发
209
+
210
+ ### 安装开发依赖
211
+ ```bash
212
+ pip install ezai-go2[dev]
213
+ ```
214
+
215
+ ### 运行测试
216
+ ```bash
217
+ pytest tests/
218
+ ```
219
+
220
+ ### 代码格式化
221
+ ```bash
222
+ black ezai/
223
+ ```
224
+
225
+ ## 📋 依赖要求
226
+
227
+ - Python >= 3.7
228
+ - OpenCV >= 4.5.0
229
+ - NumPy <= 1.24.3
230
+ - Pillow >= 8.0.0
231
+ - netifaces >= 0.10.0
232
+
233
+ 可选依赖:
234
+ - unitree-sdk2py (Go2控制)
235
+ - onnx + onnxruntime (ONNX推理)
236
+ - rknn-toolkit2 (RKNN推理)
237
+
238
+ ## 🤝 贡献
239
+
240
+ 欢迎提交Issue和Pull Request!
241
+
242
+ ## 📄 许可证
243
+
244
+ 本项目采用MIT许可证 - 详见 [LICENSE](LICENSE) 文件
245
+
246
+ ## 📞 联系方式
247
+
248
+ - 邮箱: macnote@qq.com
249
+ - GitHub: https://github.com/nmww/go2dog
250
+ - 文档: https://github.com/nmww/go2dog/blob/main/DEVELOPMENT.md
251
+
252
+ ## 🙏 致谢
253
+
254
+ 感谢Unitree机器人提供的Go2 SDK支持!