This commit is contained in:
2025-11-07 11:15:30 +08:00
parent 2779a2856b
commit 589bbf9479
2 changed files with 24 additions and 22 deletions

View File

@@ -766,7 +766,7 @@ class RealmanDualRobotConfig(RobotConfig):
left_port = 8080, left_port = 8080,
right_ip = "192.168.3.19", right_ip = "192.168.3.19",
right_port = 8080, right_port = 8080,
init_joint = {'joint': [-170, 90, 10, 90, 120, 0, 10, 170, 90, 10, -90, 120, 0, 10]}, init_joint = {'joint': [15, 90, 10, 80, 110, 0, 10, -15, 90, 10, -80, 110, 0, 10]},
motors={ motors={
# name: (index, model) # name: (index, model)
"left_joint_1": [1, "realman"], "left_joint_1": [1, "realman"],
@@ -804,19 +804,19 @@ class RealmanDualRobotConfig(RobotConfig):
height=480, height=480,
use_depth=False use_depth=False
), ),
"front": IntelRealSenseCameraConfig( # "front": IntelRealSenseCameraConfig(
serial_number="145422072751", # serial_number="145422072751",
fps=30, # fps=30,
width=640, # width=640,
height=480, # height=480,
use_depth=False # use_depth=False
), # ),
"high": IntelRealSenseCameraConfig( # "high": IntelRealSenseCameraConfig(
serial_number="145422072193", # serial_number="145422072193",
fps=30, # fps=30,
width=640, # width=640,
height=480, # height=480,
use_depth=False # use_depth=False
), # ),
} }
) )

View File

@@ -2,14 +2,16 @@ import pygame
def find_controller_index(): def find_controller_index():
# 获取所有 pygame 控制器的设备路径 # 获取所有 pygame 控制器的设备路径
pygame.init()
pygame_joysticks = {} pygame_joysticks = {}
for i in range(pygame.joystick.get_count()): if pygame.joystick.get_count():
joystick = pygame.joystick.Joystick(i) for i in range(pygame.joystick.get_count()):
joystick.init() joystick = pygame.joystick.Joystick(i)
pygame_joysticks[joystick.get_guid()] = { joystick.init()
'index': i, pygame_joysticks[joystick.get_guid()] = {
'device_name': joystick.get_name() 'index': i,
} 'device_name': joystick.get_name()
}
return pygame_joysticks return pygame_joysticks