清理多余策略

This commit is contained in:
meiqi
2026-03-30 15:30:30 +08:00
parent 32702e25f3
commit cc1f766009
19 changed files with 3 additions and 929 deletions

View File

@@ -61,8 +61,6 @@ class KeyboardController:
print(" z - Goto ZERO state")
print(" c - Goto STOP state")
print(" m - Goto WALKAMP state")
print(" p - Goto MYPOLICY state")
print(" n - Goto XSIMRUN state")
print(" Left/Right arrows - Adjust height")
print(" w/a/s/d - Movement controls")
print(" q/e - Rotation controls (turn left/right)")
@@ -196,10 +194,6 @@ class KeyboardController:
self._on_x_key()
elif key == '4':
self._on_g_key()
elif key == 'p':
self._on_p_key()
elif key == 'n':
self._on_n_key()
elif key == '6':
self._on_o_key()
elif key == 'v':
@@ -358,26 +352,6 @@ class KeyboardController:
self.keyboard_flag.fsm_state_command = "gotoWALKAMP"
self.last_fsm_command_time = time.time()
print("Command: gotoWALKAMP")
def _on_p_key(self):
"""处理p键 - 切换到MYPOLICY状态"""
with self.data_mutex:
self.keyboard_flag.x_speed_command = 0.0
self.keyboard_flag.y_speed_command = 0.0
self.keyboard_flag.yaw_speed_command = 0.0
self.keyboard_flag.fsm_state_command = "gotoMYPOLICY"
self.last_fsm_command_time = time.time()
print("Command: gotoMYPOLICY (movement commands reset to zero)")
def _on_n_key(self):
"""处理n键 - 切换到XSIMRUN状态"""
with self.data_mutex:
self.keyboard_flag.x_speed_command = 0.0
self.keyboard_flag.y_speed_command = 0.0
self.keyboard_flag.yaw_speed_command = 0.0
self.keyboard_flag.fsm_state_command = "gotoXSIMRUN"
self.last_fsm_command_time = time.time()
print("Command: gotoXSIMRUN (movement commands reset to zero)")
def _handle_ctrl_c(self):
"""处理Ctrl+C - 发送SIGINT信号给主进程"""