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,
right_ip = "192.168.3.19",
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={
# name: (index, model)
"left_joint_1": [1, "realman"],
@@ -804,19 +804,19 @@ class RealmanDualRobotConfig(RobotConfig):
height=480,
use_depth=False
),
"front": IntelRealSenseCameraConfig(
serial_number="145422072751",
fps=30,
width=640,
height=480,
use_depth=False
),
"high": IntelRealSenseCameraConfig(
serial_number="145422072193",
fps=30,
width=640,
height=480,
use_depth=False
),
# "front": IntelRealSenseCameraConfig(
# serial_number="145422072751",
# fps=30,
# width=640,
# height=480,
# use_depth=False
# ),
# "high": IntelRealSenseCameraConfig(
# serial_number="145422072193",
# fps=30,
# width=640,
# height=480,
# use_depth=False
# ),
}
)

View File

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