mirror of
https://github.com/dptech-corp/Uni-Lab-OS.git
synced 2026-02-07 15:35:10 +00:00
添加硬件
This commit is contained in:
13598
test/experiments/prcxi_9320_visual.json
Normal file
13598
test/experiments/prcxi_9320_visual.json
Normal file
File diff suppressed because it is too large
Load Diff
@@ -92,18 +92,18 @@ class ResourceVisualization:
|
|||||||
|
|
||||||
# 遍历设备节点
|
# 遍历设备节点
|
||||||
for node in device.values():
|
for node in device.values():
|
||||||
if node['type'] in self.resource_type or (node['type'] == 'device' and node['class'] != ''):
|
if (node['type'] in self.resource_type and node['class'] != '') or (node['type'] == 'device' and node['class'] != ''):
|
||||||
model_config = {}
|
model_config = {}
|
||||||
if node['type'] in self.resource_type:
|
if node['type'] in self.resource_type:
|
||||||
resource_class = node['class']
|
resource_class = node['class']
|
||||||
if resource_class not in registry.resource_type_registry.keys():
|
if resource_class not in registry.resource_type_registry.keys():
|
||||||
raise ValueError(f"资源类型 {resource_class} 未在注册表中注册")
|
raise ValueError(f"{node['id']}资源类型 {resource_class} 未在注册表中注册")
|
||||||
elif "model" in registry.resource_type_registry[resource_class].keys():
|
elif "model" in registry.resource_type_registry[resource_class].keys():
|
||||||
model_config = registry.resource_type_registry[resource_class]['model']
|
model_config = registry.resource_type_registry[resource_class]['model']
|
||||||
elif node['type'] == 'device' and node['class'] != '':
|
elif node['type'] == 'device' and node['class'] != '':
|
||||||
device_class = node['class']
|
device_class = node['class']
|
||||||
if device_class not in registry.device_type_registry.keys():
|
if device_class not in registry.device_type_registry.keys():
|
||||||
raise ValueError(f"设备类型 {device_class} 未在注册表中注册")
|
raise ValueError(f"{node['id']}设备类型 {device_class} 未在注册表中注册")
|
||||||
elif "model" in registry.device_type_registry[device_class].keys():
|
elif "model" in registry.device_type_registry[device_class].keys():
|
||||||
model_config = registry.device_type_registry[device_class]['model']
|
model_config = registry.device_type_registry[device_class]['model']
|
||||||
if model_config:
|
if model_config:
|
||||||
|
|||||||
BIN
unilabos/device_mesh/resources/hplc_plate/meshes/hplc_plate.stl
Normal file
BIN
unilabos/device_mesh/resources/hplc_plate/meshes/hplc_plate.stl
Normal file
Binary file not shown.
11
unilabos/device_mesh/resources/hplc_plate/modal.xacro
Normal file
11
unilabos/device_mesh/resources/hplc_plate/modal.xacro
Normal file
@@ -0,0 +1,11 @@
|
|||||||
|
<?xml version="1.0" ?>
|
||||||
|
<robot xmlns:xacro="http://www.ros.org/wiki/xacro" name="hplc_plate">
|
||||||
|
<link name='plate_link'>
|
||||||
|
<visual name='visual'>
|
||||||
|
<geometry>
|
||||||
|
<mesh filename="meshes/hplc_plate.stl"/>
|
||||||
|
</geometry>
|
||||||
|
<material name="clay" />
|
||||||
|
</visual>
|
||||||
|
</link>
|
||||||
|
</robot>
|
||||||
Binary file not shown.
11
unilabos/device_mesh/resources/plate_96_high/modal.xacro
Normal file
11
unilabos/device_mesh/resources/plate_96_high/modal.xacro
Normal file
@@ -0,0 +1,11 @@
|
|||||||
|
<?xml version="1.0" ?>
|
||||||
|
<robot xmlns:xacro="http://www.ros.org/wiki/xacro" name="plate_96_high">
|
||||||
|
<link name='plate_link'>
|
||||||
|
<visual name='visual'>
|
||||||
|
<geometry>
|
||||||
|
<mesh filename="meshes/plate_96_high.stl"/>
|
||||||
|
</geometry>
|
||||||
|
<material name="clay" />
|
||||||
|
</visual>
|
||||||
|
</link>
|
||||||
|
</robot>
|
||||||
Binary file not shown.
11
unilabos/device_mesh/resources/tiprack_96_high/modal.xacro
Normal file
11
unilabos/device_mesh/resources/tiprack_96_high/modal.xacro
Normal file
@@ -0,0 +1,11 @@
|
|||||||
|
<?xml version="1.0" ?>
|
||||||
|
<robot xmlns:xacro="http://www.ros.org/wiki/xacro" name="tiprack_96_high">
|
||||||
|
<link name='plate_link'>
|
||||||
|
<visual name='visual'>
|
||||||
|
<geometry>
|
||||||
|
<mesh filename="meshes/tiprack_96_high.stl"/>
|
||||||
|
</geometry>
|
||||||
|
<material name="clay" />
|
||||||
|
</visual>
|
||||||
|
</link>
|
||||||
|
</robot>
|
||||||
@@ -1,31 +1,5 @@
|
|||||||
arm_slider_arm_controller:
|
|
||||||
ros__parameters:
|
|
||||||
command_interfaces:
|
|
||||||
- position
|
|
||||||
joints:
|
|
||||||
- arm_slider_arm_base_joint
|
|
||||||
- arm_slider_arm_link_1_joint
|
|
||||||
- arm_slider_arm_link_2_joint
|
|
||||||
- arm_slider_arm_link_3_joint
|
|
||||||
- arm_slider_gripper_base_joint
|
|
||||||
state_interfaces:
|
|
||||||
- position
|
|
||||||
- velocity
|
|
||||||
arm_slider_gripper_controller:
|
|
||||||
ros__parameters:
|
|
||||||
command_interfaces:
|
|
||||||
- position
|
|
||||||
joints:
|
|
||||||
- arm_slider_gripper_right_joint
|
|
||||||
state_interfaces:
|
|
||||||
- position
|
|
||||||
- velocity
|
|
||||||
controller_manager:
|
controller_manager:
|
||||||
ros__parameters:
|
ros__parameters:
|
||||||
arm_slider_arm_controller:
|
|
||||||
type: joint_trajectory_controller/JointTrajectoryController
|
|
||||||
arm_slider_gripper_controller:
|
|
||||||
type: joint_trajectory_controller/JointTrajectoryController
|
|
||||||
joint_state_broadcaster:
|
joint_state_broadcaster:
|
||||||
type: joint_state_broadcaster/JointStateBroadcaster
|
type: joint_state_broadcaster/JointStateBroadcaster
|
||||||
update_rate: 100
|
update_rate: 100
|
||||||
|
|||||||
@@ -7,3 +7,28 @@ class HotelContainer:
|
|||||||
|
|
||||||
def get_rotation(self):
|
def get_rotation(self):
|
||||||
return self.rotation
|
return self.rotation
|
||||||
|
|
||||||
|
|
||||||
|
class DeckContainer:
|
||||||
|
def __init__(self, rotation: dict, **kwargs):
|
||||||
|
self.rotation = rotation
|
||||||
|
self.status = 'idle'
|
||||||
|
|
||||||
|
def get_rotation(self):
|
||||||
|
return self.rotation
|
||||||
|
|
||||||
|
class TipRackContainer:
|
||||||
|
def __init__(self, rotation: dict, **kwargs):
|
||||||
|
self.rotation = rotation
|
||||||
|
self.status = 'idle'
|
||||||
|
|
||||||
|
def get_rotation(self):
|
||||||
|
return self.rotation
|
||||||
|
|
||||||
|
class PlateContainer:
|
||||||
|
def __init__(self, rotation: dict, **kwargs):
|
||||||
|
self.rotation = rotation
|
||||||
|
self.status = 'idle'
|
||||||
|
|
||||||
|
def get_rotation(self):
|
||||||
|
return self.rotation
|
||||||
@@ -2187,65 +2187,65 @@ virtual_multiway_valve:
|
|||||||
data_source: executor
|
data_source: executor
|
||||||
data_type: fluid
|
data_type: fluid
|
||||||
description: 八通阀门端口1
|
description: 八通阀门端口1
|
||||||
handler_key: "1"
|
handler_key: '1'
|
||||||
io_type: source
|
io_type: source
|
||||||
label: "1"
|
label: '1'
|
||||||
side: NORTH
|
side: NORTH
|
||||||
- data_key: fluid_port_2
|
- data_key: fluid_port_2
|
||||||
data_source: executor
|
data_source: executor
|
||||||
data_type: fluid
|
data_type: fluid
|
||||||
description: 八通阀门端口2
|
description: 八通阀门端口2
|
||||||
handler_key: "2"
|
handler_key: '2'
|
||||||
io_type: source
|
io_type: source
|
||||||
label: "2"
|
label: '2'
|
||||||
side: EAST
|
side: EAST
|
||||||
- data_key: fluid_port_3
|
- data_key: fluid_port_3
|
||||||
data_source: executor
|
data_source: executor
|
||||||
data_type: fluid
|
data_type: fluid
|
||||||
description: 八通阀门端口3
|
description: 八通阀门端口3
|
||||||
handler_key: "3"
|
handler_key: '3'
|
||||||
io_type: source
|
io_type: source
|
||||||
label: "3"
|
label: '3'
|
||||||
side: EAST
|
side: EAST
|
||||||
- data_key: fluid_port_4
|
- data_key: fluid_port_4
|
||||||
data_source: executor
|
data_source: executor
|
||||||
data_type: fluid
|
data_type: fluid
|
||||||
description: 八通阀门端口4
|
description: 八通阀门端口4
|
||||||
handler_key: "4"
|
handler_key: '4'
|
||||||
io_type: source
|
io_type: source
|
||||||
label: "4"
|
label: '4'
|
||||||
side: SOUTH
|
side: SOUTH
|
||||||
- data_key: fluid_port_5
|
- data_key: fluid_port_5
|
||||||
data_source: executor
|
data_source: executor
|
||||||
data_type: fluid
|
data_type: fluid
|
||||||
description: 八通阀门端口5
|
description: 八通阀门端口5
|
||||||
handler_key: "5"
|
handler_key: '5'
|
||||||
io_type: source
|
io_type: source
|
||||||
label: "5"
|
label: '5'
|
||||||
side: SOUTH
|
side: SOUTH
|
||||||
- data_key: fluid_port_6
|
- data_key: fluid_port_6
|
||||||
data_source: executor
|
data_source: executor
|
||||||
data_type: fluid
|
data_type: fluid
|
||||||
description: 八通阀门端口6
|
description: 八通阀门端口6
|
||||||
handler_key: "6"
|
handler_key: '6'
|
||||||
io_type: source
|
io_type: source
|
||||||
label: "6"
|
label: '6'
|
||||||
side: WEST
|
side: WEST
|
||||||
- data_key: fluid_port_7
|
- data_key: fluid_port_7
|
||||||
data_source: executor
|
data_source: executor
|
||||||
data_type: fluid
|
data_type: fluid
|
||||||
description: 八通阀门端口7
|
description: 八通阀门端口7
|
||||||
handler_key: "7"
|
handler_key: '7'
|
||||||
io_type: source
|
io_type: source
|
||||||
label: "7"
|
label: '7'
|
||||||
side: WEST
|
side: WEST
|
||||||
- data_key: fluid_port_8
|
- data_key: fluid_port_8
|
||||||
data_source: executor
|
data_source: executor
|
||||||
data_type: fluid
|
data_type: fluid
|
||||||
description: 八通阀门端口8
|
description: 八通阀门端口8
|
||||||
handler_key: "8"
|
handler_key: '8'
|
||||||
io_type: source
|
io_type: source
|
||||||
label: "8"
|
label: '8'
|
||||||
side: NORTH
|
side: NORTH
|
||||||
icon: EightPipeline.webp
|
icon: EightPipeline.webp
|
||||||
init_param_schema:
|
init_param_schema:
|
||||||
|
|||||||
57
unilabos/registry/resources/common/resource_container.yaml
Normal file
57
unilabos/registry/resources/common/resource_container.yaml
Normal file
@@ -0,0 +1,57 @@
|
|||||||
|
plate_96_high:
|
||||||
|
description: 96孔板
|
||||||
|
class:
|
||||||
|
module: unilabos.devices.resource_container.container:PlateContainer
|
||||||
|
type: python
|
||||||
|
model:
|
||||||
|
type: resource
|
||||||
|
mesh: plate_96_high/meshes/plate_96_high.stl
|
||||||
|
mesh_tf:
|
||||||
|
- 0
|
||||||
|
- 0.086
|
||||||
|
- 0
|
||||||
|
- 1.5708
|
||||||
|
- 0
|
||||||
|
- 1.5708
|
||||||
|
|
||||||
|
|
||||||
|
hplc_plate:
|
||||||
|
description: HPLC板
|
||||||
|
class:
|
||||||
|
module: unilabos.devices.resource_container.container:PlateContainer
|
||||||
|
type: python
|
||||||
|
model:
|
||||||
|
type: resource
|
||||||
|
mesh: hplc_plate/meshes/hplc_plate.stl
|
||||||
|
mesh_tf:
|
||||||
|
- 0
|
||||||
|
- 0
|
||||||
|
- 0
|
||||||
|
- 0
|
||||||
|
- 0
|
||||||
|
- 3.1416
|
||||||
|
|
||||||
|
|
||||||
|
tiprack_96_high:
|
||||||
|
description: 96孔板
|
||||||
|
class:
|
||||||
|
module: unilabos.devices.resource_container.container:TipRackContainer
|
||||||
|
type: python
|
||||||
|
model:
|
||||||
|
type: resource
|
||||||
|
mesh: tiprack_96_high/meshes/tiprack_96_high.stl
|
||||||
|
mesh_tf:
|
||||||
|
- 0
|
||||||
|
- 0.086
|
||||||
|
- 0
|
||||||
|
- 1.5708
|
||||||
|
- 0
|
||||||
|
- 1.5708
|
||||||
|
children_mesh: generic_labware_tube_10_75/meshes/0_base.stl
|
||||||
|
children_mesh_tf:
|
||||||
|
- 0.0018
|
||||||
|
- 0.0018
|
||||||
|
- -0.03
|
||||||
|
- -1.5708
|
||||||
|
- 0
|
||||||
|
- 0
|
||||||
@@ -16,12 +16,11 @@ OTDeck:
|
|||||||
registry_type: resource
|
registry_type: resource
|
||||||
version: 1.0.0
|
version: 1.0.0
|
||||||
|
|
||||||
|
|
||||||
hplc_station:
|
hplc_station:
|
||||||
description: Opentrons deck
|
description: hplc_station deck
|
||||||
class:
|
class:
|
||||||
module: pylabrobot.resources.opentrons.deck:OTDeck
|
module: unilabos.devices.resource_container.container:DeckContainer
|
||||||
type: pylabrobot
|
type: python
|
||||||
model:
|
model:
|
||||||
type: device
|
type: device
|
||||||
mesh: hplc_station
|
mesh: hplc_station
|
||||||
Reference in New Issue
Block a user