RL-PowerTracking/docs/modules/robot_control.md
fly6516 940662b4d6 docs: 新增模块文档
- 新增机械臂控制模块文档,介绍了 RoboticArmController 类及其方法
- 新增工具模块文档,说明了测试场景配置文件和测试数据生成功能
- 新增视觉识别模块文档,详细介绍了 TargetTracker 类的使用方法
2025-05-26 20:20:58 +08:00

46 lines
1.1 KiB
Markdown
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

# 机械臂控制模块 (`src/robot_control`)
## 模块概述
本模块实现了机械手臂的控制接口,支持笛卡尔空间运动规划和基本操作。
## 类说明
### `RoboticArmController`
机械手臂控制接口类,提供以下功能:
#### 方法
- `__init__(port='COM3', baud_rate=115200)`
初始化机械手臂控制器
- `connect()`
建立与机械手臂的连接
- `disconnect()`
断开机械手臂连接
- `move_to_position(position)`
移动到指定位置x, y, z
- `move_along_path(path_points, speed=0.1)`
沿指定路径移动机械臂,支持路径点列表和速度参数
- `perform_pick_and_place(start_pos, end_pos)`
执行抓取和放置操作,从起始位置移动到目标位置
## 使用示例
```python
from src.robot_control.arm_controller import RoboticArmController
# 创建控制器实例
arm = RoboticArmController()
# 连接机械臂
arm.connect()
# 移动到指定位置
arm.move_to_position([0.3, 0.2, 0.1])
# 执行抓取和放置操作
arm.perform_pick_and_place([0.3, 0.2, 0.0], [0.1, 0.4, 0.0])
# 断开连接
arm.disconnect()