Refactor task_3.py: rename and restructure functions for clarity and improved execution flow. Introduced pass_up_down function and redefined run_task_3 to enhance task management.
This commit is contained in:
parent
af412c707e
commit
39f548a79d
@ -35,12 +35,7 @@ robot_cmd = {
|
||||
'value':0, 'duration':0
|
||||
}
|
||||
|
||||
def run_task_3(ctrl, msg):
|
||||
section('任务3:步态切换', "启动")
|
||||
info('开始执行任务3...', "启动")
|
||||
|
||||
turn_degree_v2(ctrl, msg, 90, absolute=True)
|
||||
|
||||
def pass_up_down(ctrl, msg):
|
||||
usergait_msg = file_send_lcmt()
|
||||
lcm_usergait = lcm.LCM("udpm://239.255.76.67:7671?ttl=255")
|
||||
|
||||
@ -335,3 +330,16 @@ def run_task_3(ctrl, msg):
|
||||
msg.life_count += 1
|
||||
ctrl.Send_cmd(msg)
|
||||
pass
|
||||
|
||||
|
||||
def run_task_3(ctrl, msg):
|
||||
section('任务3:步态切换', "启动")
|
||||
info('开始执行任务3...', "启动")
|
||||
|
||||
turn_degree_v2(ctrl, msg, 90, absolute=True)
|
||||
|
||||
# section('任务3-1:up', "开始")
|
||||
# pass_up_down(ctrl, msg)
|
||||
|
||||
section('任务3-2:yellow stop', "开始")
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user