fixed
This commit is contained in:
@@ -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
|
||||||
),
|
# ),
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
@@ -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
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user