feat: 增加动作队列
This commit is contained in:
14
main.py
14
main.py
@@ -18,6 +18,12 @@ cfg_main = toml.load('cfg_main.toml')
|
||||
# 配置日志输出
|
||||
logger.add(cfg_main['debug']['logger_filename'], format=cfg_main['debug']['logger_format'], retention = 5, level="INFO")
|
||||
|
||||
act.cmd.camera(180)
|
||||
act.cmd.x2(1, 140)
|
||||
act.cmd.storage(20)
|
||||
act.cmd.scoop(25)
|
||||
|
||||
|
||||
# 向任务队列添加任务
|
||||
task_queue = queue.Queue()
|
||||
if cfg_main['task']['Subtask_enable'] is True:
|
||||
@@ -47,14 +53,6 @@ def worker_thread():
|
||||
# 启动工作线程
|
||||
worker = threading.Thread(target=worker_thread, daemon=True)
|
||||
worker.start()
|
||||
# if (cmd_py_obj.send_angle_camera(180) == -1):
|
||||
# cmd_py_obj.send_angle_camera(180)
|
||||
cmd_py_obj.send_position_axis_x(1, 140)
|
||||
time.sleep(0.5)
|
||||
cmd_py_obj.send_angle_storage(20)
|
||||
time.sleep(0.5)
|
||||
cmd_py_obj.send_angle_scoop(25)
|
||||
time.sleep(2)
|
||||
|
||||
# 创建主任务
|
||||
main_task_t = mj.main_task(cmd_py_obj) # 初始化时传入 zmq socket 对象
|
||||
|
||||
Reference in New Issue
Block a user