23 lines
678 B
Python
23 lines
678 B
Python
from dataclasses import dataclass
|
|
from lerobot.teleoperators import TeleoperatorConfig
|
|
@dataclass
|
|
@TeleoperatorConfig.register_subclass("flight_stick")
|
|
class FlightStickConfig(TeleoperatorConfig):
|
|
#控制器索引
|
|
index: int = 0
|
|
#定义启动按钮
|
|
start_button: str = "button_7"
|
|
#定义精细控制模式切换按钮
|
|
fine_control_button: str = "button_10"
|
|
#定义夹爪开按钮
|
|
gripper_open_button: str = "button_1"
|
|
#定义夹爪关按钮
|
|
gripper_close_button: str = "button_0"
|
|
#定义方向帽子键
|
|
hat_button: int = 0
|
|
#RX旋转映射
|
|
RX_MAP: str = "button_4_5"
|
|
#RY旋转映射
|
|
RX_MAP: str = "button_2_3"
|
|
|