
# 使用第三方适配器（作为用户）
#### 安装第三方适配器包
```
pip install my-robot-r2c-adapter
```
#### 验证安装
```
from r2c_sdk.robots.robot_factory import AdapterRegistry
print(AdapterRegistry.available_types())
# 输出: ['dummy', 'flexiv', 'jaka', 'lerobot', 'my_robot', ...]
```
#### 配置YAML
```
hardware:
  type: my_robot                          # ← 对应 entry_point name
  config:                                  # ← 传给工厂函数的 config
    ip: "192.168.1.xxx"
    port: 502
    joint_names: ["j1", "j2", "j3", "j4", "j5", "j6"]
    commands:                               # 可选：命令配置
      go_home:
        type: go_home
        joints: [0.0, 0.0, 0.0, 0.0, 0.0, 0.0]
```
#### 程序化使用
```
from r2c_sdk.robots.robot_factory import RobotFactory
adapter = RobotFactory.create_hardware_adapter({
    "hardware": {
        "type": "my_robot",
        "config": {"ip": "192.168.1.xxx", "port": 502},
    }
})
adapter.connect()
adapter.get_observation()
```
#### 使用第三方Transformer
安装包含transformer 的包，在YAML mapping规则中按名引用。
```
transforms:
  - name: my_custom_transform    # entry_point name
    config:
      param1: value1
```
