Skip to content

Commit 9e6cee8

Browse files
author
andy
committed
upload burnning rock
1 parent 6a40079 commit 9e6cee8

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

51 files changed

+8677
-0
lines changed

oem_projects/burning_rock/Pipfile

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
[[source]]
2+
url = "https://pypi.org/simple"
3+
verify_ssl = true
4+
name = "pypi"
5+
6+
[packages]
7+
8+
[dev-packages]
9+
10+
[requires]
11+
python_version = "3.7"

oem_projects/burning_rock/README.md

Lines changed: 204 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,204 @@
1+
# OT2R-API
2+
3+
## About
4+
5+
1. App Version: 6.3.1
6+
2. Robot Server: 6.3.1
7+
3. ThisVersion: 1.2.0
8+
9+
## News-1.2.0
10+
11+
1. updata HTTP API
12+
13+
- get : /robot/door/status
14+
get the door status
15+
16+
- get: /version
17+
get the release version
18+
19+
2. update the demo for PCR part (./examples/tc_load_slot8.py)
20+
21+
- load lab-ware on slot8
22+
- run profile
23+
24+
3. update door_stauts demo (./examples/door_status.py)
25+
26+
- get door status by HTTP API
27+
28+
4. update aspirate and dispense method
29+
30+
- add arguments, include leading_air_gap and lagged_air_gap in aspirate and dispense method
31+
- call these methods in ./examples/transfer_liquid.py
32+
33+
5. protocol_context.py
34+
35+
- return_tip()
36+
- mix_liquid()
37+
38+
## News-1.1.0
39+
40+
1. update a string of calibration HTTP API, include:
41+
- deck calibration
42+
- tip length calibration
43+
- pipette offset calibration
44+
- labware calibration
45+
2. add load custom labware HTTP API, and demo file
46+
3. add transfer liquid demo test by load custom labware
47+
48+
49+
50+
## API Document
51+
52+
[api-document](127.0.0.1/ot2-openapi_api_project.html)
53+
54+
## Hardware API Description
55+
56+
directory -> (./hardware_control)
57+
58+
1. home - done
59+
2. move_to - done
60+
3. move_rel - done
61+
4. require_useful_pos - done
62+
5. identify_robot - done
63+
64+
## Protocol API Description
65+
66+
directory -> (./protocol)
67+
68+
1. require_saved_pos - done
69+
2. move_to - done
70+
3. move_rel - done
71+
4. move_to_slot - fail
72+
5. move_to_well - done
73+
6. require_last_run_status - done
74+
7. require_all_runs - done
75+
8. delete_run_by_id - done
76+
9. clear_runs - done
77+
10. wait_for_protocol_stop - done
78+
11. home - done
79+
12. run_protocol - done
80+
13. stop_protocol - done
81+
14. pause_protocol - done
82+
15. drop - done
83+
16. pick_up - done
84+
17. load_liquid - done
85+
18. load_pipette - done
86+
19. load_labware - done
87+
20. build-context - done
88+
21. get_commands - done
89+
22. blow_out - done
90+
23. aspirate - done
91+
24. dispense - done
92+
25. touch_tip - debug
93+
94+
## System API Description
95+
96+
1. get_network_status - done
97+
2. get_wifi_list - done
98+
3. set_configure_wifi -done
99+
4. get_wifi_keys - done
100+
5. set_wifi_keys - done
101+
6. set_delete_wifi_key -done
102+
7. set_disconnect_wifi - done
103+
8. set_ot2_blink_gantry_lights -done
104+
9. get_robot_lights -done
105+
10. set_robot_lights -done
106+
11. get_settings -done
107+
12. set_settings -done
108+
13. set_log_level - done
109+
14. set_log_level_upstream - done
110+
15. get_settings_reset - done
111+
16. get_robot_settings -done
112+
17. get_pipette_settings - done
113+
18. get_pipette_setting_by_id -done
114+
19. patch_pipette_setting_by_id - done
115+
20. get_calibration_status - done
116+
21. set_execute_module_command -done
117+
22. get_system_health - done
118+
23. get_pipettes_currently_attached - done
119+
24. get_engaged_motors - done
120+
25. set_disengage_motors - done
121+
26. set_capture_an_image - done
122+
27. get_logs - done
123+
124+
## Modules/Heatershaker API Description
125+
126+
1. open_labware_latch - done
127+
2. close_labware_latch - done
128+
3. set_target_temperature - done
129+
4. wait_for_temperature - done
130+
5. get_target_temperature - done
131+
6. get_target_speed - done
132+
7. get_latch_status - done
133+
8. deactivate_shaker - done
134+
9. deactivate_heater - done
135+
10. set_wait_shaker_speed - done
136+
137+
## Modules/Magnetic API Description
138+
139+
1. engage_magnetic - done
140+
2. disengage - done
141+
142+
## Modules/TemperatureModule API Description
143+
144+
1. wait_for_temperature - done
145+
2. get_target_temperature - done
146+
3. set_temperature - done
147+
4. deactivate - done
148+
149+
## Modules/Thermocycler
150+
151+
1. run_profile - fail
152+
2. open_lid - done
153+
3. close_lid - done
154+
4. set_lid_temperature - done
155+
5. wait_for_lid_temperature - done
156+
6. deactivate_lid - done
157+
7. deactivate_block -done
158+
8. wait_for_block_temperature - done
159+
9. get_block_temperature - done
160+
10. get_lid_temperature - done
161+
11. get_lid_status - done
162+
12. set_block_temperature - done
163+
164+
## QuickStart
165+
166+
```tex
167+
请参考我们的一些示例: ./examples
168+
进行一些移液,模块控制,和运动控制的基本操作。
169+
170+
- By合创生物
171+
```
172+
173+
## TODO
174+
175+
1. calibration_flow
176+
校准deck, tiplength, pipette offset
177+
178+
2. load_protocol_flow
179+
load a protocol, analyze, and run
180+
181+
## 调用 HTTP 方法
182+
183+
```python
184+
from http_client import HttpClient
185+
186+
ret = HttpClient.get("/health") # get 方法
187+
ret = HttpClient.post("/robot/lights", data={"on": False}) # post 方法
188+
189+
# ret 返回元组,ret[0] = state_code: int, ret[1] = respons: dict
190+
```
191+
192+
## Opentrons branch tracker
193+
194+
```context
195+
https://github.com/Opentrons/opentrons/tree/firerock-stable-6.3.1
196+
```
197+
198+
## Opentrons image tracker
199+
200+
```context
201+
https://builds.opentrons.com/ot2-br/7722243621/ot2-fullimage.zip
202+
```
203+
204+

oem_projects/burning_rock/__init__.py

Whitespace-only changes.

oem_projects/burning_rock/examples/__init__.py

Whitespace-only changes.
Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
from solutions.calibration_flow import CalibrationFlow
2+
import asyncio
3+
from ot_type import Mount
4+
5+
6+
async def _main():
7+
c_f = CalibrationFlow()
8+
# exit all
9+
await c_f.excuse_exit_calibration(_all=True)
10+
11+
# deck calibration
12+
_input = input("do deck calibration ? (y/n)")
13+
if _input == 'y':
14+
await c_f.deck_calibration()
15+
16+
# tip length calibration & pipette offset
17+
for mount in [Mount.LEFT, Mount.RIGHT]:
18+
_input = input(f"do tip length - {mount.value} calibration ? (y/n)")
19+
if _input == 'y':
20+
await c_f.tip_length_calibration(mount)
21+
22+
_input = input(f"do pipette offset - {mount.value} calibration ? (y/n)")
23+
if _input == 'y':
24+
await c_f.pipette_offset_calibration(mount)
25+
26+
if __name__ == '__main__':
27+
asyncio.run(_main())
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
from http_client import HttpClient
2+
3+
4+
def get_door_status():
5+
"""
6+
get door status
7+
:return:
8+
"""
9+
ret = HttpClient.get("/robot/door/status")
10+
HttpClient.judge_state_code(ret)
11+
data = ret[1]
12+
if data["door_status"] is False:
13+
return "Opened"
14+
else:
15+
return "Closed"
16+
17+
18+
if __name__ == '__main__':
19+
ret = get_door_status()
20+
print(ret)
Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
import time
2+
3+
from modules.heatershaker import HeaterShakerModule
4+
from ot_type import ModuleName
5+
import asyncio
6+
7+
8+
async def _main():
9+
_shaker_module = HeaterShakerModule()
10+
shaker_v2 = await _shaker_module.get_module_id_by_name(ModuleName.HEATER_SHAKER_MODULE_V1)
11+
this_module_id = shaker_v2[0]
12+
await _shaker_module.set_target_temperature(this_module_id, 50)
13+
await _shaker_module.wait_for_temperature(this_module_id)
14+
await _shaker_module.set_wait_shaker_speed(this_module_id, 1000)
15+
temp = await _shaker_module.get_target_temperature(this_module_id)
16+
speed = await _shaker_module.get_target_speed(this_module_id)
17+
print(f"Temp: {temp}")
18+
print(f"Speed: {speed}")
19+
20+
await _shaker_module.deactivate_shaker(this_module_id)
21+
await _shaker_module.deactivate_heater(this_module_id)
22+
23+
await _shaker_module.open_labware_latch(this_module_id)
24+
status = await _shaker_module.get_latch_status(this_module_id)
25+
print(f"Latch Status: {status}")
26+
await _shaker_module.close_labware_latch(this_module_id)
27+
status = await _shaker_module.get_latch_status(this_module_id)
28+
print(f"Latch Status: {status}")
29+
30+
if __name__ == '__main__':
31+
asyncio.run(_main())
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
from modules.magnetic import MagneticModule
2+
from ot_type import ModuleName
3+
import asyncio
4+
5+
6+
async def _main():
7+
_magnetic = MagneticModule()
8+
mag_v2 = await _magnetic.get_module_id_by_name(ModuleName.MAGNETIC_MODULE_V2)
9+
height = await _magnetic.engage_magnetic(mag_v2[0], 20)
10+
print("Height: ", height)
11+
await _magnetic.disengage(mag_v2[0])
12+
13+
14+
if __name__ == '__main__':
15+
asyncio.run(_main())
Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
"""
2+
move opentrons flex with protocol
3+
"""
4+
5+
from protocol.protocol_context import ProtocolContext
6+
from ot_type import Instrument, LabWare, Mount, Point, Axis
7+
import asyncio
8+
import time
9+
10+
11+
async def _main():
12+
api = ProtocolContext()
13+
mount = Mount.LEFT
14+
await api.build_context(clear=True)
15+
await api.home()
16+
# load
17+
pipette_p300_s = await api.load_pipette(Instrument.PIPETTE_P20_SIGNAL_GEN2, mount)
18+
tip_20ul = await api.load_labware(LabWare.OPENTRONS_96_TIPRACK_20UL, slot_name="2")
19+
pipette_p300_s = pipette_p300_s.pipette_id
20+
tip_20ul = tip_20ul.labware_id
21+
# excuse
22+
home_pos = await api.require_saved_pos(pipette_p300_s)
23+
print(f"Home Position: {home_pos}")
24+
# move to well
25+
# await api.move_to_well(pipette_p300_s, tip_20ul, well='A2', offset={"x": 0, "y": 0, "z": 20})
26+
# move to
27+
await api.move_to(pipette_p300_s, position=Point(100, 100, 100))
28+
# move relative
29+
await api.move_rel(pipette_p300_s, Axis.X, 50)
30+
time.sleep(0.5)
31+
await api.move_rel(pipette_p300_s, Axis.Y, 50)
32+
time.sleep(0.5)
33+
rel_pos = await api.move_rel(pipette_p300_s, Axis.Z, -50)
34+
print(f"Current Position: {rel_pos}")
35+
# home
36+
await api.run_protocol()
37+
38+
39+
if __name__ == '__main__':
40+
input("clean deck for move...")
41+
asyncio.run(_main())

0 commit comments

Comments
 (0)