CN112667823B - A method, system and computer-readable medium for semantic parsing of robotic arm task execution sequence - Google Patents
A method, system and computer-readable medium for semantic parsing of robotic arm task execution sequence Download PDFInfo
- Publication number
- CN112667823B CN112667823B CN202011552393.9A CN202011552393A CN112667823B CN 112667823 B CN112667823 B CN 112667823B CN 202011552393 A CN202011552393 A CN 202011552393A CN 112667823 B CN112667823 B CN 112667823B
- Authority
- CN
- China
- Prior art keywords
- task
- gripper
- state
- manipulator
- sub
- 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
Links
Images
Landscapes
- Numerical Control (AREA)
- Manipulator (AREA)
Abstract
Description
技术领域technical field
本发明属于机械臂技术领域,涉及一种机械臂任务执行序列的语义解析方法、系统及计算机可读介质。The invention belongs to the technical field of manipulators, and relates to a semantic analysis method, system and computer-readable medium of a task execution sequence of a manipulator.
背景技术Background technique
机械臂是在工业制造、医学治疗、国防科技、娱乐服务等领域中得到广泛实际应用的自动化机械装置,能够接受操作指令,精确定位到三维空间上的某一点进行作业,即模仿人的手臂执行任务,代替人类自主完成一些繁重、精密和危险的任务。相对人的手臂执行,机械臂执行任务具有高精度、快速、超安全的任务特性。The robotic arm is an automated mechanical device that has been widely used in industrial manufacturing, medical treatment, national defense technology, entertainment services, etc. It can accept operating instructions and accurately locate a certain point in three-dimensional space to perform operations, that is, to imitate the execution of human arms. Tasks, instead of humans to complete some heavy, precise and dangerous tasks autonomously. Compared with the execution of human arms, the execution of tasks by robotic arms has the characteristics of high precision, fast, and ultra-safe tasks.
在面对语义复杂的任务时,目前通常是使用多个机械臂来分步完成,每个机械臂只专注执行任务中一个动作,因此,在面对不同的任务时,需要将任务进行人工拆分,发布不同指令到多个机械臂来分步完成整个任务。人们期望机械臂具备对任务的自主分析能力,能够根据不同任务的执行数据,将任务解析成一系列可执行的动作序列,然后将动作分发给多个机械臂,共同完成复杂任务。目前,机械臂任务的解析方法较少,其中有一类方法是基于任务描述文本进行解析,通过对自然语言进行句法分析和语法分析获得语法解析树,但该方法缺少对操作物体的空间语义关系的表示。When faced with tasks with complex semantics, at present, multiple robotic arms are usually used to complete them step by step, and each robotic arm only focuses on performing one action in the task. Therefore, when facing different tasks, tasks need to be manually disassembled. points, issue different instructions to multiple robotic arms to complete the entire task step by step. People expect that the robotic arm has the ability to analyze tasks independently, and can analyze tasks into a series of executable action sequences based on the execution data of different tasks, and then distribute the actions to multiple robotic arms to complete complex tasks together. At present, there are few analysis methods for manipulator tasks. One of them is based on task description text analysis, and the syntax analysis tree is obtained by syntactic analysis and grammatical analysis of natural language, but this method lacks the spatial semantic relationship of the operating object. express.
本发明提出的解析方法是通过对机械臂任务执行点序列和任务中的所有物体状态数据的变化进行解析,将非结构化环境下的复杂任务演示数据转换成机械臂能够理解并执行的结构化的语义解析图,其中包括任务动作序列、动作作用物体以及物体的空间语义关系,它可以指导机械臂在不同的初始场景中执行与任务语义表现一致的任务,这使得机械臂具有对任务的学习解析能力,极大地扩宽机械臂的使用范围,提高其使用性能。The analysis method proposed by the present invention is to convert complex task demonstration data in an unstructured environment into structured data that can be understood and executed by the manipulator by analyzing the sequence of manipulator task execution points and the changes in the state data of all objects in the task. The semantic analysis diagram of the task, which includes the task action sequence, the action object and the spatial semantic relationship of the object, it can guide the manipulator to perform tasks consistent with the task semantics in different initial scenes, which makes the manipulator have the ability to learn the task Analytical ability greatly expands the range of use of the robotic arm and improves its performance.
发明内容Contents of the invention
为了达到上述目的,本发明提供一种机械臂任务执行序列的语义解析方法、系统及计算机可读介质,通过对机械臂任务执行点序列和任务中的所有物体状态数据的变化进行解析,将非结构化环境下的复杂任务演示数据转换成机械臂能够理解并执行的结构化的语义解析图,其中包括任务动作序列、动作作用物体以及物体的空间语义关系,它可以指导机械臂在不同的初始场景中执行与任务语义表现一致的任务,这使得机械臂具有对任务的学习解析能力,极大地扩宽机械臂的使用范围,提高其使用性能,解决了现有技术中存在的对操作物体的空间语义关系的解析缺乏研究的问题。In order to achieve the above object, the present invention provides a semantic analysis method, system and computer-readable medium of a task execution sequence of a manipulator. By analyzing the sequence of task execution points of a manipulator and the changes of all object state data in the task, non- The complex task demonstration data in a structured environment is converted into a structured semantic analysis graph that the manipulator can understand and execute, including task action sequences, action objects, and spatial semantic relationships of objects, which can guide the manipulator in different initial stages. In the scene, the tasks consistent with the semantic performance of the tasks are performed, which makes the manipulator have the ability to learn and analyze the tasks, greatly expands the scope of use of the manipulator, improves its performance, and solves the problem of operating objects in the prior art. The resolution of spatial-semantic relationships is a poorly studied problem.
本发明所采用的技术方案是,一种机械臂任务执行序列的语义解析方法,包括以下步骤:The technical solution adopted in the present invention is a semantic analysis method of a manipulator task execution sequence, comprising the following steps:
获取机械臂任务执行点序列和执行点对应场景中所有物体的状态序列,通过对任务长度为N的机械臂抓手的状态序列中的开合状态进行差值处理来确定任务执行点序列分割点,各分割点将机械臂抓手的状态序列分割为n个连续的任务子过程序列;Obtain the task execution point sequence of the manipulator and the state sequence of all objects in the scene corresponding to the execution point, and determine the split point of the task execution point sequence by performing difference processing on the opening and closing states in the state sequence of the manipulator gripper with a task length of N , each segmentation point divides the state sequence of the gripper of the manipulator into n consecutive task sub-process sequences;
确定任务子过程sj的机械臂抓手的操作类型解析任务子过程sj中包含的所有物体的运动特征、获取任务子过程sj中发生变化的物体列表和与机械臂抓手直接接触的物体列表,确定任务子过程sj机械臂抓手的动作类型及作用的物体,并根据任务子过程sj结束时所有物体的状态特征,解析作用物体的空间语义关系;Determine the type of manipulation of the robotic arm gripper for the task subprocess sj Analyze the motion characteristics of all objects contained in the task sub-process s j , obtain the list of objects that have changed in the task sub-process s j and the list of objects that are in direct contact with the gripper of the manipulator, and determine the The type of action and the object to be acted on, and according to the state characteristics of all objects at the end of the task sub-process s j , analyze the spatial semantic relationship of the acted object;
整合任务子过程sj的语义解析结果,构建基于机械臂任务执行序列的语义解析图,获得机械臂任务动作序列。Integrate the semantic analysis results of the task sub-process s j , build a semantic analysis graph based on the task execution sequence of the manipulator, and obtain the task action sequence of the manipulator.
进一步地,获取机械臂任务执行点序列和执行点对应场景中所有物体的状态序列,所述机械臂任务执行点序列具体为机械臂抓手的状态序列,所有物体的状态序列由场景中每一个单个物体的状态序列组成,通过对任务长度为N的机械臂抓手的状态序列中的开合状态进行差值处理来确定任务执行点序列分割点,各分割点将机械臂抓手的状态序列分割为n个连续的任务子过程序列,具体为:Further, the task execution point sequence of the manipulator and the state sequence of all objects in the scene corresponding to the execution point are obtained, the task execution point sequence of the manipulator is specifically the state sequence of the gripper of the manipulator, and the state sequence of all objects is determined by each Composition of the state sequence of a single object, the task execution point sequence segmentation point is determined by performing difference processing on the opening and closing state in the state sequence of the robotic arm gripper with a task length of N, and each segmentation point divides the state sequence of the robotic arm gripper Divided into n consecutive task sub-process sequences, specifically:
机械臂抓手的状态序列为{GS1,GS2,GS3...,GSi,...,GSN},其中机械臂抓手第i个状态数据GSi=(posi,quai,openi),posi=(xi,yi,zi)表示机械臂抓手第i个状态的位置坐标,xi表示机械臂抓手第i个状态的x轴坐标,yi表示机械臂抓手第i个状态的y轴坐标,zi表示机械臂抓手第i个状态的z轴坐标;quai=(qx,qy,qz,qw)表示机械臂抓手第i个状态的方向,(qx,qy,qz)表示机械臂抓手第i个状态旋转的转轴,qx是转轴的x轴分量,qy表示转轴的y轴分量,qz表示转轴的z轴分量,qw表示机械臂抓手第i个状态绕转轴旋转的角度分量,openi={0,1}表示机械臂抓手第i个状态的开合状态,openi=0是合,openi=1是开;The state sequence of the gripper of the robotic arm is {GS 1 , GS 2 , GS 3 ..., GS i , ..., GS N }, where the i-th state data of the gripper of the robotic arm GS i =(pos i , qua i , open i ), pos i = (x i , y i , z i ) represents the position coordinates of the i-th state of the gripper of the robotic arm, x i represents the x-axis coordinate of the i-th state of the gripper of the robotic arm, and y i Indicates the y-axis coordinate of the i-th state of the robotic arm gripper, z i represents the z-axis coordinate of the i-th state of the robotic arm gripper; qua i = (q x , q y , q z , q w ) represents the The direction of the i-th state of the hand, (q x , q y , q z ) represents the rotation axis of the i-th state of the robotic arm gripper, q x is the x-axis component of the rotation axis, q y represents the y-axis component of the rotation axis, q z represents the z-axis component of the rotation axis, q w represents the angle component of the i-th state of the gripper of the robotic arm rotating around the rotation axis, open i = {0, 1} represents the opening and closing state of the i-th state of the gripper of the robotic arm, open i =0 is close, open i =1 is open;
单个物体的状态序列为单个物体a的第i个状态数据name表示单个物体a的名称,posi=(xi,yi,zi)表示单个物体a的第i个状态的位置坐标;quai=(qx,qy,qz,qw)表示单个物体a的第i个状态的方向,colori=(cr,cg,cb)表示单个物体a的第i个状态的颜色,cr表示单个物体a的第i个状态的颜色在R通道上的颜色分量,cg表示单个物体a的第i个状态的颜色在G通道上的颜色分量,cb表示单个物体a的第i个状态的颜色在B通道上的颜色分量;bboxi=(xmin,xmax,ymin,ymax,zmin,zmax)表示单个物体a的第i个状态的大小,以物体a中心为原点坐标轴,(xmin,xmax)表示物体a大小在x轴上的范围,(ymin,ymax)表示物体a大小在y轴上的范围,(zmin,zmax)表示物体a大小在z轴上的范围;rel={None,sub}表示单个物体a是某个物体不可脱离的组件,rel=None表示单个物体a不是任何物体不可脱离的组件,rel=sup表示单个物体a是物体sup不可脱离的组件,sub表示物体;R表示以单个物体a中心为原点的坐标系A相对于世界坐标系W的旋转矩阵,R的具体表达如下式所示:The state sequence of a single object is The i-th state data of a single object a name represents the name of a single object a, pos i = ( xi , y i , zi ) represents the position coordinates of the i-th state of a single object a; qua i = (q x , q y , q z , q w ) Indicates the direction of the i-th state of a single object a, color i = (c r , c g , c b ) represents the color of the i-th state of a single object a, and c r represents the color of the i-th state of a single object a The color component on the R channel, c g represents the color component of the color of the i-th state of a single object a on the G channel, and c b represents the color component of the color of the i-th state of a single object a on the B channel; bbox i = (x min , x max , y min , y max , z min , z max ) represents the size of the i-th state of a single object a, with the center of object a as the origin coordinate axis, (x min , x max ) Indicates the range of the size of object a on the x-axis, (y min , y max ) represents the range of the size of object a on the y-axis, (z min , z max ) represents the range of the size of object a on the z-axis; rel={ None, sub} indicates that a single object a is an inseparable component of an object, rel=None indicates that a single object a is not an inseparable component of any object, rel=sup indicates that a single object a is an inseparable component of an object sup, and sub indicates an object ; R represents the rotation matrix of the coordinate system A with the center of the single object a as the origin relative to the world coordinate system W, and the specific expression of R is shown in the following formula:
其中,旋转矩阵R由四列构成,第一列(R0,R4,R8)是坐标系A相对于世界坐标系W在x轴上的方向分量,第二列(R1,R5,R9)是坐标系A相对于世界坐标系W在y轴上的方向分量,第三列(R2,R6,R10)是坐标系A相对于世界坐标系W在z轴上的方向分量,第四列(R3,R7,R11)是坐标系A相对于世界坐标系W分别在x、y、z轴上的平移分量;Among them, the rotation matrix R consists of four columns, the first column (R 0 , R 4 , R 8 ) is the direction component of the coordinate system A relative to the world coordinate system W on the x-axis, and the second column (R 1 , R 5 , R 9 ) is the direction component of the coordinate system A relative to the world coordinate system W on the y-axis, and the third column (R 2 , R 6 , R 10 ) is the direction component of the coordinate system A relative to the world coordinate system W on the z-axis The direction component, the fourth column (R 3 , R 7 , R 11 ) is the translation component of the coordinate system A relative to the world coordinate system W on the x, y, and z axes respectively;
设机械臂抓手的第i个状态中的开合状态为openi,下一个机械臂抓手的状态中的开合状态为openi+1,1≤i<N,将相邻两个的机械臂抓手的状态中的开合状态进行差值处理,得到开合状态差值即 Let the opening and closing state of the i-th state of the robotic arm gripper be open i , and the opening and closing state of the next robotic arm gripper state be open i+1 , 1≤i<N, and the two adjacent The opening and closing state in the state of the gripper of the robotic arm is subjected to difference processing to obtain the opening and closing state difference which is
根据开合状态差值按照下述公式确定任务序列中的分割点pj,具体为:According to the opening and closing state difference Determine the split point p j in the task sequence according to the following formula, specifically:
其中,j>1,0<i<N,p1=0,pn-1=N-1,p1=0表示第一个分割点是任务序列起始点,pn-1=N-1表示最后一个分割点是任务序列终止点;Among them, j>1, 0<i<N, p 1 =0, p n-1 =N-1, p 1 =0 means that the first split point is the starting point of the task sequence, p n-1 =N-1 Indicates that the last split point is the end point of the task sequence;
将机械臂抓手的状态序列中得到的分割点形成分割点序列{p1,p2,p3,...,pj,...,pn-1},pj<N,各分割点将机械臂抓手的状态序列分割为n个连续的子过程序列{s1,s2,s3,..,sj,...,sn},其中sj表示分割点pj到分割点pj+1的机械臂抓手的状态序列,记为任务子过程sj(pj,pj+1)。The segmentation points obtained in the state sequence of the gripper of the manipulator are formed into a segmentation point sequence {p 1 , p 2 , p 3 , ..., p j , ..., p n-1 }, p j <N, each The segmentation point divides the state sequence of the gripper of the robotic arm into n consecutive sub-process sequences {s 1 , s 2 , s 3 , .., s j , ..., s n }, where s j represents the segmentation point p The state sequence of the manipulator gripper from j to the split point p j+1 is recorded as the task sub-process s j (p j ,p j+1 ).
进一步地,任务子过程sj的机械臂抓手的操作类型的确定过程,具体为:根据任务子过程sj中机械臂抓手的位置变化、方向变化、开合状态确定任务子过程sj的机械臂抓手的操作类型按时序得到n个任务子过程的机械臂抓手的操作序列:Further, the operation type of the manipulator gripper of the task sub-process s j The determination process of , specifically: according to the position change, direction change, and opening and closing state of the manipulator gripper in the task subprocess s j , determine the operation type of the manipulator gripper in the task subprocess s j Obtain the operation sequence of the manipulator gripper of n task sub-processes in time sequence:
根据任务子过程机械臂抓手起始位置终止位置起始方向终止方向开合状态计算得到任务子过程机械臂抓手的运动特征 According to the task sub-process The starting position of the gripper of the robotic arm end position starting direction end direction The motion characteristics of the robot arm gripper in the task sub-process are obtained by calculating the opening and closing state
机械臂抓手的运动特征的计算公式为 Motion characteristics of the gripper of the robotic arm The calculation formula is
式中,是任务子过程sj中机械臂抓手的位移;是任务子过程sj中机械臂抓手的旋转角度;是任务子过程sj中机械臂抓手的开合状态;In the formula, is the displacement of the gripper of the manipulator in the task sub-process s j ; is the rotation angle of the gripper of the manipulator in the task sub-process s j ; is the opening and closing state of the gripper of the manipulator in the task sub-process s j ;
其中, in,
式中,表示机械臂抓手在旋转到子过程终止pj+1时绕转轴旋转的角度分量,表示机械臂抓手在旋转到子过程起始pj时绕转轴旋转的角度分量;In the formula, Indicates the angle component of the rotation around the axis of rotation of the gripper of the manipulator when it rotates to the end of the sub-process p j+1 , Indicates the angular component of the rotation around the axis of rotation of the gripper of the manipulator when it rotates to the start of the subprocess p j ;
任务子过程sj的机械臂抓手的操作类型包括三个,分别为:reach表示到达、move表示移动、rotate表示旋转,的计算公式具体为:The operation type of the robot arm gripper of the task subprocess s j Including three, namely: reach means arrival, move means movement, rotate means rotation, The specific calculation formula is:
式中,表示任务子过程sj中机械臂抓手的位移,thresholddis是判定机械臂抓手产生位移的阈值;表示任务子过程sj中机械臂抓手的旋转角度,thresholdθ是判断机械臂抓手发生旋转变化的阈值。In the formula, Indicates the displacement of the gripper of the robotic arm in the task sub-process s j , and threshold dis is the threshold for determining the displacement of the gripper of the robotic arm; Indicates the rotation angle of the gripper of the manipulator in the task sub-process s j , threshold θ is the threshold for judging the rotation change of the gripper of the manipulator.
进一步地,任务子过程sj中包含的所有物体的运动特征的解析过程,具体为:根据任务子过程sj中包含的某一单个物体a的起始位置终止位置起始方向终止方向以及起始颜色终止颜色获取单个物体a在任务子过程sj的运动特征进而获取任务子过程sj中包含的所有物体的运动特征;Further, the analysis process of the motion characteristics of all objects contained in the task sub-process s j is specifically: according to the starting position of a single object a contained in the task sub-process s j end position starting direction end direction and the starting color end color Obtain the motion characteristics of a single object a in the task sub-process s j Then obtain the motion characteristics of all objects contained in the task sub-process s j ;
其中,单个物体a在任务子过程sj的运动特征的计算公式为:Among them, the motion characteristics of a single object a in the task sub-process s j The calculation formula is:
其中: in:
其中,是任务子过程sj中物体a的位移;是任务子过程sj中物体a的旋转角度;是任务子过程sj中物体a的颜色变化;表示在任务子过程sj中物体a是否消失,表示物体a在经过任务子过程sj后消失,表示物体a在经过任务子过程sj后依然存在;分别是任务子过程sj终止时物体a的位置坐标,分别是任务子过程sj开始时物体a的位置坐标;表示物体a在旋转到任务子过程sj终止时的角度分量,是物体a在旋转到任务子过程sj起始pj时的角度分量;分别表示任务子过程sj开始时物体a的颜色通道, 分别表示任务子过程sj终止时物体a的颜色通道;代表在任务子过程sj起始执行点对应的物体中含物体a;代表在任务子过程sj终止执行点对应的物体中不含物体a。in, is the displacement of object a in task sub-process s j ; is the rotation angle of object a in task sub-process s j ; is the color change of object a in the task sub-process s j ; Indicates whether the object a disappears in the task sub-process s j , Indicates that the object a disappears after passing through the task sub-process s j , Indicates that the object a still exists after passing through the task sub-process s j ; are the position coordinates of the object a when the task sub-process s j terminates, respectively, are the position coordinates of the object a when the task sub-process s j starts; Indicates the angle component of the object a when it is rotated to the end of the task sub-process s j , is the angle component of the object a when it rotates to the start p j of the task sub-process s j ; Respectively represent the color channels of the object a when the task sub-process s j starts, Respectively represent the color channels of object a when the task sub-process s j terminates; Indicates that object a is included in the objects corresponding to the start execution point of the task sub-process s j ; It means that object a is not included in the objects corresponding to the termination execution point of the task sub-process s j .
进一步地,任务子过程sj中发生变化的物体列表和与机械臂抓手直接接触的物体列表的获取过程,具体为:Further, the acquisition process of the list of objects changed in the task sub-process s j and the list of objects directly in contact with the gripper of the manipulator is as follows:
分别获取任务子过程sj中产生位移、发生旋转、发生颜色变化、消失的物体的运动特征,并将任务子过程sj发生变化的物体名称分别存入列表、列表、列表、列表;Obtain the motion characteristics of the objects that have displacement, rotation, color change, and disappearance in the task sub-process s j respectively, and store the names of the objects that change in the task sub-process s j into list, list, list, list;
根据机械臂抓手的状态数据和所有物体的状态数据,获取任务子过程sj中与机械臂抓手直接接触的物体列表t_objects。According to the state data of the gripper of the manipulator and the state data of all objects, obtain the object list t_objects in the task sub-process s j that is in direct contact with the gripper of the manipulator.
进一步地,任务子过程sj机械臂抓手的动作类型及作用的物体的确定过程,具体为:任务子过程sj(pj,pj+1)起始pj和终止pj+1时物体的属性从单个物体a状态数据中获取,其中状态数据中的序号i等于任务子过程中起始pj和终止pj+1的序号;Further, the task sub-process s j is the determination process of the action type of the gripper of the manipulator and the object it acts on, specifically: the task sub-process s j (p j , p j+1 ) starts p j and ends p j+1 properties of an object from a single object a state data , where the serial number i in the state data is equal to the serial numbers of the start p j and the end p j+1 in the task sub-process;
任务子过程sj机械臂抓手的动作类型具体的确定公式如下式所示:The specific formula for determining the action type of the task sub-process s j robotic arm gripper is as follows:
其中,是任务子过程sj中机械臂抓手的操作类型;是任务子过程sj中产生位移的物体个数;是任务子过程sj中发生旋转的物体个数;是任务子过程sj中发生颜色变化的物体个数;是任务子过程sj中机械臂抓手直接接触的物体;是任务子过程sj中机械臂抓手直接接触物体的rel值,表示该物体是某个物体不可脱离的组件,rel=None表示该物体不是任何物体不可脱离的组件,rel=sup表示该物体是物体sup不可脱离的组件;是任务子过程sj中消失的物体个数;当机械臂抓手的动作类型是“move”并且机械臂抓手直接接触物体是作为物体sup不可分割的组件时,任务子过程sj的动作类型具体是“push”还是“pull”,要根据物体与sup对象的距离变化进一步区分,具体的公式如下:in, is the operation type of the robotic arm gripper in the task sub-process s j ; is the number of displaced objects in the task sub-process s j ; is the number of objects rotated in the task sub-process s j ; is the number of objects whose color changes in the task sub-process s j ; is the object directly contacted by the gripper of the robotic arm in the task sub-process sj ; is the rel value of the object in direct contact with the gripper of the robotic arm in the task sub-process s j , indicating that the object is an inseparable component of an object, rel=None indicates that the object is not an inseparable component of any object, rel=sup indicates that the object is an inseparable component of the object sup; is the number of objects that disappear in the task sub-process s j ; when the action type of the robotic arm gripper is "move" and the direct contact of the robotic arm gripper with the object is an inseparable component of the object sup, the action of the task sub-process s j Whether the type is "push" or "pull" should be further distinguished according to the distance between the object and the sup object. The specific formula is as follows:
其中,是位移变化物体在任务子过程起始pj时的位置坐标;是位移变化物体的sup对象在任务子过程起始pj时的位置坐标;distance是计算两个坐标点间的距离公式;in, is the position coordinate of the displacement-changing object at the start p j of the task sub-process; is the position coordinate of the sup object of the displacement changing object at the start p j of the task sub-process; distance is the formula for calculating the distance between two coordinate points;
定义上述机械臂抓手的动作类型与其作用物体的关系,具体如下:Define the relationship between the action type of the above-mentioned robotic arm gripper and the object it acts on, as follows:
到达物体a处,表示为“到达”:物体a是通过在t_objects中查找在子过程sj序列之后且离它最近子过程sk对应的物体,即(a,sk),j<k;Arrive at object a, denoted as "arrived": Object a is searched in t_objects for the object corresponding to the sub-process s k which is after the sequence of sub-process s j and is closest to it, namely (a, s k ), j<k;
旋转物体a,表示为“旋转”:物体a是通过查找t_objects中查找与sj对应的物体,即(a,sj);Rotate object a, expressed as "rotation": The object a is to find the object corresponding to s j by searching t_objects, namely (a, s j );
移动物体a,表示为“移动”:物体中a是通过查找t_objects中查找与sj对应的物体,即(a,sj),a*是物体a最终到达的物体,即为的中发生位置改变的物体;Moving object a, denoted as "moving": In the object, a is to find the object corresponding to s j by searching t_objects, that is, (a, s j ), and a * is the object that object a finally arrives at, that is, Objects whose positions have changed in ;
按压物体a使得物体b发生颜色改变,表示为“按压”:物体a为中位置发生改变的物体,物体b为中颜色发生改变的物体;Pressing object a makes object b change color, denoted as "press": object a is The object whose position changes in the middle, the object b is Objects that change color in
将拿着物体a推动物体b,表示“间接推”:为物体中a是通过查找t_objects中查找与sj对应的物体,即(a,sj),物体b为中不是物体a的另一个物体,b*是物体b最终到达的物体;Will hold object a and push object b, which means "indirect push": for In the object a is to find the object corresponding to s j by searching t_objects, that is, (a, s j ), the object b is in another object that is not object a, b * is the object that object b ends up at;
抓着物体a推物体b,表示为“推”:物体a是通过查找t_objects中查找与sj对应的物体,即(a,sj),如果查找失败,物体a为空;物体b是中位置发生改变的物体;Hold object a and push object b, expressed as "push": Object a is to find the object corresponding to s j by searching t_objects, namely (a, s j ), if the search fails, object a is empty; object b is Objects whose positions have changed in the
抓着物体a拉物体b,表示为“拉”:物体a是通过查找t_objects中查找与sj对应的物体,即(a,sj);物体b是中位置发生改变的物体;Grab object a and pull object b, denoted as "pull": Object a is found by looking up the object corresponding to s j in t_objects, namely (a, s j ); object b is Objects whose positions have changed in the
拿着物体a清除物体b,表示为“清除”:物体a是通过查找t_objects中查找与sj对应的物体,即(a,sj);物体b是中位置发生改变的物体。Take object a and clear object b, denoted as "clear": Object a is found by looking up the object corresponding to s j in t_objects, namely (a, s j ); object b is Objects whose positions have changed.
进一步地,根据任务子过程sj结束时所有物体的状态特征,解析作用物体的空间语义关系,具体为:根据任务子过程sj结束时所有物体的状态特征,解析作用物体a与其他物体object的空间语义关系,表示为type表述两个物体的关系类型;Further, according to the state characteristics of all objects at the end of the task sub-process s j , analyze the spatial semantic relationship of the acting objects, specifically: according to the state characteristics of all objects at the end of the task sub-process s j , analyze the acting object a and other objects object The spatial semantic relationship of is expressed as type expresses the relationship type of two objects;
将任两物体的bbox边界范围变换到同一坐标系中,以物体a中心为原点建立坐标系A,在坐标系A上的点转换到世界坐标系W上的坐标确定物体a在世界坐标系W下的边界点坐标,计算公式如下:Transform the bbox boundaries of any two objects into the same coordinate system, establish a coordinate system A with the center of object a as the origin, and point on the coordinate system A Convert to coordinates on the world coordinate system W To determine the boundary point coordinates of object a in the world coordinate system W, the calculation formula is as follows:
其中,R是坐标系A相对世界坐标系W的旋转矩阵,旋转矩阵R由四列构成,第一列(Ra0,Ra4,Ra8)是坐标系A相对于世界坐标系W在x轴上的方向分量,第二列(Ra1,Ra5,Ra9)是坐标系A相对于世界坐标系W在y轴上的方向分量,第三列(Ra2,Ra6,Ra10)是坐标系A相对于世界坐标系W在z轴上的方向分量,第四列(Ra3,Ra7,Ra11)是坐标系A相对于世界坐标系W,分别在x、y、z轴上的平移分量;Among them, R is the rotation matrix of the coordinate system A relative to the world coordinate system W, the rotation matrix R is composed of four columns, the first column (R a0 , R a4 , R a8 ) is the coordinate system A relative to the world coordinate system W on the x-axis , the second column (R a1 , R a5 , R a9 ) is the direction component of the coordinate system A relative to the world coordinate system W on the y-axis, and the third column (R a2 , R a6 , R a10 ) is The direction component of the coordinate system A relative to the world coordinate system W on the z axis, the fourth column (R a3 , R a7 , R a11 ) is the coordinate system A relative to the world coordinate system W, respectively on the x, y, and z axes The translation component of
以物体b中心为原点建立坐标系,确定物体b在世界坐标系W下的边界点坐标;Establish a coordinate system with the center of the object b as the origin, and determine the boundary point coordinates of the object b under the world coordinate system W;
判断物体a与物体b的空间语义关系type类型。Determine the type of the spatial semantic relationship between object a and object b.
进一步地,物体a与物体b的空间语义关系type类型的判断方法,具体为:通过物体a与物体b的中心点距离与两物体bbox最大边界的关系;若满足以下条件则进行S1,否则物体a与物体b是不相关的,type=separated,判断条件如下:Further, the judgment method of the spatial semantic relationship type between object a and object b is specifically: through the relationship between the center point distance between object a and object b and the maximum boundary of the bbox of the two objects; if the following conditions are met, proceed to S1, otherwise the object a is irrelevant to object b, type=separated, the judgment conditions are as follows:
其中,是任务子过程终止(pi+1)时物体a的位置坐标;是任务子过程终止时物体b的位置坐标;distance是计算两个坐标点之间的距离公式;是任务子过程终止(pi+1)时物体a分别在x、y、z轴上最大的边界值;是任务子过程终止(pi+1)时物体b分别在x、y、z轴上最大的边界值;in, is the position coordinate of object a when the task sub-process terminates (p i+1 ); is the position coordinate of object b when the task sub-process is terminated; distance is the formula for calculating the distance between two coordinate points; is the maximum boundary value of object a on the x, y, and z axes respectively when the task sub-process terminates (p i+1 ); are the maximum boundary values of the object b on the x, y, and z axes respectively when the task sub-process terminates (p i+1 );
S1、通过物体a与物体b在世界坐标系W的x、y、z轴上边界范围的关系,确定空间语义关系类型;若不满足以下条件,则进行S2,具体公式如下:S1. Determine the type of spatial semantic relationship through the relationship between object a and object b on the x, y, and z axes of the world coordinate system W; if the following conditions are not met, proceed to S2. The specific formula is as follows:
式中,是指物体a在世界坐标系W的x轴上的边界范围;是指物体b在世界坐标系W的x轴上的边界范围;是指物体a在世界坐标系W的y轴上的边界范围;是指物体b在世界坐标系W的y轴上的边界范围;是指物体a在世界坐标系W的z轴上的边界范围;是指物体b在世界坐标系W的z轴上的边界范围;In the formula, Refers to the boundary range of object a on the x-axis of the world coordinate system W; Refers to the boundary range of object b on the x-axis of the world coordinate system W; Refers to the boundary range of object a on the y-axis of the world coordinate system W; Refers to the boundary range of object b on the y-axis of the world coordinate system W; Refers to the boundary range of object a on the z-axis of the world coordinate system W; Refers to the boundary range of object b on the z-axis of the world coordinate system W;
若满足上述条件则进行以下判断,确定空间语义关系类型,具体的公式如下:If the above conditions are met, the following judgments are made to determine the type of spatial semantic relationship. The specific formula is as follows:
S2、通过物体a与物体b在世界坐标系的中心坐标(xa,ya,za)、(xb,yb,zb)与两物体的关系,确定空间语义关系类型,具体的公式如下:S2. Through the center coordinates (x a , y a , z a ), (x b , y b , z b ) of object a and object b in the world coordinate system and the two objects relationship, to determine the type of spatial semantic relationship, the specific formula is as follows:
本发明的另一发明目的,在于提供一种机械臂任务执行序列的语义解析系统,包括:Another object of the present invention is to provide a semantic analysis system for manipulator task execution sequence, including:
存储器,用于存储可由处理器执行的指令;memory for storing instructions executable by the processor;
处理器,用于执行所述指令以实现如上所述的方法。a processor, configured to execute the instructions to implement the above method.
本发明的再一发明目的,在于提供一种计算机可读介质,存储有计算机程序代码,所述计算机程序代码在由处理器执行时实现如上所述的方法。Yet another object of the present invention is to provide a computer-readable medium storing computer program codes, the computer program codes implementing the above method when executed by a processor.
本发明的有益效果是:The beneficial effects of the present invention are:
(1)本发明通过对机械臂任务执行点序列和任务中的所有物体状态数据的变化进行解析,将非结构化环境下的复杂任务演示数据转换成机械臂能够理解并执行的结构化的语义解析图,其中包括任务动作序列、动作作用物体以及物体的空间语义关系,它可以指导机械臂在不同的初始场景中执行与任务语义表现一致的任务,这使得机械臂具有对任务的学习解析能力,极大地扩宽机械臂的使用范围,提高其使用性能。(1) The present invention converts complex task demonstration data in an unstructured environment into structured semantics that the manipulator can understand and execute by analyzing the sequence of manipulator task execution points and the changes in the state data of all objects in the task Analytical diagrams, including task action sequences, action objects, and spatial semantic relationships of objects, which can guide the manipulator to perform tasks consistent with the task semantics in different initial scenarios, which makes the manipulator have the ability to learn and analyze tasks , greatly expanding the range of use of the robotic arm and improving its performance.
(2)本发明得到的语义解析图可用于机械臂做复杂任务的视觉运动规划,根据任务视频演示的某一时刻的视觉观察和上一个执行动作,预测当前视觉观察的下一个执行动作,这对机械臂在非结构化环境下对复杂任务拆分和运动规划有很大的帮助。(2) The semantic analysis diagram obtained by the present invention can be used for the visual motion planning of the manipulator to do complex tasks, and predict the next execution action of the current visual observation according to the visual observation at a certain moment of the task video demonstration and the previous execution action, which is It is of great help to the splitting of complex tasks and motion planning of the robotic arm in an unstructured environment.
附图说明Description of drawings
为了更清楚地说明本发明实施例或现有技术中的技术方案,下面将对实施例或现有技术描述中所需要使用的附图作简单地介绍,显而易见地,下面描述中的附图仅仅是本发明的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动的前提下,还可以根据这些附图获得其他的附图。In order to more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the following will briefly introduce the drawings that need to be used in the description of the embodiments or the prior art. Obviously, the accompanying drawings in the following description are only These are some embodiments of the present invention. Those skilled in the art can also obtain other drawings based on these drawings without creative work.
图1是本发明机械臂任务执行序列的语义解析方法的工作流程图。Fig. 1 is a working flow chart of the semantic analysis method of the manipulator task execution sequence of the present invention.
图2是本发明物体间的空间语义关系示例图。Fig. 2 is an example diagram of the spatial semantic relationship between objects in the present invention.
图3为本发明得到的语义解析图。Fig. 3 is a semantic analysis diagram obtained by the present invention.
图4为本发明中进一步扩展的语义解析图。Fig. 4 is a semantic analysis diagram further expanded in the present invention.
具体实施方式Detailed ways
下面将结合本发明实施例中的附图,对本发明实施例中的技术方案进行清楚、完整地描述,显然,所描述的实施例仅仅是本发明一部分实施例,而不是全部的实施例。基于本发明中的实施例,本领域普通技术人员在没有做出创造性劳动前提下所获得的所有其他实施例,都属于本发明保护的范围。The following will clearly and completely describe the technical solutions in the embodiments of the present invention with reference to the accompanying drawings in the embodiments of the present invention. Obviously, the described embodiments are only some of the embodiments of the present invention, not all of them. 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~图4所示,一种机械臂任务执行序列的语义解析方法,包括以下步骤:As shown in Figures 1 to 4, a semantic analysis method for a task execution sequence of a manipulator includes the following steps:
获取机械臂任务执行点序列和执行点对应场景中所有物体的状态序列,通过对任务长度为N的机械臂抓手的状态序列中的开合状态进行差值处理来确定分割点,各分割点将机械臂抓手的状态序列分割为n个连续的任务子过程序列:Obtain the task execution point sequence of the manipulator and the state sequence of all objects in the scene corresponding to the execution point, and determine the segmentation point by performing difference processing on the opening and closing states in the state sequence of the robotic arm gripper with a task length of N. Each segmentation point Divide the state sequence of the robotic arm gripper into n consecutive task sub-process sequences:
其中,机械臂任务执行点序列的起始和终止的是整个机械臂任务执行的开始和结束;机械臂任务执行点序列具体为机械臂抓手的状态序列;所有物体的状态序列由场景中每一个单个物体的状态序列组成;Among them, the start and end of the task execution point sequence of the manipulator is the beginning and end of the execution of the entire manipulator task; the task execution point sequence of the manipulator is specifically the state sequence of the manipulator gripper; the state sequence of all objects is determined by each A sequence of states for a single object consists of;
其中,机械臂抓手的状态序列,包括抓手的位置、方向以及抓手的开合状态;设机械臂抓手的状态序列的长度为N,则机械臂抓手的状态序列为{GS1,GS2,GS3...,GSi,...,GSN},其中机械臂抓手第i个状态数据GSi=(posi,quai,openi),posi=(xi,yi,zi)表示机械臂抓手第i个状态的位置坐标,xi表示机械臂抓手第i个状态的x轴坐标,yi表示机械臂抓手第i个状态的y轴坐标,zi表示机械臂抓手第i个状态的z轴坐标;quai=(qx,qy,qz,qw)表示机械臂抓手第i个状态的方向,(qx,qy,qz)表示机械臂抓手第i个状态旋转的转轴,qx是该转轴的x轴分量,qy表示该转轴的y轴分量,qz表示该转轴的z轴分量,qw表示机械臂抓手第i个状态绕该转轴旋转的角度分量,openi={0,1}表示机械臂抓手第i个状态的开合状态(openi=0是合,openi=1是开)。Among them, the state sequence of the gripper of the robotic arm includes the position and direction of the gripper and the opening and closing state of the gripper; if the length of the state sequence of the gripper of the robotic arm is N, then the state sequence of the gripper of the robotic arm is {GS 1 , GS 2 , GS 3 ..., GS i , ..., GS N }, where the i-th state data of the manipulator gripper GS i =(pos i , qua i , open i ), pos i =(x i , y i , z i ) represent the position coordinates of the i-th state of the robotic arm gripper, x i represent the x-axis coordinates of the i-th state of the robotic arm gripper, and y i represent the y of the i-th state of the robotic arm gripper axis coordinates, z i represents the z-axis coordinates of the i-th state of the gripper of the robotic arm; qua i = (q x , q y , q z , q w ) represents the direction of the i-th state of the gripper of the robotic arm, (q x , q y , q z ) represent the rotating shaft of the i-th state of the gripper of the manipulator, q x is the x-axis component of the rotating shaft, q y represents the y-axis component of the rotating shaft, q z represents the z-axis component of the rotating shaft, q w represents the angular component of the i-th state of the robotic arm gripper rotating around the axis, open i = {0, 1} represents the opening and closing state of the i-th state of the robotic arm gripper (open i = 0 is closed, open i = 1 is on).
其中,单个物体的状态序列,包括单个物体的名称、位置、方向、颜色、大小、是否有所属对象(“是否有所属对象”即该单个物体是否是某物体的不可脱离的组件)、以及以单个物体中心为原点的坐标系A相对于世界坐标系W的旋转矩阵;某一单个物体a的状态序列为单个物体a的第i个状态数据name表示单个物体a的名称,posi=(xi,yi,zi)表示单个物体a的第i个状态的位置坐标;quai=(qx,qy,qz,qw)表示单个物体a的第i个状态的方向,colori=(cr,cg,cb)表示单个物体a的第i个状态的颜色,cr表示单个物体a的第i个状态的颜色在R通道上的颜色分量,cg表示单个物体a的第i个状态的颜色在G通道上的颜色分量,cb表示单个物体a的第i个状态的颜色在B通道上的颜色分量;bboxi=(xmin,xmax,ymin,ymax,zmin,zmax)表示单个物体a的第i个状态的大小,以物体a中心为原点坐标轴,(xmin,xmax)表示物体a大小在x轴上的范围,(ymin,ymax)表示物体a大小在y轴上的范围,(zmin,zmax)表示物体a大小在z轴上的范围;rel={None,sub}表示单个物体a是某个物体不可脱离的组件,rel=None表示单个物体a不是任何物体不可脱离的组件,rel=sup表示单个物体a是物体sup不可脱离的组件,sub表示物体;R表示以单个物体a中心为原点的坐标系A相对于世界坐标系W的旋转矩阵,R的具体表达如下式所示:Among them, the state sequence of a single object includes the name, position, direction, color, size of a single object, whether there is an object to which it belongs (“whether there is an object to which it belongs” means whether the single object is an inseparable component of an object), and The rotation matrix of the coordinate system A with the center of a single object as the origin relative to the world coordinate system W; the state sequence of a single object a is The i-th state data of a single object a name represents the name of a single object a, pos i = ( xi , y i , zi ) represents the position coordinates of the i-th state of a single object a; qua i = (q x , q y , q z , q w ) Indicates the direction of the i-th state of a single object a, color i = (c r , c g , c b ) represents the color of the i-th state of a single object a, and c r represents the color of the i-th state of a single object a The color component on the R channel, c g represents the color component of the color of the i-th state of a single object a on the G channel, and c b represents the color component of the color of the i-th state of a single object a on the B channel; bbox i = (x min , x max , y min , y max , z min , z max ) represents the size of the i-th state of a single object a, with the center of object a as the origin coordinate axis, (x min , x max ) Indicates the range of the size of object a on the x-axis, (y min , y max ) represents the range of the size of object a on the y-axis, (z min , z max ) represents the range of the size of object a on the z-axis; rel={ None, sub} indicates that a single object a is an inseparable component of an object, rel=None indicates that a single object a is not an inseparable component of any object, rel=sup indicates that a single object a is an inseparable component of an object sup, and sub indicates an object ; R represents the rotation matrix of the coordinate system A with the center of the single object a as the origin relative to the world coordinate system W, and the specific expression of R is shown in the following formula:
其中,旋转矩阵R由四列构成,第一列(R0,R4,R8)是坐标系A相对于世界坐标系W在x轴上的方向分量,第二列(R1,R5,R9)是坐标系A相对于世界坐标系W在y轴上的方向分量,第三列(R2,R6,R10)是坐标系A相对于世界坐标系W在z轴上的方向分量,第四列(R3,R7,R11)是坐标系A相对于世界坐标系W分别在x、y、z轴上的平移分量。Among them, the rotation matrix R consists of four columns, the first column (R 0 , R 4 , R 8 ) is the direction component of the coordinate system A relative to the world coordinate system W on the x-axis, and the second column (R 1 , R 5 , R 9 ) is the direction component of the coordinate system A relative to the world coordinate system W on the y-axis, and the third column (R 2 , R 6 , R 10 ) is the direction component of the coordinate system A relative to the world coordinate system W on the z-axis The direction component, the fourth column (R 3 , R 7 , R 11 ) is the translation component of the coordinate system A relative to the world coordinate system W on the x, y, and z axes respectively.
其中,通过对任务长度为N的机械臂抓手的状态序列中的开合状态进行差值处理来确定分割点,各分割点将机械臂抓手的状态序列分割为n个连续的任务子过程序列,具体为:Among them, the segmentation point is determined by performing difference processing on the opening and closing states in the state sequence of the robotic arm gripper with a task length of N, and each segmentation point divides the state sequence of the robotic arm gripper into n consecutive task sub-processes sequence, specifically:
设机械臂抓手的第i个状态中的开合状态为openi,下一个机械臂抓手的状态中的开合状态为openi+1,1≤i<N,将相邻两个的机械臂抓手的状态中的开合状态进行差值处理,得到开合状态差值即Let the opening and closing state of the i-th state of the robotic arm gripper be open i , and the opening and closing state of the next robotic arm gripper state be open i+1 , 1≤i<N, and the two adjacent The opening and closing state in the state of the gripper of the robotic arm is subjected to difference processing to obtain the opening and closing state difference which is
根据上述开合状态差值按照下述公式确定任务序列中的分割点pj,具体为: According to the above opening and closing state difference Determine the split point p j in the task sequence according to the following formula, specifically:
其中,j>1,0<i<N,p1=0,pn-1=N-1,p1=0表示第一个分割点是任务序列起始点,pn-1=N-1表示最后一个分割点是任务序列终止点;Among them, j>1, 0<i<N, p 1 =0, p n-1 =N-1, p 1 =0 means that the first split point is the starting point of the task sequence, p n-1 =N-1 Indicates that the last split point is the end point of the task sequence;
将机械臂抓手的状态序列中按照上述方法得到的分割点形成分割点序列{p1,p2,p3,...,pj,...,pn-1},pj<N,各分割点将机械臂抓手的状态序列分割为n个连续的子过程序列{s1,s2,s3,..,sj,...,sn},其中sj表示分割点pj到分割点pj+1的机械臂抓手的状态序列,记为任务子过程sj(pj,pj+1)Form the segmentation point sequence {p 1 , p 2 , p 3 , ..., p j , ..., p n-1 }, p j < N, each segmentation point divides the state sequence of the gripper of the robotic arm into n continuous sub-process sequences {s 1 , s 2 , s 3 , .., s j , ..., s n }, where s j represents The state sequence of the manipulator gripper from the split point p j to the split point p j+1 is recorded as the task sub-process s j (p j , p j+1 )
确定任务子过程sj的机械臂抓手的操作类型解析任务子过程sj中包含的所有物体的运动特征,分析任务子过程sj的机械臂抓手的操作类型任务子过程sj中包含的所有物体的运动特征、任务子过程sj中发生变化的物体列表和与机械臂抓手直接接触的物体列表,确定任务子过程sj机械臂抓手的动作类型及作用的物体,并根据任务子过程sj结束时所有物体的状态特征,解析作用物体的空间语义关系:Determine the type of manipulation of the robotic arm gripper for the task subprocess sj Analyze the motion characteristics of all objects contained in the task sub-process s j , and analyze the operation type of the manipulator gripper of the task sub-process s j The motion characteristics of all objects contained in the task sub-process sj , the list of objects changed in the task sub-process sj and the list of objects in direct contact with the gripper of the manipulator determine the action type of the gripper of the manipulator in the task sub-process sj and the acting objects, and according to the state characteristics of all objects at the end of the task sub-process s j , analyze the spatial semantic relationship of the acting objects:
任务子过程sj的机械臂抓手的操作类型的确定过程,具体为:根据任务子过程sj中机械臂抓手的位置变化、方向变化、开合状态确定任务子过程sj的机械臂抓手的操作类型按时序得到n个任务子过程的机械臂抓手的操作序列;The operation type of the robot arm gripper of the task subprocess s j The determination process of , specifically: according to the position change, direction change, and opening and closing state of the manipulator gripper in the task subprocess s j , determine the operation type of the manipulator gripper in the task subprocess s j Obtain the operation sequence of the manipulator gripper of n task sub-processes in time sequence;
根据任务子过程机械臂抓手起始位置终止位置起始方向终止方向开合状态,计算得到任务子过程机械臂抓手的运动特征 According to the task sub-process The starting position of the gripper of the robotic arm end position starting direction end direction In the open and close state, the motion characteristics of the robot arm gripper in the task sub-process are calculated
机械臂抓手的运动特征 Motion characteristics of the gripper of the robotic arm
式中,是任务子过程sj中机械臂抓手的位移;是任务子过程sj中机械臂抓手的旋转角度;是任务子过程sj中机械臂抓手的开合状态;In the formula, is the displacement of the gripper of the manipulator in the task sub-process s j ; is the rotation angle of the gripper of the manipulator in the task sub-process s j ; is the opening and closing state of the gripper of the manipulator in the task sub-process s j ;
其中, in,
式中,表示机械臂抓手在旋转到子过程终止pj+1时绕转轴旋转的角度分量,是机械臂抓手在旋转到子过程起始pj时绕转轴旋转的角度分量;In the formula, Indicates the angle component of the rotation around the axis of rotation of the gripper of the manipulator when it rotates to the end of the sub-process p j+1 , is the gripper of the manipulator revolves around the rotation axis when it rotates to the start p j of the sub-process the angular component of the rotation;
表示任务子过程sj中机械臂抓手的开合状态就是任务子过程起始pj时机械臂抓手的开合状态。 Indicates that the opening and closing state of the gripper of the manipulator in the task sub-process s j is the opening and closing state of the gripper of the manipulator at the beginning of the task sub-process p j .
其中,任务子过程sj的机械臂抓手的操作类型包括三个,分别为:reach表示到达、move表示移动、rotate表示旋转,的计算公式具体为:Among them, the operation type of the manipulator gripper of the task subprocess s j Including three, namely: reach means arrival, move means movement, rotate means rotation, The specific calculation formula is:
式中,表示任务子过程sj中机械臂抓手的位移,thresholddis是判定机械臂抓手产生位移的阈值;表示任务子过程sj中机械臂抓手的旋转角度,thresholdθ是判断机械臂抓手发生旋转变化的阈值;In the formula, Indicates the displacement of the gripper of the robotic arm in the task sub-process s j , and threshold dis is the threshold for determining the displacement of the gripper of the robotic arm; Indicates the rotation angle of the gripper of the robotic arm in the task sub-process s j , threshold θ is the threshold for judging the rotation change of the gripper of the robotic arm;
操作类型为reach时,其限制条件为:机械臂抓手产生位移的阈值小于等于任务子过程sj机械臂抓手的移动距离,并且机械臂抓手开合状态为开;operation type When it is reach, its restriction condition is: the threshold value of the displacement generated by the gripper of the robotic arm is less than or equal to the moving distance of the gripper of the robotic arm in the task sub-process s j , and the opening and closing state of the gripper of the robotic arm is open;
操作类型为move时,其限制条件为:机械臂抓手产生位移的阈值小于等于任务子过程sj机械臂抓手的移动距离,并且机械臂抓手开合状态为合;operation type When it is move, its restriction condition is: the threshold value of the displacement generated by the gripper of the robotic arm is less than or equal to the moving distance of the gripper of the robotic arm in the task sub-process s j , and the opening and closing state of the gripper of the robotic arm is closed;
操作类型为rotate时,其限制条件为:机械臂抓手产生位移的阈值大于任务子过程sj机械臂抓手的移动距离,并且机械臂抓手发生旋转变化的阈值小于等于任务子过程sj中机械臂抓手的旋转角度,并且机械臂抓手开合状态为合。operation type When it is rotate, the restrictive conditions are: the threshold of the displacement of the gripper of the robotic arm is greater than the moving distance of the gripper of the robotic arm in the task sub-process s j , and the threshold of the rotation change of the gripper of the robotic arm is less than or equal to the mechanical arm gripper in the task sub-process s j The rotation angle of the arm gripper, and the opening and closing state of the arm gripper is Closed.
其中,任务子过程sj中包含的所有物体的运动特征的解析过程,具体为:根据任务子过程sj中包含的某一单个物体a的起始位置终止位置起始方向终止方向以及起始颜色终止颜色获取单个物体a在任务子过程sj的运动特征进而获取任务子过程sj中包含的所有物体的运动特征;Among them, the analysis process of the motion characteristics of all objects contained in the task sub-process s j is specifically: according to the starting position of a single object a contained in the task sub-process s j end position starting direction end direction and the starting color end color Obtain the motion characteristics of a single object a in the task sub-process s j Then obtain the motion characteristics of all objects contained in the task sub-process s j ;
单个物体a在任务子过程sj的运动特征的计算公式为:The motion characteristics of a single object a in the task sub-process s j The calculation formula is:
其中: in:
其中,是任务子过程sj中物体a的位移;是任务子过程sj中物体a的旋转角度;是任务子过程sj中物体a的颜色变化;表示在任务子过程sj中物体a是否消失,表示物体a在经过任务子过程sj后消失,表示物体a在经过任务子过程sj后依然存在;分别是任务子过程sj终止时物体a的位置坐标,分别是任务子过程sj开始时物体a的位置坐标;表示物体a在旋转到任务子过程sj终止时的角度分量,是物体a在旋转到任务子过程sj起始pj时的角度分量;分别表示任务子过程sj开始时物体a的颜色通道, 分别表示任务子过程sj终止时物体a的颜色通道;代表在任务子过程sj起始执行点对应的物体中含物体a;代表在任务子过程sj终止执行点对应的物体中不含物体a。in, is the displacement of object a in task sub-process s j ; is the rotation angle of object a in task sub-process s j ; is the color change of object a in the task sub-process s j ; Indicates whether the object a disappears in the task sub-process s j , Indicates that the object a disappears after passing through the task sub-process s j , Indicates that the object a still exists after passing through the task sub-process s j ; are the position coordinates of the object a when the task sub-process s j terminates, respectively, are the position coordinates of the object a when the task sub-process s j starts; Indicates the angle component of the object a when it is rotated to the end of the task sub-process s j , is the angle component of the object a when it rotates to the start p j of the task sub-process s j ; Respectively represent the color channels of the object a when the task sub-process s j starts, Respectively represent the color channels of object a when the task sub-process s j terminates; Indicates that object a is included in the objects corresponding to the start execution point of the task sub-process s j ; It means that object a is not included in the objects corresponding to the termination execution point of the task sub-process s j .
其中,任务子过程sj中发生变化的物体列表和与机械臂抓手直接接触的物体列表的获取过程,具体为:Among them, the acquisition process of the object list that changes in the task sub-process s j and the object list that is in direct contact with the gripper of the manipulator is as follows:
分别获取任务子过程sj中产生位移、发生旋转、发生颜色变化、消失物体的运动特征,并将任务子过程sj发生变化的物体名称分别存入列表、列表、列表、列表,具体如下述:Obtain the movement characteristics of objects that have displacement, rotation, color change, and disappearance in the task sub-process s j respectively, and store the names of the objects that change in the task sub-process s j into list, list, list, list, as follows:
将任务子过程sj中移动距离大于位移变化阈值的物体名称存入列表;Store the name of the object whose moving distance is greater than the displacement change threshold in the task sub-process s j into list;
假设物体a在子过程sj中产生位移,则有:其中,thresholdo_dis是判定物体产生位移的阈值,rela≠None标志物体a为某一物体sup不可脱离的组件,是sup在子过程sj中产生的位移;Assuming that object a generates displacement in subprocess s j , then: Among them, threshold o_dis is the threshold for determining the displacement of an object, rel a ≠ None indicates that object a is an inseparable component of an object sup, is the displacement generated by sup in the subprocess s j ;
将某一物体a确定为产生位移的对象,其限制条件为:任务子过程sj物体a的移动距离大于等于产生位移的阈值,并且物体a不是任何物体不可脱离的组件或物体a不可脱离的组件object的移动距离小于产生位移的阈值;Determining an object a as an object that produces displacement, the restrictive conditions are: the moving distance of object a in the task sub-process s j is greater than or equal to the threshold value of displacement, and object a is not an inseparable component of any object or object a is inseparable The moving distance of the component object is less than the displacement threshold;
将任务子过程sj中只发生旋转的物体名称存入列表:假设物体a在任务子过程sj中只发生旋转则有: Store the name of the object that only rotates in the task sub-process s j into List: Assuming that object a only rotates in task sub-process s j , then:
其中,thresholdo_dis是判定物体产生位移的阈值,thresholdo_θ是判定物体发生旋转的阈值;Among them, threshold o_dis is the threshold for determining the displacement of the object, and threshold o_θ is the threshold for determining the rotation of the object;
将任务子过程sj中发生颜色变化的物体的名称存入列表:假设物体a在任务子过程sj中发生颜色变化则有: Store the name of the object whose color changes in the task sub-process s j into List: Assuming that object a changes color in task sub-process s j , then:
将任务子过程sj中消失的物体的名称存入列表:假设物体a在任务子过程sj中消失则有: Store the name of the object that disappeared in the task subprocess s j into List: Suppose object a disappears in task sub-process s j then:
根据上述机械臂抓手的状态数据和所有物体的状态数据,获取任务子过程sj中与机械臂抓手直接接触的物体列表t_objects;According to the state data of the above-mentioned robotic arm gripper and the state data of all objects, obtain the object list t_objects in the task sub-process s j that is in direct contact with the robotic arm gripper;
假设t_objecs={(a_name,1),(b_name,4)},其中a_name代表物体a的名称,1代表第1个任务子过程,(a_name,1)代表在子过程s1中机械臂抓手直接接触物体a,(b_name,4)代表子过程s4中机械臂抓手直接接触物体b;物体a满足以下关系:Suppose t_objects={(a_name, 1), (b_name, 4)}, where a_name represents the name of object a, 1 represents the first task sub-process, (a_name, 1) represents the gripper of the robotic arm in sub-process s 1 Direct contact with object a, (b_name, 4 ) means that the gripper of the robotic arm directly contacts object b in sub-process s4; object a satisfies the following relationship:
其中,表示第p1个执行点对应物体α的位置坐标表示第p1个执行点中机械臂抓手的位置坐标;distance是计算两个坐标点之间的距离公式;min_dis是第p1个执行点对应时刻所有物体与机械臂抓手距离的最小值;表示子过程s1中机械臂抓手的开合状态;表示物体a在子过程s1中的位移。表示在子过程s1起始p1和终止p2时刻,物体a与机械臂抓手之间的距离没有发生改变。in, Indicates the position coordinates of the pth 1st execution point corresponding to the object α Indicates the position coordinates of the gripper of the robotic arm at the p1th execution point; distance is the formula for calculating the distance between two coordinate points; min_dis is the minimum distance between all objects and the gripper of the robotic arm at the moment corresponding to the p1th execution point ; Indicates the opening and closing state of the gripper of the robotic arm in sub-process s1 ; Indicates the displacement of object a in subprocess s1 . Indicates that the distance between the object a and the gripper of the manipulator does not change at the start p 1 and end p 2 moments of the sub-process s 1 .
其中,任务子过程sj机械臂抓手的动作类型及作用的物体的确定过程,具体为:任务子过程sj(pj,pj+1)起始pj和终止pj+1时物体的属性从单个物体a状态数据中获取,其中状态数据中的序号i等于任务子过程中起始pj和终止pj+1的序号;Among them, the task sub-process s j is the determination process of the action type of the manipulator arm gripper and the object to be acted on, specifically: when the task sub-process s j (p j , p j+1 ) starts at p j and ends at p j+1 Object properties from individual object a state data , where the serial number i in the state data is equal to the serial numbers of the start p j and the end p j+1 in the task sub-process;
任务子过程sj机械臂抓手的动作类型具体的确定公式如下式所示:The specific formula for determining the action type of the task sub-process s j robotic arm gripper is as follows:
其中,是任务子过程sj中机械臂抓手的操作类型;是任务子过程sj中产生位移的物体个数;是任务子过程sj中发生旋转的物体个数;是任务子过程sj中发生颜色变化的物体个数;是任务子过程sj中机械臂抓手直接接触的物体;是任务子过程sj中机械臂抓手直接接触物体的rel值,表示该物体是某个物体不可脱离的组件,rel=None表示该物体不是任何物体不可脱离的组件,rel=sup表示该物体是物体sup不可脱离的组件;是任务子过程sj中消失的物体个数;当机械臂抓手的动作类型是“move”并且机械臂抓手直接接触物体是作为物体sup不可分割的组件时,任务子过程sj的动作类型具体是“push”还是“pull”,要根据物体与sup对象的距离变化进一步区分,具体的公式如下:in, is the operation type of the robotic arm gripper in the task sub-process s j ; is the number of displaced objects in the task sub-process s j ; is the number of objects rotated in the task sub-process s j ; is the number of objects whose color changes in the task sub-process s j ; is the object directly contacted by the gripper of the robotic arm in the task sub-process sj ; is the rel value of the object in direct contact with the gripper of the robotic arm in the task sub-process s j , indicating that the object is an inseparable component of an object, rel=None indicates that the object is not an inseparable component of any object, rel=sup indicates that the object is an inseparable component of the object sup; is the number of objects that disappear in the task sub-process s j ; when the action type of the robotic arm gripper is "move" and the direct contact of the robotic arm gripper with the object is an inseparable component of the object sup, the action of the task sub-process s j Whether the type is "push" or "pull" should be further distinguished according to the distance between the object and the sup object. The specific formula is as follows:
其中,是位移变化物体在任务子过程起始pj时的位置坐标;是位移变化物体的sup对象在任务子过程起始pj时的位置坐标;distance是计算两个坐标点间的距离公式。in, is the position coordinate of the displacement-changing object at the start p j of the task sub-process; is the position coordinate of the sup object of the displacement-changing object at the start p j of the task sub-process; distance is the formula for calculating the distance between two coordinate points.
定义上述机械臂抓手的动作类型与其作用物体的关系,具体如下:Define the relationship between the action type of the above-mentioned robotic arm gripper and the object it acts on, as follows:
到达物体a处,表示为“到达”:物体a是通过在t_objects中查找在子过程sj序列之后且离它最近子过程sk对应的物体,即(a,sk),j<k。Arrive at object a, denoted as "arrived": Object a is searched in t_objects for the object corresponding to the sub-process s k that follows the sub-process s j sequence and is closest to it, ie (a, s k ), j<k.
旋转物体a,表示为“旋转”:物体a是通过查找t_objects中查找与sj对应的物体,即(a,sj)。Rotate object a, expressed as "rotation": The object a is found by looking up the object corresponding to s j in t_objects, namely (a, s j ).
移动物体a,表示为“移动”:物体中a是通过查找t_objects中查找与sj对应的物体,即(a,sj),a*是物体a最终到达的物体,即为的中发生位置改变的物体。Moving object a, denoted as "moving": In the object, a is to find the object corresponding to s j by searching t_objects, that is, (a, s j ), and a * is the object that object a finally arrives at, that is, Objects that change position in .
按压物体a使得物体b发生颜色改变,表示为“按压”:物体a为中位置发生改变的物体,物体b为中颜色发生改变的物体。Pressing object a makes object b change color, denoted as "press": object a is The object whose position changes in the middle, the object b is Objects that change color.
将拿着物体a推动物体b,表示“间接推”:为物体中a是通过查找t_objects中查找与sj对应的物体,即(a,sj),物体b为中不是物体a的另一个物体,b*是物体b最终到达的物体。Will hold object a and push object b, which means "indirect push": for In the object a is to find the object corresponding to s j by searching t_objects, that is, (a, s j ), the object b is is another object that is not object a, and b * is the object that object b eventually arrives at.
抓着物体a推物体b,表示为“推”:物体a是通过查找t_objects中查找与sj对应的物体,即(a,sj),如果查找失败,物体a为空;物体b是中位置发生改变的物体。Hold object a and push object b, expressed as "push": Object a is to find the object corresponding to s j by searching t_objects, namely (a, s j ), if the search fails, object a is empty; object b is Objects whose positions have changed.
抓着物体a拉物体b,表示为“拉”:物体a是通过查找t_objects中查找与sj对应的物体,即(a,sj);物体b是中位置发生改变的物体。Grab object a and pull object b, denoted as "pull": Object a is found by looking up the object corresponding to s j in t_objects, namely (a, s j ); object b is Objects whose positions have changed.
拿着物体a清除物体b,表示为“清除”:物体a是通过查找t_objects中查找与sj对应的物体,即(a,sj);物体b是中位置发生改变的物体,可能不止一个。Take object a and clear object b, denoted as "clear": Object a is found by looking up the object corresponding to s j in t_objects, namely (a, s j ); object b is There may be more than one object whose position has changed in .
根据任务子过程sj结束时所有物体的状态特征,解析作用物体的空间语义关系,具体为:根据任务子过程sj结束时所有物体的状态特征,解析作用物体a与其他物体object的空间语义关系,表示为type表述两个物体的关系类型,这里定义四种关系类型,有“包含”、“相交”、“相邻”和“接触”,如图2所示,物体B1与物体B2的空间语义关系为“包含”,即物体B1在物体B2中,表示为sem(B1,B2,contain);物体P1与物体P2的关系是“相交”,两个物体之间部分相交,表示为sem(P1,P2,cross);物体O1与周围物体O2~O4的关系和物体C1与周围物体C2、C3的关系是“相邻”,存在上下关系、左右关系和前后关系,例如,物体O1在物体O2的下方,表示为sem(O1,O2,below);物体O1在物体O5的关系是“相离”,即两个物体之间没有接触,表示为sem(O1,O2,separated)。According to the state characteristics of all objects at the end of the task sub-process s j , analyze the spatial semantic relationship of the acting object, specifically: according to the state characteristics of all objects at the end of the task sub-process s j , analyze the spatial semantics of the acting object a and other objects object relationship, expressed as type expresses the relationship type of two objects. Four types of relationship are defined here, including "contains", "intersects", "adjacent" and "contact". As shown in Figure 2, the spatial semantics of object B 1 and object B 2 The relationship is "contains", that is, object B 1 is in object B 2 , expressed as sem(B 1 , B 2 , contain); the relationship between object P 1 and object P 2 is "intersect", and the two objects partially intersect , expressed as sem(P 1 , P 2 , cross); the relationship between object O 1 and surrounding objects O 2 ~ O 4 and the relationship between object C 1 and surrounding objects C 2 and C 3 are "adjacent", and there is an upper-lower relationship , left-right relationship and front-back relationship, for example, object O 1 is below object O 2 , expressed as sem(O 1 , O 2 , below); the relationship between object O 1 and object O 5 is "separation", that is, two There is no contact between objects, expressed as sem(O 1 , O 2 , separated).
场景中每个物体都有自己的坐标系来确定物体方向,在判断任务子过程sj结束pj+1时执行点对应的物体a和物体b之间的关系之前,首先要获取两物体的bbox边界范围变换到同一坐标系中,假设坐标系A是以物体a中心为原点的坐标系,在坐标系A上的点转换到世界坐标系W上的坐标计算公式如下:Each object in the scene has its own coordinate system to determine the direction of the object. Before judging the relationship between the object a and object b corresponding to the execution point when the task sub-process s j ends p j+1 , it is necessary to first obtain the coordinates of the two objects The boundary range of the bbox is transformed into the same coordinate system, assuming that the coordinate system A is the coordinate system with the center of the object a as the origin, and the point on the coordinate system A Convert to coordinates on the world coordinate system W Calculated as follows:
其中,R是坐标系A相对世界坐标系W的旋转矩阵,旋转矩阵R由四列构成,第一列(Ra0,Ra4,Ra8)是坐标系A相对于世界坐标系W在x轴上的方向分量,第二列(Ra1,Ra5,Ra9)是坐标系A相对于世界坐标系W在y轴上的方向分量,第三列(Ra2,Ra6,Ra10)是坐标系A相对于世界坐标系W在z轴上的方向分量,第四列(Ra3,Ra7,Ra11)是坐标系A相对于世界坐标系W,分别在x、y、z轴上的平移分量。Among them, R is the rotation matrix of the coordinate system A relative to the world coordinate system W, the rotation matrix R is composed of four columns, the first column (R a0 , R a4 , R a8 ) is the coordinate system A relative to the world coordinate system W on the x-axis , the second column (R a1 , R a5 , R a9 ) is the direction component of the coordinate system A relative to the world coordinate system W on the y-axis, and the third column (R a2 , R a6 , R a10 ) is The direction component of the coordinate system A relative to the world coordinate system W on the z axis, the fourth column (R a3 , R a7 , R a11 ) is the coordinate system A relative to the world coordinate system W, respectively on the x, y, and z axes translation component of .
基于以上坐标系转换方法,得到物体a和物体b在世界坐标系W下的边界点坐标,确定物体a和物体b的边界点在世界坐标系W的x、y、z轴上的范围。Based on the above coordinate system conversion method, the coordinates of the boundary points of object a and object b in the world coordinate system W are obtained, and the range of the boundary points of object a and object b on the x, y, and z axes of the world coordinate system W is determined.
物体a与物体b的空间语义关系type类型的判断方法,具体为:The method for judging the type of the spatial semantic relationship between object a and object b, specifically:
通过物体a与物体b的中心点距离与两物体bbox最大边界的关系;若满足以下条件则进行S1,否则物体a与物体b是不相关的,type=separated,判断条件如下:Through the relationship between the distance between the center point of object a and object b and the maximum boundary of the bbox of the two objects; if the following conditions are met, then proceed to S1, otherwise object a and object b are irrelevant, type=separated, the judgment conditions are as follows:
其中,是任务子过程终止(pi+1)时物体a的位置坐标;是任务子过程终止时物体b的位置坐标;distance是计算两个坐标点之间的距离公式;是任务子过程终止(pi+1)时物体a分别在x、y、z轴上最大的边界值;是任务子过程终止(pi+1)时物体b分别在x、y、z轴上最大的边界值;in, is the position coordinate of object a when the task sub-process terminates (p i+1 ); is the position coordinate of object b when the task sub-process is terminated; distance is the formula for calculating the distance between two coordinate points; is the maximum boundary value of object a on the x, y, and z axes respectively when the task sub-process terminates (p i+1 ); are the maximum boundary values of the object b on the x, y, and z axes respectively when the task sub-process terminates (p i+1 );
S1、通过物体a与物体b在世界坐标系W的x、y、z轴上边界范围的关系,确定空间语义关系类型;若不满足以下条件,则进行S2,具体公式如下:S1. Determine the type of spatial semantic relationship through the relationship between object a and object b on the x, y, and z axes of the world coordinate system W; if the following conditions are not met, proceed to S2. The specific formula is as follows:
其中,是指物体a在世界坐标系W的x轴上的边界范围;是指物体b在世界坐标系W的x轴上的边界范围;是指物体a在世界坐标系W的y轴上的边界范围;是指物体b在世界坐标系W的y轴上的边界范围;是指物体a在世界坐标系W的z轴上的边界范围;是指物体b在世界坐标系W的z轴上的边界范围。in, Refers to the boundary range of object a on the x-axis of the world coordinate system W; Refers to the boundary range of object b on the x-axis of the world coordinate system W; Refers to the boundary range of object a on the y-axis of the world coordinate system W; Refers to the boundary range of object b on the y-axis of the world coordinate system W; Refers to the boundary range of object a on the z-axis of the world coordinate system W; It refers to the boundary range of the object b on the z-axis of the world coordinate system W.
若满足上述条件则进行以下判断,确定空间语义关系类型,具体的公式如下:If the above conditions are met, the following judgments are made to determine the type of spatial semantic relationship. The specific formula is as follows:
S2、通过物体a与物体b在世界坐标系的中心坐标(xa,ya,za)、(xb,yb,zb)与两物体的关系,确定空间语义关系类型,具体的公式如下:S2. Through the center coordinates (x a , y a , z a ), (x b , y b , z b ) of object a and object b in the world coordinate system and the two objects relationship, to determine the type of spatial semantic relationship, the specific formula is as follows:
整合任务子过程sj的语义解析结果,构建基于任务的语义解析图,获得机械臂任务动作序列,具体为:整合任务子过程sj的解析模块结果,即任务子过程sj的动作序列、动作作用物体以及作用物体的空间语义关系,构建基于任务的语义解析图,获得机械臂任务动作序列Integrate the semantic analysis results of the task sub-process s j , build a task-based semantic analysis graph, and obtain the action sequence of the manipulator task, specifically: integrate the analysis module results of the task sub-process s j , that is, the action sequence of the task sub-process s j , The action object and the spatial semantic relationship of the action object, construct a task-based semantic analysis map, and obtain the action sequence of the manipulator task
其中是子过程sj的动作类型是任务子过程sj动作作用的物体列表。 in is the action type of subprocess s j is the list of objects that the action of the task subprocess s j acts on.
本发明实施例还提供了一种机械臂任务执行序列的语义解析系统,包括:存储器,用于存储可由处理器执行的指令;以及处理器,用于执行所述指令以实现如上所述的方法。An embodiment of the present invention also provides a semantic parsing system for a task execution sequence of a manipulator, including: a memory for storing instructions executable by a processor; and a processor for executing the instructions to implement the method as described above .
一种机械臂任务执行序列的语义解析系统,如图1所示,由三个模块构成,包括任务序列分割模块、任务子过程解析模块、语义解析图构建模块。A semantic analysis system for manipulator task execution sequence, as shown in Figure 1, consists of three modules, including task sequence segmentation module, task sub-process analysis module, and semantic analysis graph construction module.
其中任务序列分割模块负责获取机械臂任务执行点序列和执行点对应场景中所有物体的状态序列,通过对任务长度为N的机械臂抓手的状态序列中的开合状态进行差值处理来确定任务执行点序列分割点,各分割点将机械臂抓手的状态序列分割为n个连续的任务子过程序列;The task sequence segmentation module is responsible for obtaining the task execution point sequence of the manipulator and the state sequence of all objects in the scene corresponding to the execution point, which is determined by performing difference processing on the opening and closing states in the state sequence of the manipulator gripper with a task length of N Task execution point sequence segmentation point, each segmentation point divides the state sequence of the gripper of the robotic arm into n consecutive task sub-process sequences;
任务子过程解析模块负责根据确定的任务子过程sj的机械臂抓手的操作类型解析的任务子过程sj中包含的所有物体的运动特征、获取的任务子过程sj中发生变化的物体列表和与机械臂抓手直接接触的物体列表,分析每个任务子过程sj中机械臂抓手的操作类型、状态发生变化的物体属性、机械臂抓手直接接触的物体之间的关系,确定任务子过程sj机械臂抓手的动作类型及作用的物体,并根据任务子过程sj结束时所有物体的状态特征,解析作用物体的空间语义关系;The task subprocess analysis module is responsible for the operation type of the manipulator arm gripper according to the determined task subprocess s j The motion characteristics of all the objects contained in the parsed task sub-process s j , the list of objects changed in the acquired task sub-process s j and the list of objects that are in direct contact with the gripper of the manipulator, are analyzed in each task sub-process s j The operation type of the gripper of the manipulator, the properties of the objects whose state changes, and the relationship between the objects directly contacted by the gripper of the manipulator determine the action type of the gripper of the manipulator and the objects it acts on, and according to the task The state characteristics of all objects at the end of the process sj , and analyze the spatial semantic relationship of the acting objects;
语义解析图构建模块负责整合任务子过程sj的语义解析结果,构建基于任务的语义解析图,获得机械臂任务动作序列。The semantic analysis graph building module is responsible for integrating the semantic analysis results of the task sub-process s j , constructing a task-based semantic analysis graph, and obtaining the task action sequence of the manipulator.
上述的机械臂任务执行序列的语义解析系统可以实施为计算机程序,保存在硬盘中,并可记载到处理器中执行,以实施本发明实施例的方法。The above-mentioned semantic analysis system for the task execution sequence of the manipulator can be implemented as a computer program, stored in a hard disk, and recorded in a processor for execution, so as to implement the method of the embodiment of the present invention.
本发明实施例还提供了一种存储有计算机程序代码的计算机可读介质,所述计算机程序代码在由处理器执行时实现如上所述的一种机械臂任务执行序列的语义解析方法。The embodiment of the present invention also provides a computer-readable medium storing computer program code, and the computer program code implements the above-mentioned method for semantic analysis of a task execution sequence of a manipulator when executed by a processor.
一种机械臂任务执行序列的语义解析方法实施为计算机程序时,也可以存储在计算机可读存储介质中作为制品。例如,计算机可读存储介质可以包括但不限于磁存储设备(例如,硬盘、软盘、磁条)、光盘(例如,压缩盘(CD)、数字多功能盘(DVD))、智能卡和闪存设备(例如,电可擦除可编程只读存储器(EPROM)、卡、棒、键驱动)。此外,本发明实施例描述的各种存储介质能代表用于存储信息的一个或多个设备和/或其它机器可读介质。术语“机器可读介质”可以包括但不限于能存储、包含和/或承载代码和/或指令和/或数据的无线信道和各种其它介质(和/或存储介质)。When a semantic analysis method for a task execution sequence of a manipulator is implemented as a computer program, it can also be stored in a computer-readable storage medium as a product. For example, computer-readable storage media may include, but are not limited to, magnetic storage devices (e.g., hard disk, floppy disk, magnetic stripe), optical disks (e.g., compact disk (CD), digital versatile disk (DVD)), smart cards, and flash memory devices ( For example, Electrically Erasable Programmable Read Only Memory (EPROM), card, stick, key drive). Additionally, various storage media described in embodiments of the present invention can represent one or more devices and/or other machine-readable media for storing information. The term "machine-readable medium" may include, but is not limited to, wireless channels and various other media (and/or storage media) capable of storing, containing and/or carrying code and/or instructions and/or data.
应该理解,上述的实施例仅是示意。本发明描述的实施例可在硬件、软件、固件、中间件、微码或者其任意组合中实现。对于硬件实现,处理单元可以在一个或者多个特定用途集成电路(ASIC)、数字信号处理器(DSP)、数字信号处理设备(DSPD)、可编程逻辑器件(PLD)、现场可编程门阵列(FPGA)、处理器、控制器、微控制器、微处理器和/或设计为执行本发明所述功能的其它电子单元或者其结合内实现。It should be understood that the above-described embodiments are illustrative only. Embodiments described herein may be implemented in hardware, software, firmware, middleware, microcode, or any combination thereof. For hardware implementation, the processing unit can be implemented in one or more Application Specific Integrated Circuits (ASICs), Digital Signal Processors (DSPs), Digital Signal Processing Devices (DSPDs), Programmable Logic Devices (PLDs), Field Programmable Gate Arrays ( FPGA), processor, controller, microcontroller, microprocessor and/or other electronic units designed to perform the functions described in the present invention, or a combination thereof.
下面对几个不同特点的简单任务通过以上方法,得到的语义解析图如图3所示,T1代表的是“打开某种门”的语义解析图;T2代表的是“关闭某种门”的语义解析图;T3代表的是“按下某种按钮”的语义解析图;T4代表的是“借助一个物体去推动另一个物体”的语义解析图;T5代表的是“移动某物体”的语义解析图;T6代表的是“清除某物体”的语义解析图;其中,虚线是可选的动作,根据学习的任务确定的。The semantic analysis graph obtained by the above method for several simple tasks with different characteristics is shown in Figure 3. T1 represents the semantic analysis graph of "opening a certain door"; T2 represents "closing a certain door" T3 represents the semantic analysis diagram of "pressing a certain button"; T4 represents the semantic analysis diagram of "using one object to push another object"; T5 represents the semantic analysis diagram of "moving an object" Semantic analysis diagram; T6 represents the semantic analysis diagram of "clearing an object"; among them, the dotted line is an optional action, which is determined according to the learning task.
对于复杂的任务的执行流程图,为了方便展示,就是将上述简单任务的进行组合表示,在对复杂任务解析时,依旧是按照上述步骤分析,没有简单和复杂任务的分别。这里列举了几个复杂任务的执行流程图,如图3所示,举例来说T7可以是“把物体放进抽屉里”,可以分解为“将抽屉拉开”、“把物体移动到抽屉里”;T8代表多次移动不同的物体,比如“将多个立方体摆放成金字塔状”、“摆放整套餐具(碟子、叉子、杯子等)”;T9可以是“用遥控器打开或关闭电视机”,可以分解为“将遥控器对准电视机”、“按下遥控器的开关电源键”;T10可以是“用放在抽屉里的遥控器打开电视机”,可以分解为“将抽屉拉开”、“把遥控器对准电视机”、“按下遥控器的开关电源键”。For the execution flow chart of complex tasks, for the convenience of display, the above simple tasks are combined and represented. When analyzing complex tasks, the analysis is still performed according to the above steps, and there is no distinction between simple and complex tasks. Here are the execution flow charts of several complex tasks, as shown in Figure 3. For example, T7 can be "put the object into the drawer", which can be decomposed into "pull the drawer open", "move the object into the drawer". "; T8 represents moving different objects multiple times, such as "arranging multiple cubes into a pyramid", "putting a complete tableware (plate, fork, cup, etc.)"; T9 can be "turning on or off the TV with the remote control machine", which can be decomposed into "point the remote control at the TV", "press the power button of the remote control"; T10 can be "turn on the TV with the remote control placed in the drawer", which can be decomposed into "turn the drawer Pull it away", "point the remote control at the TV", "press the power button of the remote control".
下面将图3中复杂任务T10具体为实例“用放在抽屉里的遥控器打开电视机”进一步展开语义解析图,如图4所示。复杂任务T10的语义解析图是由三个简单的任务组合构成的一组连续的动作序列以及动作作用的物体,表示为In the following, the complex task T10 in Figure 3 is specifically taken as an example "turn on the TV with the remote control placed in the drawer" to further expand the semantic analysis diagram, as shown in Figure 4 . The semantic analysis diagram of the complex task T10 is a set of continuous action sequences composed of three simple task combinations and the objects on which the actions act, expressed as
{(到达,抽屉把手),(拉,抽屉把手*,抽屉),(到达,遥控器),(移动,遥控器*),(到达,遥控器按钮),(按压,遥控器按钮*)},其中*代表发生改变后的物体对象及其属性。{(reach, drawer handle), (pull, drawer handle * , drawer), (reach, remote), (move, remote * ), (reach, remote button), (press, remote button * )} , where * represents the changed object and its attributes.
T10的语义解析图还包含与作用物体的空间相关的物体,可以是物体所属的、不可脱离的sup物体对象,也可以是空间语义关系中最紧密的物体,关系紧密度的优先级为“包含”>“相交”>“相邻”,如果作用物体没有“包含”、“相交”、“相邻”这三种类型的关系物体,则挑选其“相离”关系中距离最近的物体作为相关物体。这使得机械臂除了通过物体属性定位目标位置,还可以借助物体的空间语义关系,进一步确定动作的目标位置。The semantic analysis diagram of T10 also includes objects related to the space of the acting object, which can be the sup object that the object belongs to and cannot be separated from, or the object with the closest semantic relationship in the space, and the priority of the relationship tightness is "include ">"Intersect">"Adjacency", if the acting object does not have the three types of relationship objects of "Contain", "Intersect", and "Adjacent", select the object with the closest distance in its "Distance" relationship as the related object object. This enables the robotic arm to further determine the target position of the action by means of the spatial semantic relationship of the object in addition to locating the target position through the object attributes.
需要说明的是,在本申请中,诸如第一、第二等之类的关系术语仅仅用来将一个实体或者操作与另一个实体或操作区分开来,而不一定要求或者暗示这些实体或操作之间存在任何这种实际的关系或者顺序。而且,术语“包括”、“包含”或者其任何其他变体意在涵盖非排他性的包含,从而使得包括一系列要素的过程、方法、物品或者设备不仅包括那些要素,而且还包括没有明确列出的其他要素,或者是还包括为这种过程、方法、物品或者设备所固有的要素。在没有更多限制的情况下,由语句“包括一个……”限定的要素,并不排除在包括所述要素的过程、方法、物品或者设备中还存在另外的相同要素。It should be noted that in this application, relative terms such as first, second, etc. are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply that these entities or operations Any such actual relationship or order exists between. Furthermore, the term "comprises", "comprises" or any other variation thereof is intended to cover a non-exclusive inclusion such that a process, method, article, or apparatus comprising a set of elements includes not only those elements, but also includes elements not expressly listed. other elements of or also include elements inherent in such a process, method, article, or device. Without further limitations, an element defined by the phrase "comprising a ..." does not exclude the presence of additional identical elements in the process, method, article or apparatus comprising said element.
本说明书中的各个实施例均采用相关的方式描述,各个实施例之间相同相似的部分互相参见即可,每个实施例重点说明的都是与其他实施例的不同之处。Each embodiment in this specification is described in a related manner, the same and similar parts of each embodiment can be referred to each other, and each embodiment focuses on the differences from other embodiments.
以上所述仅为本发明的较佳实施例而已,并非用于限定本发明的保护范围。凡在本发明的精神和原则之内所作的任何修改、等同替换、改进等,均包含在本发明的保护范围内。The above descriptions are only preferred embodiments of the present invention, and are not intended to limit the protection scope of the present invention. Any modification, equivalent replacement, improvement, etc. made within the spirit and principles of the present invention are included in the protection scope of the present invention.
Claims (5)
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202011552393.9A CN112667823B (en) | 2020-12-24 | 2020-12-24 | A method, system and computer-readable medium for semantic parsing of robotic arm task execution sequence |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202011552393.9A CN112667823B (en) | 2020-12-24 | 2020-12-24 | A method, system and computer-readable medium for semantic parsing of robotic arm task execution sequence |
Publications (2)
Publication Number | Publication Date |
---|---|
CN112667823A CN112667823A (en) | 2021-04-16 |
CN112667823B true CN112667823B (en) | 2022-11-01 |
Family
ID=75410039
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202011552393.9A Active CN112667823B (en) | 2020-12-24 | 2020-12-24 | A method, system and computer-readable medium for semantic parsing of robotic arm task execution sequence |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN112667823B (en) |
Citations (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN104751564A (en) * | 2015-04-02 | 2015-07-01 | 中国科学技术大学 | Independent selling method of service robot on basis of semantic comprehension and answer set programming |
CN108170734A (en) * | 2017-12-15 | 2018-06-15 | 国网冀北电力有限公司信息通信分公司 | A kind of intelligence O&M robot |
Family Cites Families (8)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
GB201601880D0 (en) * | 2016-02-02 | 2016-03-16 | Ocado Innovation Ltd | Robotic gripping device system and method |
CN105931218B (en) * | 2016-04-07 | 2019-05-17 | 武汉科技大学 | The intelligent sorting method of modular mechanical arm |
CN107972026B (en) * | 2016-10-25 | 2021-05-04 | 河北亿超机械制造股份有限公司 | Robot, mechanical arm and control method and device thereof |
CN107030691B (en) * | 2017-03-24 | 2020-04-14 | 华为技术有限公司 | Data processing method and device for nursing robot |
CN108638065B (en) * | 2018-05-15 | 2021-04-16 | 河南科技学院 | A dual-arm collaborative control system for an explosive-discharging robot |
CN109910018B (en) * | 2019-04-26 | 2024-01-30 | 清华大学 | Robot virtual-real interaction operation execution system and method with visual semantic perception |
CN110340893B (en) * | 2019-07-12 | 2022-06-17 | 哈尔滨工业大学(威海) | Mechanical arm grabbing method based on semantic laser interaction |
CN111267095B (en) * | 2020-01-14 | 2022-03-01 | 大连理工大学 | A robotic arm grasping control method based on binocular vision |
-
2020
- 2020-12-24 CN CN202011552393.9A patent/CN112667823B/en active Active
Patent Citations (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN104751564A (en) * | 2015-04-02 | 2015-07-01 | 中国科学技术大学 | Independent selling method of service robot on basis of semantic comprehension and answer set programming |
CN108170734A (en) * | 2017-12-15 | 2018-06-15 | 国网冀北电力有限公司信息通信分公司 | A kind of intelligence O&M robot |
Also Published As
Publication number | Publication date |
---|---|
CN112667823A (en) | 2021-04-16 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
Liu et al. | Rdt-1b: a diffusion foundation model for bimanual manipulation | |
Wächter et al. | Action sequence reproduction based on automatic segmentation and object-action complexes | |
US9144905B1 (en) | Device and method to identify functional parts of tools for robotic manipulation | |
Niu et al. | Llarva: Vision-action instruction tuning enhances robot learning | |
WO2023221422A1 (en) | Neural network used for text recognition, training method thereof and text recognition method | |
Gouravajhala et al. | Eureca: Enhanced understanding of real environments via crowd assistance | |
CN110222730A (en) | Method for identifying ID and identification model construction method based on inertial sensor | |
WO2024078088A1 (en) | Interaction processing method and apparatus | |
Zhang et al. | SAM-E: Leveraging visual foundation model with sequence imitation for embodied manipulation | |
Ikeuchi et al. | Semantic constraints to represent common sense required in household actions for multimodal learning-from-observation robot | |
CN117273107A (en) | Training method and training device for text generation model | |
Chen et al. | Towards robotic picking of targets with background distractors using deep reinforcement learning | |
Dong et al. | Gesture recognition in augmented reality assisted assembly training | |
CN112667823B (en) | A method, system and computer-readable medium for semantic parsing of robotic arm task execution sequence | |
Kobzarev et al. | Gestllm: Advanced hand gesture interpretation via large language models for human-robot interaction | |
Nguyen et al. | GraspMamba: A Mamba-based language-driven grasp detection framework with hierarchical feature learning | |
Ogawara et al. | Recognition of human task by attention point analysis | |
Yang et al. | Autonomous tool construction with gated graph neural network | |
Wake et al. | Text-driven object affordance for guiding grasp-type recognition in multimodal robot teaching | |
Wake et al. | Object affordance as a guide for grasp-type recognition | |
CN118578381A (en) | Robot object grasping method, device, electronic device and storage medium | |
EP4547451A1 (en) | Robot control based on natural language instructions and on descriptors of objects that are present in the environment of the robot | |
CN117351330A (en) | Image processing methods, image processing model training methods, devices and equipment | |
Latoschik | A general framework for multimodal interaction in virtual reality systems: PrOSA | |
Williams et al. | Analysis of affordance detection methods for real-world robotic manipulation |
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 |