CN115145233B - Multi-stage small-granularity movement scheduling control method, device and equipment for robot - Google Patents

Multi-stage small-granularity movement scheduling control method, device and equipment for robot Download PDF

Info

Publication number
CN115145233B
CN115145233B CN202210880116.3A CN202210880116A CN115145233B CN 115145233 B CN115145233 B CN 115145233B CN 202210880116 A CN202210880116 A CN 202210880116A CN 115145233 B CN115145233 B CN 115145233B
Authority
CN
China
Prior art keywords
task
priority
tasks
action
scheduling
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202210880116.3A
Other languages
Chinese (zh)
Other versions
CN115145233A (en
Inventor
肖勇
李华
刘斌斌
刘中华
邹明
李颖博
刘育婷
卢斌
张岩
柏雪
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Xian Thermal Power Research Institute Co Ltd
Huaneng Group Technology Innovation Center Co Ltd
Xian Xire Control Technology Co Ltd
Original Assignee
Xian Thermal Power Research Institute Co Ltd
Huaneng Group Technology Innovation Center Co Ltd
Xian Xire Control Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Xian Thermal Power Research Institute Co Ltd, Huaneng Group Technology Innovation Center Co Ltd, Xian Xire Control Technology Co Ltd filed Critical Xian Thermal Power Research Institute Co Ltd
Priority to CN202210880116.3A priority Critical patent/CN115145233B/en
Publication of CN115145233A publication Critical patent/CN115145233A/en
Application granted granted Critical
Publication of CN115145233B publication Critical patent/CN115145233B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G05CONTROLLING; REGULATING
    • G05BCONTROL OR REGULATING SYSTEMS IN GENERAL; FUNCTIONAL ELEMENTS OF SUCH SYSTEMS; MONITORING OR TESTING ARRANGEMENTS FOR SUCH SYSTEMS OR ELEMENTS
    • G05B19/00Programme-control systems
    • G05B19/02Programme-control systems electric
    • G05B19/418Total factory control, i.e. centrally controlling a plurality of machines, e.g. direct or distributed numerical control [DNC], flexible manufacturing systems [FMS], integrated manufacturing systems [IMS] or computer integrated manufacturing [CIM]
    • G05B19/41865Total factory control, i.e. centrally controlling a plurality of machines, e.g. direct or distributed numerical control [DNC], flexible manufacturing systems [FMS], integrated manufacturing systems [IMS] or computer integrated manufacturing [CIM] characterised by job scheduling, process planning, material flow
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • G06F9/48Program initiating; Program switching, e.g. by interrupt
    • G06F9/4806Task transfer initiation or dispatching
    • G06F9/4843Task transfer initiation or dispatching by program, e.g. task dispatcher, supervisor, operating system
    • G06F9/4881Scheduling strategies for dispatcher, e.g. round robin, multi-level priority queues
    • GPHYSICS
    • G05CONTROLLING; REGULATING
    • G05BCONTROL OR REGULATING SYSTEMS IN GENERAL; FUNCTIONAL ELEMENTS OF SUCH SYSTEMS; MONITORING OR TESTING ARRANGEMENTS FOR SUCH SYSTEMS OR ELEMENTS
    • G05B2219/00Program-control systems
    • G05B2219/30Nc systems
    • G05B2219/32Operator till task planning
    • G05B2219/32252Scheduling production, machining, job shop
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F2209/00Indexing scheme relating to G06F9/00
    • G06F2209/48Indexing scheme relating to G06F9/48
    • G06F2209/484Precedence
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02PCLIMATE CHANGE MITIGATION TECHNOLOGIES IN THE PRODUCTION OR PROCESSING OF GOODS
    • Y02P90/00Enabling technologies with a potential contribution to greenhouse gas [GHG] emissions mitigation
    • Y02P90/02Total factory control, e.g. smart factories, flexible manufacturing systems [FMS] or integrated manufacturing systems [IMS]

Landscapes

  • Engineering & Computer Science (AREA)
  • General Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Software Systems (AREA)
  • Theoretical Computer Science (AREA)
  • Manufacturing & Machinery (AREA)
  • Quality & Reliability (AREA)
  • Automation & Control Theory (AREA)
  • Manipulator (AREA)

Abstract

本发明公开了一种机器人多级小粒度运动调度控制方法、装置及设备,将机器人的运动调度任务从上向下按层依次分为任务、动作组和动作,各任务均包括动作组,每个动作组包括若干个动作,动作即是任务可拆分的最小可执行单位;运动调度控制时采用抢占式高优先权优先调度法HPF,在当前任务中周期性查询高优先级任务,如果查询到的高优先级任务高于当前正在运行的任务,则保存当前任务的参数和状态,来执行高优先级的任务,以及执行该任务下的动作组,如果查询到的高优先级任务低于或等于当前正在运行的任务,则继续执行当前正在运行的任务,当前正在运行的任务结束后休眠设定时间,然后重新查询优先级任务,本发明支持复杂运动场景的调度。

The invention discloses a multi-level small-grained motion scheduling control method, device and equipment for a robot. The motion scheduling tasks of a robot are sequentially divided into tasks, action groups and actions from top to bottom. Each task includes an action group. An action group includes several actions, and an action is the smallest executable unit that can be split into tasks; the preemptive high-priority priority scheduling method HPF is used in motion scheduling control, and high-priority tasks are periodically queried in the current task. If the detected high priority task is higher than the currently running task, save the parameters and status of the current task to execute the high priority task and execute the action group under the task. If the queried high priority task is lower than or equal to the currently running task, then continue to execute the currently running task, sleep for a set time after the currently running task ends, and then re-query the priority task. The invention supports the scheduling of complex motion scenes.

Description

一种机器人多级小粒度运动调度控制方法、装置及设备A multi-level small-grained motion scheduling control method, device and equipment for a robot

技术领域technical field

本发明属于任务调度控制方法,具体涉及一种机器人多级小粒度运动调度控制方法、装置及设备。The invention belongs to a task scheduling control method, in particular to a robot multi-level small granularity motion scheduling control method, device and equipment.

背景技术Background technique

任务调度是轨道机器人运动控制的重点和难点,目前的任务调度主要包括手动任务和巡检任务的切换和管理多个任务的任务池。该方法只能解决简单运动场景的机器人运动控制,面对多种场景如低电量充电、定点触发动作等场景,该运动调度就无法满足。在这种简单调度机制下只能通过特殊处理来解决,由此引发严重的代码耦合。Task scheduling is the focus and difficulty of orbital robot motion control. The current task scheduling mainly includes the switching of manual tasks and inspection tasks and the task pool for managing multiple tasks. This method can only solve the robot motion control of simple motion scenes. In the face of various scenarios such as low battery charging, fixed-point triggering actions, etc., the motion scheduling cannot be satisfied. Under this simple scheduling mechanism, it can only be solved by special processing, which leads to serious code coupling.

复杂场景下的机器人运动调度方法,通过任务优先级、时间片、动作组和树形数据结构解决了复杂场景下的机器人运动调度,提高了代码可复用性,大大降低了代码耦合性。现有的调度算法比较复杂,代码易读性差,任务是通过树形结构来管理,为了确保多线程的一致性,加锁的粒度比较大。The robot motion scheduling method in complex scenes solves the robot motion scheduling in complex scenes through task priority, time slice, action group and tree data structure, improves code reusability, and greatly reduces code coupling. The existing scheduling algorithm is relatively complicated, and the code is not easy to read. Tasks are managed through a tree structure. In order to ensure the consistency of multi-threading, the granularity of locking is relatively large.

发明内容Contents of the invention

针对现有技术中存在的问题,本发明提供了一种机器人多级小粒度运动调度控制方法、装置及设备,支持复杂运动场景的调度,在解决任务调度的同时不增加代码的复杂性和耦合性。Aiming at the problems existing in the prior art, the present invention provides a robot multi-level small-grained motion scheduling control method, device and equipment, which supports the scheduling of complex motion scenes, and does not increase the complexity and coupling of code while solving task scheduling sex.

为了解决上述技术问题,本发明通过以下技术方案予以实现:In order to solve the above technical problems, the present invention is achieved through the following technical solutions:

一种机器人多级小粒度运动调度控制方法,包括:A multi-level small-grained motion scheduling control method for a robot, comprising:

将机器人的运动调度任务从上向下按层依次分为任务、动作组和动作,各任务均包括动作组,每个动作组包括若干个动作,动作即是任务可拆分的最小可执行单位;The robot's motion scheduling tasks are divided into tasks, action groups and actions from top to bottom. Each task includes action groups, and each action group includes several actions. Actions are the smallest executable units that can be split into tasks. ;

运动调度控制时采用抢占式高优先权优先调度法HPF,在当前任务中周期性查询高优先级任务,如果查询到的高优先级任务高于当前正在运行的任务,则保存当前任务的参数和状态,来执行高优先级的任务,以及执行该任务下的动作组,如果查询到的高优先级任务低于或等于当前正在运行的任务,则继续执行当前正在运行的任务,当前正在运行的任务结束后休眠设定时间,然后重新查询优先级任务。The preemptive high-priority priority scheduling method HPF is used in motion scheduling control, and the high-priority task is periodically queried in the current task. If the queried high-priority task is higher than the currently running task, the parameters and parameters of the current task are saved. state, to execute the high priority task, and execute the action group under the task, if the queried high priority task is lower than or equal to the currently running task, continue to execute the currently running task, the currently running task Sleep for a set time after the task ends, and then re-query the priority task.

进一步地,所述查询高优先级任务时,如果目前最高级任务是人工控制任务,则在相同优先级的任务,按照剥夺式后来先服务顺序进行调度,同时清除人工控制任务下所有的其他子任务,执行当前的最新的子任务。Further, when inquiring about high-priority tasks, if the current highest-level task is a manual control task, tasks with the same priority will be scheduled according to the deprivation-style last-first-served order, and all other child tasks under the manual control task will be cleared at the same time. Task, execute the current latest subtask.

进一步地,所述查询高优先级任务时,如果目前最高级任务是非人工控制任务,在相同优先级的任务,按照用先来先服务调度顺序,然后按照树形数据结构的深度左查询方法来查找到优先级最高的任务。Further, when inquiring about high-priority tasks, if the current highest-level task is a non-manual control task, tasks with the same priority are scheduled in the order of first-come-first-served, and then searched according to the depth left query method of the tree data structure. Find the task with the highest priority.

进一步地,在执行各动作组时,动作组中各动作按照先进先出的原则来执行,具体如下:Further, when executing each action group, each action in the action group is executed according to the first-in-first-out principle, as follows:

查询该动作组所属任务是否中断,若没有中断,则从动作组的动作列表索引从头开始执行当前动作,同时查询下一个动作;若执行当前动作时,有查询到下一个动作,则将当前任务状态设为执行成功;Query whether the task to which the action group belongs is interrupted. If there is no interruption, the current action will be executed from the beginning of the action list index of the action group, and the next action will be queried at the same time; The status is set to execute successfully;

对于所查询到的下一个动作尝试执行,且尝试次数不多于3次,若尝试执行成功,则将当前任务状态设为正在执行,若尝试执行3次均未响应,则判断为阻塞动作,将该动作状态设为执行失败;Try to execute the next action queried, and the number of attempts is not more than 3. If the attempt is successful, the current task status will be set as executing. If there is no response after 3 attempts, it will be judged as a blocking action. Set the action status to execution failure;

遍历动作组的动作列表后返回当前任务。Returns the current task after traversing the action list of the action group.

进一步地,各个任务执行完毕后,即将该任务从任务桶里删除掉,任务中的某个动作组执行完毕,会将该动作组从该任务中删除,动作组是任务切换保存该任务运行场景的最小粒度单位。Furthermore, after each task is executed, the task will be deleted from the task bucket. After an action group in the task is executed, the action group will be deleted from the task. The action group is the task switching to save the task running scene The smallest unit of granularity.

一种机器人多级小粒度运动调度控制装置,包括:A multi-level small-grained motion scheduling control device for a robot, comprising:

运动调度任务划分模块,用于将机器人的运动调度任务从上向下按层依次分为任务、动作组和动作,各任务均包括动作组,每个动作组包括若干个动作,动作即是任务可拆分的最小可执行单位;The motion scheduling task division module is used to divide the robot's motion scheduling tasks into tasks, action groups and actions from top to bottom. Each task includes action groups, and each action group includes several actions. Actions are tasks The smallest executable unit that can be split;

任务查询模块,用于运动调度控制时采用抢占式高优先权优先调度法HPF,在当前任务中周期性查询高优先级任务,如果查询到的高优先级任务高于当前正在运行的任务,则保存当前任务的参数和状态,来执行高优先级的任务,以及执行该任务下的动作组,如果查询到的高优先级任务低于或等于当前正在运行的任务,则继续执行当前正在运行的任务,当前正在运行的任务结束后休眠设定时间,然后重新查询优先级任务。The task query module is used for motion scheduling control and uses the preemptive high-priority priority scheduling method HPF to periodically query high-priority tasks in the current task. If the queried high-priority task is higher than the currently running task, then Save the parameters and status of the current task to execute the high-priority task and the action group under the task. If the queried high-priority task is lower than or equal to the currently running task, continue to execute the currently running task task, the currently running task sleeps for a set time after the end, and then re-queries the priority task.

进一步地,所述任务查询模块还用于在查询高优先级任务时,如果目前最高级任务是非人工控制任务,在相同优先级的任务,按照用先来先服务调度顺序,然后按照树形数据结构的深度左查询方法来查找到优先级最高的任务。Further, the task query module is also used for inquiring about high priority tasks, if the current highest level task is a non-manual control task, tasks of the same priority will be scheduled according to the first-come-first-served order, and then according to the tree data The structure's deep left query method to find the highest priority task.

进一步地,所述任务查询模块还用于在查询高优先级任务时,如果目前最高级任务是非人工控制任务,在相同优先级的任务,按照用先来先服务调度顺序,然后按照树形数据结构的深度左查询方法来查找到优先级最高的任务。Further, the task query module is also used for inquiring about high priority tasks, if the current highest level task is a non-manual control task, tasks of the same priority will be scheduled according to the first-come-first-served order, and then according to the tree data The structure's deep left query method to find the highest priority task.

一种设备,包括存储器、处理器以及存储在所述存储器中并可在所述处理器上运行的计算机程序,所述处理器执行所述计算机程序时实现一种机器人多级小粒度运动调度控制方法的步骤。A device comprising a memory, a processor, and a computer program stored in the memory and operable on the processor, when the processor executes the computer program, a multi-level small-grained motion scheduling control of a robot is realized method steps.

一种计算机可读存储介质,所述计算机可读存储介质存储有计算机程序,所述计算机程序被处理器执行时实现一种机器人多级小粒度运动调度控制方法的步骤。A computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the steps of a multi-level small-grained motion scheduling control method for a robot are realized.

与现有技术相比,本发明至少具有以下有益效果:Compared with the prior art, the present invention has at least the following beneficial effects:

(1)本发明支持复杂运动场景的调度,在解决任务调度的同时不增加代码的复杂性和耦合性;(1) The present invention supports the scheduling of complex motion scenes, and does not increase the complexity and coupling of the code while solving task scheduling;

(2)本发明通用性广,本发明只需要关心动作组、动作任务的划分,不关心业务本身,实现了和运动业务的解耦;(2) The present invention has wide versatility. The present invention only needs to care about the division of action groups and action tasks, and does not care about the business itself, and realizes the decoupling from the motion business;

(3)本发明调度响应快,时间片在毫秒级别;(3) The scheduling response of the present invention is fast, and the time slice is at the millisecond level;

(4)本发明粒度更小,采用动作为最小调度单位,调度的代价更小。(4) The granularity of the present invention is smaller, the action is used as the minimum scheduling unit, and the cost of scheduling is smaller.

为使本发明的上述目的、特征和优点能更明显易懂,下文特举较佳实施例,并配合所附附图,作详细说明如下。In order to make the above-mentioned objects, features and advantages of the present invention more comprehensible, preferred embodiments will be described in detail below together with the accompanying drawings.

附图说明Description of drawings

为了更清楚地说明本发明具体实施方式中的技术方案,下面将对具体实施方式描述中所需要使用的附图作简单地介绍,显而易见地,下面描述中的附图是本发明的一些实施方式,对于本领域普通技术人员来讲,在不付出创造性劳动的前提下,还可以根据这些附图获得其他的附图。In order to more clearly illustrate the technical solutions in the specific embodiments of the present invention, the drawings that need to be used in the description of the specific embodiments will be briefly introduced below. Obviously, the accompanying drawings in the following description are some embodiments of the present invention , for those skilled in the art, other drawings can also be obtained according to these drawings on the premise of not paying creative work.

图1为本发明的任务组织结构图;Fig. 1 is a task organization chart of the present invention;

图2为本发明的任务调度策略示意图;Fig. 2 is a schematic diagram of the task scheduling strategy of the present invention;

图3为本发明的查询最高优先级任务流程示意图;Fig. 3 is a schematic diagram of a task flow diagram of querying the highest priority in the present invention;

图4为本发明的动作组内动作执行流程图。Fig. 4 is a flowchart of action execution within an action group in the present invention.

具体实施方式Detailed ways

为使本发明实施例的目的、技术方案和优点更加清楚,下面将结合附图对本发明的技术方案进行清楚、完整地描述,显然,所描述的实施例是本发明一部分实施例,而不是全部的实施例。基于本发明中的实施例,本领域普通技术人员在没有做出创造性劳动前提下所获得的所有其他实施例,都属于本发明保护的范围。In order to make the purpose, technical solutions and advantages of the embodiments of the present invention clearer, the technical solutions of the present invention will be clearly and completely described below in conjunction with the accompanying drawings. Obviously, the described embodiments are part of the embodiments of the present invention, not all of them. the embodiment. Based on the embodiments of the present invention, all other embodiments obtained by persons of ordinary skill in the art without making creative efforts belong to the protection scope of the present invention.

如图1和图2所示,本发明的一种机器人多级小粒度运动调度控制方法,将机器人的运动调度任务从上向下按层依次分为任务、动作组和动作,各任务均包括动作组,每个动作组包括若干个动作,动作即是任务可拆分的最小可执行单位;运动调度控制时采用抢占式高优先权优先调度法HPF,即在当前任务中周期性查询优高先级任务,如果查询到的高优先级任务高于当前正在运行的任务,则保存当前任务的参数和状态,来执行高优先级的任务,以及执行该任务下的动作组,如果查询到的高优先级任务低于或等于当前正在运行的任务,则继续执行当前正在运行的任务,当前正在运行的任务结束后休眠一段时间,例如200ms,然后重新查询优先级任务。例如动作组是可以输出结果的一套动作(如巡检到某个点),任务是由一套动作组组成的有时序的任务(如巡检任务)。As shown in Figures 1 and 2, a multi-level small-grained motion scheduling control method for a robot of the present invention divides the robot's motion scheduling tasks into tasks, action groups, and actions from top to bottom, and each task includes Action group, each action group includes several actions, the action is the smallest executable unit that can be divided into tasks; the preemptive high priority priority scheduling method HPF is used in the motion scheduling control, that is, the priority is periodically queried in the current task Priority task, if the queried high-priority task is higher than the currently running task, save the parameters and status of the current task to execute the high-priority task, and execute the action group under the task, if the queried If the high-priority task is lower than or equal to the currently running task, continue to execute the currently running task, sleep for a period of time, such as 200ms, after the currently running task ends, and then query the priority task again. For example, an action group is a set of actions that can output results (such as inspection to a certain point), and a task is a sequential task composed of a set of action groups (such as an inspection task).

如图3所示,在查询高优先级任务时,如果目前最高级任务是人工控制任务,则在相同优先级的任务,按照剥夺式后来先服务顺序进行调度,同时清除人工控制任务下所有的其他子任务,执行当前的最新的子任务。As shown in Figure 3, when querying high-priority tasks, if the current highest-level task is a manual control task, tasks with the same priority will be scheduled according to the order of deprivation-based service, and all tasks under the manual control task will be cleared at the same time. For other subtasks, execute the current latest subtask.

在查询高优先级任务时,如果目前最高级任务是非人工控制任务,在相同优先级的任务,按照用先来先服务调度顺序,然后按照树形数据结构的深度左查询方法来查找到优先级最高的任务。When querying high-priority tasks, if the current highest-level task is a non-manual control task, among tasks of the same priority, follow the first-come-first-serve scheduling order, and then use the deep left query method of the tree data structure to find the priority highest task.

如图4所示,在执行各动作组时,动作组中各动作按照先进先出的原则来执行,具体如下:As shown in Figure 4, when executing each action group, each action in the action group is executed according to the principle of first-in first-out, as follows:

查询该动作组所属任务是否中断,若没有中断,则从动作组的动作列表索引从头开始执行当前动作,同时查询下一个动作;若执行当前动作时,有查询到下一个动作,则将当前任务状态设为执行成功;Query whether the task to which the action group belongs is interrupted. If there is no interruption, the current action will be executed from the beginning of the action list index of the action group, and the next action will be queried at the same time; The status is set to execute successfully;

对于所查询到的下一个动作尝试执行,且尝试次数不多于3次,若尝试执行成功,则将当前任务状态设为正在执行,若尝试执行三次均未响应,则判断为阻塞动作,将该动作状态设为执行失败;Try to execute the next action queried, and the number of attempts is not more than 3 times. If the attempt is successful, the current task status will be set as being executed. If there is no response after three attempts, it will be judged as a blocking action, and the The action status is set to execution failure;

遍历动作组的动作列表后返回当前任务。Returns the current task after traversing the action list of the action group.

各个任务执行完毕后,即将该任务从任务桶里删除掉,任务中的某个动作组执行完毕,会将该动作组从该任务中删除,动作组是任务切换保存该任务运行场景的最小粒度单位。After each task is executed, the task will be deleted from the task bucket. After an action group in the task is executed, the action group will be deleted from the task. The action group is the minimum granularity for task switching to save the running scene of the task unit.

本发明还提供了一种机器人多级小粒度运动调度控制装置,用于实现本发明一种机器人多级小粒度运动调度控制方法,包括:The present invention also provides a multi-level small-grained motion scheduling control device for a robot, which is used to realize a multi-level small-granularity motion scheduling control method for a robot of the present invention, including:

运动调度任务划分模块,用于将机器人的运动调度任务从上向下按层依次分为任务、动作组和动作,各任务均包括动作组,每个动作组包括若干个动作,动作即是任务可拆分的最小可执行单位;The motion scheduling task division module is used to divide the robot's motion scheduling tasks into tasks, action groups and actions from top to bottom. Each task includes action groups, and each action group includes several actions. Actions are tasks The smallest executable unit that can be split;

任务查询模块,用于运动调度控制时采用抢占式高优先权优先调度法HPF,在当前任务中周期性查询高优先级任务,如果查询到的高优先级任务高于当前正在运行的任务,则保存当前任务的参数和状态,来执行高优先级的任务,以及执行该任务下的动作组,如果查询到的高优先级任务低于或等于当前正在运行的任务,则继续执行当前正在运行的任务,当前正在运行的任务结束后休眠设定时间,然后重新查询优先级任务。The task query module is used for motion scheduling control and uses the preemptive high-priority priority scheduling method HPF to periodically query high-priority tasks in the current task. If the queried high-priority task is higher than the currently running task, then Save the parameters and status of the current task to execute the high-priority task and the action group under the task. If the queried high-priority task is lower than or equal to the currently running task, continue to execute the currently running task task, the currently running task sleeps for a set time after the end, and then re-queries the priority task.

任务查询模块还用于在查询高优先级任务时,如果目前最高级任务是非人工控制任务,在相同优先级的任务,按照用先来先服务调度顺序,然后按照树形数据结构的深度左查询方法来查找到优先级最高的任务。The task query module is also used to query high-priority tasks. If the current highest-level task is a non-manual control task, tasks with the same priority will be scheduled in the order of first-come-first-served, and then search left according to the depth of the tree data structure method to find the task with the highest priority.

任务查询模块还用于在查询高优先级任务时,如果目前最高级任务是非人工控制任务,在相同优先级的任务,按照用先来先服务调度顺序,然后按照树形数据结构的深度左查询方法来查找到优先级最高的任务。The task query module is also used to query high-priority tasks. If the current highest-level task is a non-manual control task, tasks with the same priority will be scheduled in the order of first-come-first-served, and then search left according to the depth of the tree data structure method to find the task with the highest priority.

本发明在一个实施例中,提供了一种计算机设备,该计算机设备包括处理器以及存储器,所述存储器用于存储计算机程序,所述计算机程序包括程序指令,所述处理器用于执行所述计算机存储介质存储的程序指令。处理器可能是中央处理单元(CentralProcessing Unit,CPU),还可以是其他通用处理器、数字信号处理器(Digital SignalProcessor、DSP)、专用集成电路(Application Specific Integrated Circuit,ASIC)、现成可编程门阵列(Field-Programmable GateArray,FPGA)或者其他可编程逻辑器件、分立门或者晶体管逻辑器件、分立硬件组件等,其是终端的计算核心以及控制核心,其适于实现一条或一条以上指令,具体适于加载并执行一条或一条以上指令从而实现相应方法流程或相应功能;本发明实施例所述的处理器可以用于一种机器人多级小粒度运动调度控制方法的操作。In one embodiment of the present invention, a computer device is provided, the computer device includes a processor and a memory, the memory is used to store a computer program, the computer program includes program instructions, and the processor is used to execute the computer The program instructions stored in the storage medium. The processor may be a central processing unit (Central Processing Unit, CPU), or other general-purpose processors, digital signal processors (Digital Signal Processor, DSP), application specific integrated circuits (Application Specific Integrated Circuit, ASIC), off-the-shelf programmable gate arrays (Field-Programmable GateArray, FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc., which are the computing core and control core of the terminal, which are suitable for implementing one or more instructions, specifically for Load and execute one or more instructions to realize the corresponding method flow or corresponding functions; the processor described in the embodiment of the present invention can be used for the operation of a multi-level small-grained motion scheduling control method for a robot.

本发明在一个实施例中,一种机器人多级小粒度运动调度控制方法如果以软件功能单元的形式实现并作为独立的产品销售或使用时,可以存储在一个计算机可读取存储介质中。基于这样的理解,本发明实现上述实施例方法中的全部或部分流程,也可以通过计算机程序来指令相关的硬件来完成,所述的计算机程序可存储于一计算机可读存储介质中,该计算机程序在被处理器执行时,可实现上述各个方法实施例的步骤。其中,所述计算机程序包括计算机程序代码,所述计算机程序代码可以为源代码形式、对象代码形式、可执行文件或某些中间形式等。计算机可读存储介质包括永久性和非永久性、可移动和非可移动媒体可以由任何方法或技术来实现信息存储。信息可以是计算机可读指令、数据结构、程序的模块或其他数据。In one embodiment of the present invention, if a multi-level small-grained motion scheduling control method for a robot is realized in the form of a software function unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the present invention realizes all or part of the processes in the methods of the above embodiments, and can also be completed by instructing related hardware through a computer program. The computer program can be stored in a computer-readable storage medium, and the computer When the program is executed by the processor, the steps in the above-mentioned various method embodiments can be realized. Wherein, the computer program includes computer program code, and the computer program code may be in the form of source code, object code, executable file or some intermediate form. Computer-readable storage media includes both volatile and non-permanent, removable and non-removable media by any method or technology for storage of information. Information may be computer readable instructions, data structures, modules of a program, or other data.

所述计算机存储介质可以是计算机能够存取的任何可用介质或数据存储设备,包括但不限于磁性存储器(例如软盘、硬盘、磁带、磁光盘(MO)等)、光学存储器(例如CD、DVD、BD、HVD等)、以及半导体存储器(例如ROM、EPROM、EEPROM、非易失性存储器(NANDFLASH)、固态硬盘(SSD))等。The computer storage medium can be any available medium or data storage device that can be accessed by a computer, including but not limited to magnetic storage (such as floppy disk, hard disk, magnetic tape, magneto-optical disk (MO), etc.), optical storage (such as CD, DVD, BD, HVD, etc.), and semiconductor memory (such as ROM, EPROM, EEPROM, non-volatile memory (NANDFLASH), solid state disk (SSD)) and the like.

本领域内的技术人员应明白,本申请的实施例可提供为方法、系统、或计算机程序产品。因此,本申请可采用完全硬件实施例、完全软件实施例、或结合软件和硬件方面的实施例的形式。而且,本申请可采用在一个或多个其中包含有计算机可用程序代码的计算机可用存储介质(包括但不限于磁盘存储器、CD-ROM、光学存储器等)上实施的计算机程序产品的形式。Those skilled in the art should understand that the embodiments of the present application may be provided as methods, systems, or computer program products. Accordingly, the present application may take the form of an entirely hardware embodiment, an entirely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, the present application may take the form of a computer program product embodied on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) having computer-usable program code embodied therein.

本申请是参照根据本申请实施例的方法、设备(系统)、和计算机程序产品的流程图和/或方框图来描述的。应理解可由计算机程序指令实现流程图和/或方框图中的每一流程和/或方框、以及流程图和/或方框图中的流程和/或方框的结合。可提供这些计算机程序指令到通用计算机、专用计算机、嵌入式处理机或其他可编程数据处理设备的处理器以产生一个机器,使得通过计算机或其他可编程数据处理设备的处理器执行的指令产生用于实现在流程图一个流程或多个流程和/或方框图一个方框或多个方框中指定的功能的装置。The present application is described with reference to flowcharts and/or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the present application. It should be understood that each procedure and/or block in the flowchart and/or block diagram, and a combination of procedures and/or blocks in the flowchart and/or block diagram can be realized by computer program instructions. These computer program instructions may be provided to a general purpose computer, special purpose computer, embedded processor, or processor of other programmable data processing equipment to produce a machine such that the instructions executed by the processor of the computer or other programmable data processing equipment produce a An apparatus for realizing the functions specified in one or more procedures of the flowchart and/or one or more blocks of the block diagram.

这些计算机程序指令也可存储在能引导计算机或其他可编程数据处理设备以特定方式工作的计算机可读存储器中,使得存储在该计算机可读存储器中的指令产生包括指令装置的制造品,该指令装置实现在流程图一个流程或多个流程和/或方框图一个方框或多个方框中指定的功能。These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing apparatus to operate in a specific manner, such that the instructions stored in the computer-readable memory produce an article of manufacture comprising instruction means, the instructions The device realizes the function specified in one or more procedures of the flowchart and/or one or more blocks of the block diagram.

这些计算机程序指令也可装载到计算机或其他可编程数据处理设备上,使得在计算机或其他可编程设备上执行一系列操作步骤以产生计算机实现的处理,从而在计算机或其他可编程设备上执行的指令提供用于实现在流程图一个流程或多个流程和/或方框图一个方框或多个方框中指定的功能的步骤。These computer program instructions can also be loaded onto a computer or other programmable data processing device, causing a series of operational steps to be performed on the computer or other programmable device to produce a computer-implemented process, thereby The instructions provide steps for implementing the functions specified in the flow chart or blocks of the flowchart and/or the block or blocks of the block diagrams.

最后应说明的是:以上所述实施例,仅为本发明的具体实施方式,用以说明本发明的技术方案,而非对其限制,本发明的保护范围并不局限于此,尽管参照前述实施例对本发明进行了详细的说明,本领域的普通技术人员应当理解:任何熟悉本技术领域的技术人员在本发明揭露的技术范围内,其依然可以对前述实施例所记载的技术方案进行修改或可轻易想到变化,或者对其中部分技术特征进行等同替换;而这些修改、变化或者替换,并不使相应技术方案的本质脱离本发明实施例技术方案的精神和范围,都应涵盖在本发明的保护范围之内。因此,本发明的保护范围应所述以权利要求的保护范围为准。Finally, it should be noted that: the above-described embodiments are only specific implementations of the present invention, used to illustrate the technical solutions of the present invention, rather than limiting them, and the scope of protection of the present invention is not limited thereto, although referring to the foregoing The embodiment has described the present invention in detail, and those of ordinary skill in the art should understand that any person familiar with the technical field can still modify the technical solutions described in the foregoing embodiments within the technical scope disclosed in the present invention Changes can be easily thought of, or equivalent replacements are made to some of the technical features; and these modifications, changes or replacements do not make the essence of the corresponding technical solutions deviate from the spirit and scope of the technical solutions of the embodiments of the present invention, and should be included in the scope of the present invention within the scope of protection. Therefore, the protection scope of the present invention should be based on the protection scope of the claims.

Claims (7)

1.一种机器人多级小粒度运动调度控制方法,其特征在于,包括:1. A multi-stage small-grained motion scheduling control method for a robot, characterized in that it comprises: 将机器人的运动调度任务从上向下按层依次分为任务、动作组和动作,各任务均包括动作组,每个动作组包括若干个动作,动作即是任务可拆分的最小可执行单位;The robot's motion scheduling tasks are divided into tasks, action groups and actions from top to bottom. Each task includes action groups, and each action group includes several actions. Actions are the smallest executable units that can be split into tasks. ; 运动调度控制时采用抢占式高优先权优先调度法HPF,在当前任务中周期性查询高优先级任务,如果查询到的高优先级任务高于当前正在运行的任务,则保存当前任务的参数和状态,来执行高优先级的任务,以及执行该任务下的动作组,如果查询到的高优先级任务低于或等于当前正在运行的任务,则继续执行当前正在运行的任务,当前正在运行的任务结束后休眠设定时间,然后重新查询优先级任务;The preemptive high-priority priority scheduling method HPF is used in motion scheduling control, and the high-priority task is periodically queried in the current task. If the queried high-priority task is higher than the currently running task, the parameters and parameters of the current task are saved. state, to execute the high priority task, and execute the action group under the task, if the queried high priority task is lower than or equal to the currently running task, continue to execute the currently running task, the currently running task Sleep for a set time after the task is over, and then re-query the priority task; 所述查询高优先级任务时,如果目前最高级任务是人工控制任务,则在相同优先级的任务,按照剥夺式后来先服务顺序进行调度,同时清除人工控制任务下所有的其他子任务,执行当前的最新的子任务;When inquiring about high-priority tasks, if the current highest-level task is a manual control task, then tasks with the same priority will be scheduled according to the deprivation-style service order, and all other subtasks under the manual control task will be cleared at the same time. the current latest subtask; 所述查询高优先级任务时,如果目前最高级任务是非人工控制任务,在相同优先级的任务,按照用先来先服务调度顺序,然后按照树形数据结构的深度左查询方法来查找到优先级最高的任务;When inquiring about high-priority tasks, if the current highest-level task is a non-manually controlled task, among tasks with the same priority, follow the first-come-first-serve scheduling order, and then search for the priority according to the depth left query method of the tree data structure. the highest level task; 在执行各动作组时,动作组中各动作按照先进先出的原则来执行,具体如下:When executing each action group, each action in the action group is executed according to the first-in-first-out principle, as follows: 查询该动作组所属任务是否中断,若没有中断,则从动作组的动作列表索引从头开始执行当前动作,同时查询下一个动作;若执行当前动作时,有查询到下一个动作,则将当前任务状态设为执行成功;Query whether the task to which the action group belongs is interrupted. If there is no interruption, the current action will be executed from the beginning of the action list index of the action group, and the next action will be queried at the same time; The status is set to execute successfully; 对于所查询到的下一个动作尝试执行,且尝试次数不多于3次,若尝试执行成功,则将当前任务状态设为正在执行,若尝试执行3次均未响应,则判断为阻塞动作,将该动作状态设为执行失败;Try to execute the next action queried, and the number of attempts is not more than 3. If the attempt is successful, the current task status will be set as executing. If there is no response after 3 attempts, it will be judged as a blocking action. Set the action status to execution failure; 遍历动作组的动作列表后返回当前任务。Returns the current task after traversing the action list of the action group. 2.根据权利要求1所述的一种机器人多级小粒度运动调度控制方法,其特征在于,各个任务执行完毕后,即将该任务从任务桶里删除掉,任务中的某个动作组执行完毕,会将该动作组从该任务中删除,动作组是任务切换保存该任务运行场景的最小粒度单位。2. The multi-level small-grained motion scheduling control method for a robot according to claim 1, wherein after each task is executed, the task is deleted from the task bucket, and a certain action group in the task is executed , the action group will be deleted from the task, and the action group is the smallest unit of granularity for task switching to save the running scene of the task. 3.一种机器人多级小粒度运动调度控制装置,其特征在于,用于实现权利要求1或2的调度控制方法,包括:3. A multi-stage small-grained motion scheduling control device for a robot, characterized in that it is used to realize the scheduling control method of claim 1 or 2, comprising: 运动调度任务划分模块,用于将机器人的运动调度任务从上向下按层依次分为任务、动作组和动作,各任务均包括动作组,每个动作组包括若干个动作,动作即是任务可拆分的最小可执行单位;The motion scheduling task division module is used to divide the robot's motion scheduling tasks into tasks, action groups and actions from top to bottom. Each task includes action groups, and each action group includes several actions. Actions are tasks The smallest executable unit that can be split; 任务查询模块,用于运动调度控制时采用抢占式高优先权优先调度法HPF,在当前任务中周期性查询高优先级任务,如果查询到的高优先级任务高于当前正在运行的任务,则保存当前任务的参数和状态,来执行高优先级的任务,以及执行该任务下的动作组,如果查询到的高优先级任务低于或等于当前正在运行的任务,则继续执行当前正在运行的任务,当前正在运行的任务结束后休眠设定时间,然后重新查询优先级任务。The task query module is used for motion scheduling control and uses the preemptive high-priority priority scheduling method HPF to periodically query high-priority tasks in the current task. If the queried high-priority task is higher than the currently running task, then Save the parameters and status of the current task to execute the high-priority task and the action group under the task. If the queried high-priority task is lower than or equal to the currently running task, continue to execute the currently running task task, the currently running task sleeps for a set time after the end, and then re-queries the priority task. 4.根据权利要求3所述的一种机器人多级小粒度运动调度控制装置,其特征在于,所述任务查询模块还用于在查询高优先级任务时,如果目前最高级任务是非人工控制任务,在相同优先级的任务,按照用先来先服务调度顺序,然后按照树形数据结构的深度左查询方法来查找到优先级最高的任务。4. A multi-level small-grained motion scheduling control device for a robot according to claim 3, wherein the task query module is also used for inquiring about high-priority tasks, if the current highest-level task is a non-manual control task , for tasks of the same priority, follow the first-come-first-serve scheduling order, and then search for the task with the highest priority according to the depth left query method of the tree data structure. 5.根据权利要求3所述的一种机器人多级小粒度运动调度控制装置,其特征在于,所述任务查询模块还用于在查询高优先级任务时,如果目前最高级任务是非人工控制任务,在相同优先级的任务,按照用先来先服务调度顺序,然后按照树形数据结构的深度左查询方法来查找到优先级最高的任务。5. A multi-level small-grained motion scheduling control device for a robot according to claim 3, wherein the task query module is also used for inquiring about high-priority tasks, if the current highest-level task is a non-manual control task , for tasks of the same priority, follow the first-come-first-serve scheduling order, and then search for the task with the highest priority according to the depth left query method of the tree data structure. 6.一种设备,包括存储器、处理器以及存储在所述存储器中并可在所述处理器上运行的计算机程序,其特征在于,所述处理器执行所述计算机程序时实现如权利要求1或2所述一种机器人多级小粒度运动调度控制方法的步骤。6. A device comprising a memory, a processor, and a computer program stored in the memory and operable on the processor, wherein the computer program according to claim 1 is implemented when the processor executes the computer program Or the steps of a multi-level small-grained motion scheduling control method for a robot described in 2. 7.一种计算机可读存储介质,所述计算机可读存储介质存储有计算机程序,其特征在于,所述计算机程序被处理器执行时实现如权利要求1或2一种机器人多级小粒度运动调度控制方法的步骤。7. A computer-readable storage medium, the computer-readable storage medium is stored with a computer program, characterized in that, when the computer program is executed by a processor, it realizes a multi-stage small-grained movement of a robot as claimed in claim 1 or 2 The steps of the scheduling control method.
CN202210880116.3A 2022-07-25 2022-07-25 Multi-stage small-granularity movement scheduling control method, device and equipment for robot Active CN115145233B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210880116.3A CN115145233B (en) 2022-07-25 2022-07-25 Multi-stage small-granularity movement scheduling control method, device and equipment for robot

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210880116.3A CN115145233B (en) 2022-07-25 2022-07-25 Multi-stage small-granularity movement scheduling control method, device and equipment for robot

Publications (2)

Publication Number Publication Date
CN115145233A CN115145233A (en) 2022-10-04
CN115145233B true CN115145233B (en) 2023-08-01

Family

ID=83415130

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210880116.3A Active CN115145233B (en) 2022-07-25 2022-07-25 Multi-stage small-granularity movement scheduling control method, device and equipment for robot

Country Status (1)

Country Link
CN (1) CN115145233B (en)

Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105786605A (en) * 2016-03-02 2016-07-20 中国科学院自动化研究所 Task management method and system in robot

Family Cites Families (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP6455530B2 (en) * 2015-02-03 2019-01-23 株式会社安川電機 Operation command generation device, operation command generation method, computer program, and processing system
JP6844124B2 (en) * 2016-06-14 2021-03-17 富士ゼロックス株式会社 Robot control system
CN107976918B (en) * 2016-10-24 2020-10-13 菜鸟智能物流控股有限公司 Task switching method and related device
CN109807903B (en) * 2019-04-10 2021-04-02 博众精工科技股份有限公司 Robot control method, device, equipment and medium
CN110270998A (en) * 2019-06-12 2019-09-24 上海宾通智能科技有限公司 Robot dispatching method, electronic equipment and computer readable storage medium
CN110231993A (en) * 2019-06-19 2019-09-13 爱驰汽车有限公司 Battery management method, device, electronic equipment, storage medium
CN113467901A (en) * 2020-03-31 2021-10-01 北京华为数字技术有限公司 Task scheduling method and related equipment
CN112053066A (en) * 2020-09-09 2020-12-08 上海有个机器人有限公司 Multi-task scheduling method and device for robot and robot
CN113986500A (en) * 2021-10-28 2022-01-28 浙江中控技术股份有限公司 Task deterministic scheduling method and task diagnosis method in multi-task system
CN114755984A (en) * 2022-03-18 2022-07-15 达而观信息科技(上海)有限公司 Dispatching method and system of automatic flow robot and automatic flow robot

Patent Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105786605A (en) * 2016-03-02 2016-07-20 中国科学院自动化研究所 Task management method and system in robot

Also Published As

Publication number Publication date
CN115145233A (en) 2022-10-04

Similar Documents

Publication Publication Date Title
JP6716149B2 (en) Blockchain-based data processing method and apparatus
EP2932377B1 (en) Reachability-based coordination for cyclic dataflow
WO2018177250A1 (en) Block chain based data processing method and device
CN107577694A (en) A kind of data processing method and equipment based on block chain
CN101887383A (en) A real-time process scheduling method
CN117032999B (en) CPU-GPU cooperative scheduling method and device based on asynchronous running
CN110401700A (en) Model loading method and system, control node and execution node
WO2014014944A2 (en) Managing multi-threaded operations in a multimedia authoring environment
CN105786603A (en) High-concurrency service processing system and method based on distributed mode
CN114756345A (en) Task scheduling method and device, computer readable storage medium and electronic equipment
CN112596898A (en) Task executor scheduling method and device
CN113127187B (en) Method and device for cluster expansion and contraction capacity
CN115774605A (en) Kubernetes prediction type elastic expansion method and system
CN113032119A (en) Task scheduling method and device, storage medium and electronic equipment
CN115145233B (en) Multi-stage small-granularity movement scheduling control method, device and equipment for robot
CN117909371B (en) Model training method, device, storage medium and electronic device
CN116996397B (en) Network packet loss optimization method and device, storage medium and electronic equipment
CN118819777A (en) A large model switching method, device and medium based on Lora
CN117812077A (en) Data scheduling method, device and system
WO2024198139A1 (en) Task execution method and apparatus, storage medium, and electronic device
CN117743472A (en) Storage task breakpoint synchronization method, device, medium and equipment
CN116302457A (en) Cloud primary workflow engine implementation method, system, medium and electronic equipment
US9274877B2 (en) Incident handling
CN110083602A (en) A kind of method and device of data storage and data processing based on hive table
CN116304212A (en) A data processing system, method, device and storage medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant