CN-121787137-B - Virtual-real coupling-based robot simulation walking method and system
Abstract
The invention relates to the technical field of simulation data processing and discloses a virtual-real coupling-based robot simulation walking method and a virtual-real coupling-based robot simulation walking system, wherein the method comprises the following steps of 1, establishing a discrete time index sequence and acquiring a basic data set; step 2, generating a displacement paragraph label sequence according to the position data, step 3, generating a left-right stepping event sequence and a stride grade sequence, step 4, constructing a simulated walking semantic frame and forming a the first edition simulated walking semantic sequence, step 5, executing consistency check on the the first edition simulated walking semantic sequence to generate a lasting risk window set, step 6, executing deterministic semantic editing repair on the semantic frame in the lasting risk window, and step 7, completing consistency check in a preset round, and outputting a final simulated walking semantic sequence and related marks. The invention improves the stability, consistency and rechecking performance of the robot simulation walking result under the virtual-real coupling scene.
Inventors
- WANG CHUNLIN
- XU BIN
Assignees
- 厦门十一街信息科技有限公司
Dates
- Publication Date
- 20260512
- Application Date
- 20260305
Claims (9)
- 1. The virtual-real coupling-based robot simulation walking method is characterized by comprising the following steps of: step 1, establishing a discrete time index sequence, and acquiring a basic data set corresponding to the discrete time index sequence one by one, wherein the basic data set comprises a position data sequence, a gait template and a shielding level sequence; Step 2, generating a displacement paragraph label sequence according to adjacent index difference values of the position data sequence; step 3, generating a left-right stepping event sequence based on the gait template, and generating a stride grade sequence according to the displacement paragraph tag sequence; Step 4, converting the shielding grade sequence into a lasting risk grade sequence, binding a displacement paragraph label sequence, a left-right stepping event sequence, a stride grade sequence and a lasting risk grade sequence according to the same discrete time index, constructing a simulation walking semantic frame and forming the first edition simulation walking semantic sequences; step 5, performing consistency verification on the first edition simulation walking semantic sequences according to the hard constraint rule set to generate an offending mark sequence and a lasting risk window set; Step 6, according to the lasting risk window set and the violation mark sequence, executing deterministic semantic editing repair on the simulated walking semantic frames in the lasting risk window to obtain a repaired simulated walking semantic sequence, wherein the method comprises the following steps: Step 71, reading a lasting risk window set and a violation mark sequence, confirming that violation marks corresponding to discrete time indexes covered by the lasting risk window set are all violations, limiting an editing range by a start discrete time index and an end discrete time index of each lasting risk window in the lasting risk window set, determining a simulation walking semantic frame in the editing range in the first edition simulation walking semantic sequences as an edited object, and determining a simulation walking semantic frame outside the editing range as a non-edited object; Step 72, limiting editing fields of deterministic semantic editing repair to left and right stepping events and stride grades, and setting an editing rule set with a fixed priority, wherein the fixed priority is non-lasting repair, stop-walk consistency repair and gait consistency repair in sequence, the non-lasting repair is executed for a simulated walking semantic frame with high risk of lasting risk, the stop-walk consistency repair is executed for a simulated walking semantic frame with stop of a displacement paragraph label, and the gait consistency repair is executed for a simulated walking semantic frame with the same left and right stepping event as the left and right stepping event corresponding to a previous discrete time index; step 73, traversing the first edition the simulation walking semantic sequence according to the index increment sequence of the discrete time index sequence, sequentially executing deterministic semantic editing repair according to a fixed priority at the discrete time index corresponding to the edited object, triggering and completing editing according to a high priority rule, not executing a low priority rule, keeping the simulation walking semantic frames unchanged at the discrete time index corresponding to the non-edited object, and arranging all traversed simulation walking semantic frames according to the sequence of the discrete time index sequence to obtain a repaired simulation walking semantic sequence; And 7, performing consistency check on the repaired simulated walking semantic sequence, obtaining a final simulated walking semantic sequence in a preset round, and outputting the final simulated walking semantic sequence, wherein the consistency check passes through the mark and the window repair record.
- 2. The virtual-real coupling-based robot simulation walking method as set forth in claim 1, wherein establishing a discrete time index sequence to obtain a basic data set corresponding to the discrete time index sequence one by one comprises: Step 11, establishing a discrete time index sequence, setting the discrete time index sequence as an ordered index set which is arranged according to the increment of the index, and applying a uniqueness constraint and an order constraint to the discrete time index sequence; step 12, obtaining a basic data set comprising a position data sequence, a gait template and a shielding level sequence, wherein the position data sequence is a position information record value set corresponding to the discrete time index sequence one by one, the gait template is a finite sequence formed by preset gait symbols, and the shielding level sequence is a shielding degree identification set corresponding to the discrete time index sequence one by one; And 13, performing consistency verification on the basic data set, checking the index coverage relation and one-to-one correspondence relation of the position data sequence and the shielding level sequence to the discrete time index sequence, writing a corresponding space value occupation record in the discrete time index when any discrete time index in the discrete time index sequence lacks a position information record value or shielding degree mark, and writing the space value occupation mark in the discrete time index.
- 3. The virtual-real coupling-based robot simulation walking method of claim 1, wherein generating a displacement paragraph tag sequence according to adjacent index differences of the position data sequence comprises: Step 21, constructing adjacent index pairs according to the discrete time index sequence in an index increasing order, wherein each adjacent index pair is formed by a current discrete time index and a previous discrete time index, the adjacent index pairs are only constructed aiming at the discrete time indexes except the initial index, and position information record values corresponding to the adjacent index pairs in the position data sequence are read; Step 22, for each adjacent index pair, subtracting the position information record value corresponding to the previous discrete time index from the position information record value corresponding to the current discrete time index of the adjacent index pair to obtain an adjacent index difference, and arranging the adjacent index differences into position change information according to the sequence of the discrete time indexes, wherein the position change information only corresponds to the discrete time indexes except the initial index; Step 23, determining the position variation amplitude according to the position variation information, summing the square of each dimension component of the adjacent index difference value, then squaring the summation result to obtain the position variation amplitude, determining the corresponding displacement paragraph label as stop when the position variation amplitude is zero, determining the corresponding displacement paragraph label as moving when the position variation amplitude is not zero, determining the displacement paragraph label sequence only comprising stop and moving, determining the corresponding displacement paragraph label of the starting index of the discrete time index sequence as stop when the position information record value of the position data sequence is a null value occupation record, and determining the corresponding displacement paragraph label as stop.
- 4. The virtual-real coupling-based robot simulation walking method of claim 1, wherein generating a left-right swing event sequence based on a gait template and generating a stride level sequence based on a displacement paragraph tag sequence comprises: Step 31, reading a gait template according to the discrete time index sequence, and circularly expanding the gait template according to the discrete time index sequence one by one, so that each discrete time index in the discrete time index sequence corresponds to a unique gait symbol of the gait template, and an initial left-right stepping event sequence is obtained; Step 32, correcting the initial left and right stepping event sequence according to the displacement paragraph tag sequence, determining the initial left and right stepping event sequence to be transitional when the displacement paragraph tag sequence corresponds to the discrete time index to stop, and keeping the initial left and right stepping event sequence to be unchanged when the displacement paragraph tag sequence corresponds to the discrete time index to move to obtain a left and right stepping event sequence; Step 33, generating a position variation amplitude according to the position data sequence and generating a stride grade sequence according to the displacement paragraph label sequence, wherein for discrete time indexes except for a start index, subtracting a position information record value corresponding to a previous position data sequence from a position information record value corresponding to the current position data sequence to obtain an adjacent index difference value, converting the adjacent index difference value into the position variation amplitude, determining the stride grade as no stride when the discrete time index corresponding to the displacement paragraph label sequence is stopped, determining the stride grade as a small stride, a medium stride or a large stride according to a comparison relation between the position variation amplitude and the position variation amplitude of the previous discrete time index when the discrete time index corresponding to the displacement paragraph label sequence is moving, and determining the stride grade as a medium stride for the discrete time index lacking the position variation amplitude of the previous discrete time index.
- 5. The virtual-real coupling-based robot simulation walking method of claim 1, wherein converting the shielding level sequence into the lasting risk level sequence, binding the displacement paragraph tag sequence, the left-right stepping event sequence, the stride level sequence and the lasting risk level sequence according to the same discrete time index, constructing a simulation walking semantic frame and forming the first edition simulation walking semantic sequence, comprises: Step 41, obtaining a shielding level sequence, checking the one-to-one correspondence between the shielding level sequence and a discrete time index sequence, writing a space value occupation record in a discrete time index when any discrete time index in the discrete time index sequence lacks shielding degree identification, and writing the space value occupation identification in the discrete time index; Step 42, converting the shielding level sequence into a lasting risk level sequence index by index according to a preset mapping rule, wherein the preset mapping rule is a one-to-one discrete mapping of shielding degree identifiers and lasting risk levels; Step 43, reading the corresponding values of the displacement paragraph tag sequence, the left and right stepping event sequence, the stride level sequence and the lasting risk level sequence according to the discrete time index sequence, binding the corresponding values with the corresponding discrete time indexes to construct a simulation walking semantic frame, wherein the field set of the simulation walking semantic frame is the discrete time index, the displacement paragraph tag, the left and right stepping event, the stride level and the lasting risk level, and arranging all simulation walking semantic frames according to the index increasing sequence of the discrete time index sequence to form the first edition simulation walking semantic sequences, so that each discrete time index in the discrete time index sequence corresponds to a unique simulation walking semantic frame in the the first edition simulation walking semantic sequence.
- 6. The virtual-real coupling-based robot simulation walking method of claim 1, wherein the steps of performing consistency check on the first edition simulation walking semantic sequences according to a hard constraint rule set to generate an offending mark sequence and a lasting risk window set include: step 51, obtaining a hard constraint rule set, limiting the hard constraint rule set to a rule set for executing consistency check on a simulated walking semantic frame in a the first edition simulated walking semantic sequence, limiting rule reference fields of the hard constraint rule set to a displacement paragraph label, a left-right walking event, a stride level and a lasting risk level, and limiting gait consistency rules to only reference a previous discrete time index to correspond to the left-right walking event; Step 52, traversing the first edition the simulated walking semantic sequence according to the index increasing sequence of the discrete time index sequence, executing consistency check on the simulated walking semantic frame corresponding to each discrete time index according to the hard constraint rule set, determining the rule corresponding to the discrete time index as rule violating when any rule item is violated, determining the rule corresponding to the discrete time index as non-rule when all rule items are not violated, and forming a rule sequence corresponding to the discrete time index sequence one by one, wherein the rule sequence comprises rule violations and non-rule violations; Step 53, traversing the rule breaking marking sequence, identifying the discrete time indexes of which rule breaking marks are rule breaking, merging continuous discrete time indexes into lasting risk windows, determining that the initial discrete time index of each lasting risk window is the minimum discrete time index in the lasting risk window and the end discrete time index is the maximum discrete time index in the lasting risk window, and arranging all lasting risk windows according to the ascending order of the initial discrete time indexes to obtain a lasting risk window set.
- 7. The virtual-real coupling-based robot simulation walking method of claim 6, wherein the generating of the lasting risk window set in step 5 further comprises: Step 61, generating an initial lasting risk window set according to the violation marking sequence, wherein the initial lasting risk window set is obtained by combining continuous violation discrete time indexes into a lasting risk window; Step 62, traversing an initial lasting risk window set, determining the number of interval discrete time indexes between any two adjacent lasting risk windows, and judging that the number of interval discrete time indexes is one and the corresponding rule violation is not illegal; step 63, for the adjacent two lasting risk windows meeting the judgment in step 62, merging the interval discrete time index into the previous lasting risk window, updating the ending discrete time index of the previous lasting risk window into the ending discrete time index of the next lasting risk window, deleting the next lasting risk window, and obtaining a lasting risk window set.
- 8. The virtual-real coupling-based robot simulation walking method as set forth in claim 1, wherein performing consistency check on the repaired simulation walking semantic sequence, obtaining a final simulation walking semantic sequence in a preset round, outputting the final simulation walking semantic sequence, and consistency check passing mark and window repair record, comprises: Step 81, reading the repaired simulated walking semantic sequence, multiplexing a hard constraint rule set to execute consistency check on the repaired simulated walking semantic sequence frame by frame, generating an offending mark sequence corresponding to the discrete time index sequence one by one, and determining a consistency check result according to the offending mark sequence; Step 82, setting a preset round and recording the round count, determining the repaired simulated walking semantic sequence as a final simulated walking semantic sequence when the consistency check result shows that the violation mark does not exist, re-executing deterministic semantic editing repair and re-executing consistency check when the consistency check result shows that the violation mark exists and the round count does not reach the preset round, and determining the repaired simulated walking semantic sequence when the round count reaches the preset round as the final simulated walking semantic sequence when the round count reaches the preset round; And step 83, outputting a final simulation walking semantic sequence, generating a consistency check passing mark according to the final consistency check result, and summarizing the lasting risk window set generated by the consistency check of each round in the preset round to form a window repair record.
- 9. A virtual-real coupling-based robot simulation walking system, characterized in that the virtual-real coupling-based robot simulation walking method as claimed in any one of claims 1-8 is adopted, comprising: the discrete index modeling module is used for establishing a discrete time index sequence and acquiring a basic data set corresponding to the discrete time index sequence one by one, wherein the basic data set comprises a position data sequence, a gait template and a shielding grade sequence; The displacement paragraph judging module is used for generating a displacement paragraph label sequence according to the adjacent index difference value of the position data sequence; The gait semantic generation module is used for generating a left-right stepping event sequence based on the gait template and generating a stride grade sequence according to the displacement paragraph tag sequence; the walking semantic construction module is used for converting the shielding grade sequence into a lasting risk grade sequence, binding the displacement paragraph label sequence, the left-right stepping event sequence, the stride grade sequence and the lasting risk grade sequence according to the same discrete time index, constructing a simulation walking semantic frame and forming the first edition simulation walking semantic sequences; The consistency check analysis module is used for executing consistency check on the first edition simulation walking semantic sequences according to the hard constraint rule set to generate an offending mark sequence and a lasting risk window set; The deterministic semantic restoration module is used for executing deterministic semantic editing restoration on the simulated walking semantic frames in the lasting risk window according to the lasting risk window set and the violation mark sequence to obtain a restored simulated walking semantic sequence; The round convergence output module is used for executing consistency check on the repaired simulation walking semantic sequence, obtaining a final simulation walking semantic sequence in a preset round, and outputting a final simulation walking semantic sequence, a consistency check passing mark and a window repair record.
Description
Virtual-real coupling-based robot simulation walking method and system Technical Field The invention belongs to the technical field of simulation data processing, and particularly relates to a virtual-real coupling-based robot simulation walking method and system. Background Along with the wide application of the virtual simulation technology in the fields of robot design, display and interaction, how to accurately, stably and low-cost present the visual effect of robot walking under the real environment condition becomes an important problem in the related technology. The existing robot simulation walking scheme is usually realized based on continuous time modeling or physical driving parameters, and walking animation is generated by directly simulating pose, joint state or motion trail. However, in the virtual-real coupling scene, the real displacement data, the virtual gait appearance and the appearance shielding structure of the robot are often different in sources, the time granularity, the data form and the semantic meaning of the robot are different, the problems of inconclusive gait, abrupt change of the shielding relation and the like still displayed in the stopped state in the simulation process are easily generated, and the overall consistency of the walking effect is affected. In addition, in the prior art, the processing of the simulated walking abnormality is dependent on manual parameter adjustment or experience rules, a unified data structure and a rechecking processing flow are lacked, and the problem of inconsistent vision in the walking process is difficult to carry out system identification and automatic correction. Under the condition of data loss, shielding change or short-time state fluctuation, the simulation result is easy to cause the lasting phenomenon, and positioning and repairing are difficult to carry out in subsequent processing. Disclosure of Invention The invention provides a virtual-real coupling-based robot simulation walking method and system, which solve the technical problems that gait semantics are incoherent, vision shielding relation is abrupt, and simulation results are difficult to check and repair in the simulation walking process due to inconsistent time granularity of multi-source walking data and lack of unified rules for semantic binding in the related technology. The invention provides a virtual-real coupling-based robot simulation walking method, which comprises the following steps: step 1, establishing a discrete time index sequence, and acquiring a basic data set corresponding to the discrete time index sequence one by one, wherein the basic data set comprises a position data sequence, a gait template and a shielding level sequence; Step 2, generating a displacement paragraph label sequence according to adjacent index difference values of the position data sequence; step 3, generating a left-right stepping event sequence based on the gait template, and generating a stride grade sequence according to the displacement paragraph tag sequence; Step 4, converting the shielding grade sequence into a lasting risk grade sequence, binding a displacement paragraph label sequence, a left-right stepping event sequence, a stride grade sequence and a lasting risk grade sequence according to the same discrete time index, constructing a simulation walking semantic frame and forming the first edition simulation walking semantic sequences; step 5, performing consistency verification on the first edition simulation walking semantic sequences according to the hard constraint rule set to generate an offending mark sequence and a lasting risk window set; step 6, executing deterministic semantic editing and repairing on the simulated walking semantic frames in the lasting risk window according to the lasting risk window set and the violation mark sequence to obtain a repaired simulated walking semantic sequence; And 7, performing consistency check on the repaired simulated walking semantic sequence, obtaining a final simulated walking semantic sequence in a preset round, and outputting the final simulated walking semantic sequence, wherein the consistency check passes through the mark and the window repair record. The invention provides a virtual-real coupling-based robot simulation running system, which comprises: the discrete index modeling module is used for establishing a discrete time index sequence and acquiring a basic data set corresponding to the discrete time index sequence one by one, wherein the basic data set comprises a position data sequence, a gait template and a shielding grade sequence; The displacement paragraph judging module is used for generating a displacement paragraph label sequence according to the adjacent index difference value of the position data sequence; The gait semantic generation module is used for generating a left-right stepping event sequence based on the gait template and generating a stride grade sequence according to the displacement par