forked from RootInnovationTW/scara_fish_processing
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmain.py
More file actions
27 lines (23 loc) · 730 Bytes
/
Copy pathmain.py
File metadata and controls
27 lines (23 loc) · 730 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
import numpy as np
from integrated_system import IntegratedFishProcessingSystem
if __name__ == "__main__":
system_params = {
'L1': 300,
'L2': 250,
'z_range': (0, 200),
'servo_pins': {
'theta1': 17,
'theta2': 18,
'z': 27
}
}
system = IntegratedFishProcessingSystem(system_params)
try:
fish_image = np.random.randint(0, 255, (480, 640, 3), dtype=np.uint8)
task = system.process_fish_image(fish_image, target_weight=40)
fish_position = np.array([200, 100, 50])
system.execute_cutting_task(task, fish_position)
except Exception as e:
print(f"錯誤: {e}")
finally:
system.cleanup()