Data processing method and device and electronic equipment
By binding the device to the same rigid body, obtaining trajectory data and generating angular trajectories, the time deviation problem between devices is solved, synchronization accuracy is improved, and the time system alignment between the positioning and mapping equipment and the motion capture equipment is achieved.
Patent Information
- Application Number
- CN202310822491.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-07-05
- Publication Date
- 2025-01-07
AI Technical Summary
There is a time deviation between the time systems between different devices, resulting in a reduced synchronization accuracy between the positioning and mapping equipment and the motion capture equipment, making it difficult to accurately determine the time deviation amount.
By binding the device to the same rigid body, the trajectory data of each device is obtained and the angular trajectory is generated. The time deviation between devices is determined based on the angle trajectory associated with the timestamp, the error is reduced and the accuracy is improved.
It effectively reduces the time deviation error of the time system between devices, and improves the synchronization accuracy between positioning and mapping equipment and motion capture equipment.
Smart Images

Figure CN119268680A_ABST
Abstract
Description
Technical Field
[0001] The present disclosure relates to the field of data processing technology, and in particular to a data processing method, device and electronic device. Background Art
[0002] Different devices have independent time systems. Therefore, when different devices are used at the same time, it is necessary to determine the time deviation between the time systems of different devices.
[0003] For example, when testing with a Simultaneous Localization and Mapping (SLAM) device and a motion capture device, it is necessary to determine the time deviation between the SLAM device and the motion capture device. Summary of the invention
[0004] This disclosure section is provided to introduce concepts in a brief form, which will be described in detail in the detailed description section below. This disclosure section is not intended to identify key features or essential features of the claimed technical solution, nor is it intended to limit the scope of the claimed technical solution.
[0005] The embodiments of the present disclosure provide a data processing method, apparatus, and electronic device to reduce the error of the time deviation amount of the time system between two devices determined to improve the accuracy.
[0006] In a first aspect, an embodiment of the present disclosure provides a data processing method, including: for a first device and a second device bound as the same rigid body, obtaining first trajectory data of the first device, and obtaining second trajectory data of the second device, wherein the trajectory points in the first trajectory data are associated with a first timestamp, and the trajectory points in the second trajectory data are associated with a second timestamp; generating a first angle trajectory based on the angle of the trajectory points in the first trajectory data relative to a first target data point, and generating a second angle trajectory based on the angle of the trajectory points in the second trajectory data relative to a second target data point; determining a time deviation amount between the time systems of the first device and the second device based on the first angle trajectory associated with the first timestamp and the second angle trajectory associated with the second timestamp.
[0007] In a second aspect, an embodiment of the present disclosure provides a data processing device, including: an acquisition unit, for acquiring, for a first device and a second device bound as the same rigid body, first trajectory data of the first device, and second trajectory data of the second device, wherein trajectory points in the first trajectory data are associated with a first timestamp, and trajectory points in the second trajectory data are associated with a second timestamp; a generation unit, for generating a first angle trajectory based on an angle of the trajectory points in the first trajectory data relative to a first target data point, and generating a second angle trajectory based on an angle of the trajectory points in the second trajectory data relative to a second target data point; a determination unit, for determining a time deviation amount between time systems of the first device and the second device based on a first angle trajectory associated with the first timestamp and a second angle trajectory associated with the second timestamp.
[0008] In a third aspect, an embodiment of the present disclosure provides an electronic device, comprising: one or more processors; a storage device for storing one or more programs, when the one or more programs are executed by the one or more processors, the one or more processors implement the data processing method as described in the first aspect.
[0009] In a fourth aspect, an embodiment of the present disclosure provides a computer-readable medium having a computer program stored thereon, which, when executed by a processor, implements the steps of the data processing method as described in the first aspect.
[0010] The data processing method, device and electronic device provided by the embodiment of the present disclosure obtain the first trajectory data of the first device and the second trajectory data of the second device for the first device and the second device bound as the same rigid body; then, based on the angle of the trajectory point in the first trajectory data relative to the first target data point, a first angle trajectory is generated, and based on the angle of the trajectory point in the second trajectory data relative to the second target data point, a second angle trajectory is generated; finally, based on the first angle trajectory associated with the first timestamp and the second angle trajectory associated with the second timestamp, the time deviation between the time systems of the first device and the second device is determined. Since the relative angle change of any two points in the same rigid body is completely equal between any two states. Therefore, the data points of the angle change in the first angle trajectory of the first timestamp and the second angle trajectory associated with the second timestamp can be determined, and the time deviation between the time systems of the first device and the second device can be determined by the timestamps corresponding to the two data points. In this way, the error of the time deviation between the time systems of the two devices can be reduced and the accuracy can be improved. BRIEF DESCRIPTION OF THE DRAWINGS
[0011] The above and other features, advantages and aspects of the embodiments of the present disclosure will become more apparent with reference to the following detailed description in conjunction with the accompanying drawings. Throughout the accompanying drawings, the same or similar reference numerals represent the same or similar elements. It should be understood that the drawings are schematic and the originals and elements are not necessarily drawn to scale.
[0012] Figure 1 is a flow chart of an embodiment of a data processing method according to the present disclosure;
[0013] Figure 2 is a schematic diagram of binding a first device and a second device into the same rigid body in one embodiment of the data processing method of the present disclosure;
[0014] Figure 3 is a schematic diagram including first angle trajectory data and second angle trajectory in one embodiment of a data processing method according to the present disclosure;
[0015] Figure 4 is a schematic diagram including angle trajectory data in one embodiment of a data processing method according to the present disclosure;
[0016] Figure 5 is a flow chart of another embodiment of a data processing method according to the present disclosure;
[0017] Figure 6 is a schematic diagram of aligning a first angle track and a second angle track according to an embodiment of a data processing method of the present disclosure;
[0018] Figure 7 is a schematic diagram of the alignment of the first angle track and the second angle track according to another embodiment of the data processing method of the present disclosure;
[0019] Figure 8 is a schematic structural diagram of an embodiment of a data processing device according to the present disclosure;
[0020] Fig. 9 is an exemplary system architecture in which the data processing method of an embodiment of the present disclosure can be applied;
[0021] Fig.10 It is a schematic diagram of the basic structure of an electronic device provided according to an embodiment of the present disclosure. DETAILED DESCRIPTION
[0022] Embodiments of the present disclosure will be described in more detail below with reference to the accompanying drawings. Although certain embodiments of the present disclosure are shown in the accompanying drawings, it should be understood that the present disclosure can be implemented in various forms and should not be construed as being limited to the embodiments described herein, which are instead provided for a more thorough and complete understanding of the present disclosure. It should be understood that the drawings and embodiments of the present disclosure are only for exemplary purposes and are not intended to limit the scope of protection of the present disclosure.
[0023] It should be understood that the various steps described in the method embodiments of the present disclosure may be performed in different orders and / or in parallel. In addition, the method embodiments may include additional steps and / or omit the steps shown. The scope of the present disclosure is not limited in this respect.
[0024] The term "including" and its variations used herein are open inclusions, i.e., "including but not limited to". The term "based on" means "based at least in part on". The term "one embodiment" means "at least one embodiment"; the term "another embodiment" means "at least one additional embodiment"; the term "some embodiments" means "at least some embodiments". The relevant definitions of other terms will be given in the following description.
[0025] It should be noted that the concepts such as "first" and "second" mentioned in the present disclosure are only used to distinguish different devices, modules or units, and are not used to limit the order or interdependence of the functions performed by these devices, modules or units.
[0026] It should be noted that the modifications of "one" and "plurality" mentioned in the present disclosure are illustrative rather than restrictive, and those skilled in the art should understand that unless otherwise clearly indicated in the context, it should be understood as "one or more".
[0027] The names of the messages or information exchanged between multiple devices in the embodiments of the present disclosure are only used for illustrative purposes and are not used to limit the scope of these messages or information.
[0028] Please refer to Figure 1 , which shows the process of an embodiment of the data processing method according to the present disclosure. The data processing method can be applied to electronic devices. Figure 1 The data processing method shown comprises the following steps:
[0029] Step 101 : for a first device and a second device bound as a same rigid body, first trajectory data of the first device is obtained, and second trajectory data of the second device is obtained.
[0030] The trajectory points in the first trajectory data are associated with the first timestamp, and the trajectory points in the second trajectory data are associated with the second timestamp.
[0031] Here, since the first device and the second device have different time systems, the first timestamp of the trajectory point in the first trajectory data generated by the first device is different from the second timestamp of the trajectory point in the second trajectory data generated by the second device.
[0032] It should be explained that a rigid body refers to an object whose shape and size remain unchanged and the relative positions of its internal points remain unchanged during motion and after being acted upon by a force. Therefore, in this step, it is equivalent to binding the first device with the second device, and then obtaining the trajectory data output by the first device and the second device respectively.
[0033] Optionally, the first device may include a simultaneous positioning and mapping device, and the second device may include a motion capture device. Here, the simultaneous positioning and mapping device and the motion capture device are bound to the same rigid body, and a motion test is performed on the bound devices to obtain the first trajectory data collected by the simultaneous positioning and mapping device and the second trajectory data collected by the motion capture device.
[0034] For example, see Figure 2 , the first device is a simultaneous positioning and mapping device 201, wherein, in the figure, the simultaneous positioning and mapping device 201 is a VR (Virtual Reality) device, in which a simultaneous positioning and mapping system is configured. The second device is a motion capture device 202. The motion capture device 202 includes a plurality of light balls, where the motion capture device 202 can be fixed above the simultaneous positioning and mapping device 201, and then the simultaneous positioning and mapping device 201 and the motion capture device 202 are bound to the same rigid body. Then, the user can wear the simultaneous positioning and mapping device 201 to move in a preset scene, and then obtain the first trajectory data output by the simultaneous positioning and mapping device 201 and the second trajectory data determined by the motion capture device 202.
[0035] Here, the preset scene can be a room, an open space, etc. It should be explained that the motion capture device 202 needs to be combined with a camera to collect data, that is, a camera needs to be configured in the preset scene, and then during the user's movement, the second trajectory data is calculated and output by collecting the change process of the light ball.
[0036] The first device and the second device are both devices that can output motion trajectories with timestamps. For example, the first device and the second device can also be devices that can output 6DOF (Degree Of Freedom) trajectories with timestamps, and the first device and the second device can also be devices that can output 3DOF trajectories with timestamps, and this application does not limit this.
[0037] In one embodiment, the user can wear Figure 2 The device shown performs a circular motion. Typically, after wearing the device, the user will first remain still for a period of time and then perform a circular motion in the room. The entire process can be controlled within 30 seconds to 60 seconds.
[0038] Here, the circular movement can be walking around the room once, and of course, the circular movement can also be walking around the room half a circle.
[0039] In order to obtain a more accurate time deviation later, here, the angle that the user walks around in a circle can be greater than 180 degrees and less than or equal to 360 degrees. Among them, 180 degrees when the user walks around in a circle can be understood as the maximum rotation angle.
[0040] In one embodiment, the format of each line output in the above trajectory data may be:
[0041] time_stamp xyz qx qy qz qw;
[0042] Among them, time_stamp represents the timestamp (1 bit); x, y, z represent displacement data (3 bits); qx, qy, qz and qw represent rotation data (quaternion representation, qw represents the real part, qx, qy, qz represent the imaginary part, 4 bits).
[0043] Step 102: Generate a first angle trajectory based on an angle of a trajectory point in the first trajectory data relative to a first target data point, and generate a second angle trajectory based on an angle of a trajectory point in the second trajectory data relative to a second target data point.
[0044] After the first trajectory data and the second trajectory data are acquired, the first trajectory data and the second trajectory data are processed to acquire respective corresponding angle trajectories.
[0045] The above-mentioned trajectory points may be data points in the trajectory data in a moving state, that is, the trajectory points in the first trajectory data are data points in the first trajectory data in a moving state; and the trajectory points in the second trajectory data are data points in the second trajectory data in a moving state.
[0046] It should be noted that between any two states, the relative angle changes of any two points in the same rigid body are completely equal. Therefore, the deviation relationship between the first trajectory data and the second trajectory data can be determined by the relationship between the first angle trajectory and the second angle trajectory.
[0047] In one embodiment, the first target data point is a data point of the first device in an initial static state; the second target data point is a data point of the second device in an initial static state.
[0048] That is, the first target data point and the second target data point may be data points collected by the first device and the second device in a stationary state. Exemplarily, the trajectory data may include 3 seconds of data at rest, and any data point collected in the 3 seconds of data at rest may be used as the target data point.
[0049] It should be noted that by determining the data point in a stationary state as the target data point and calculating the rotation angle of each subsequent data point based on this, the error between the rotation angles calculated by the two subsequent devices can be reduced, thereby improving the accuracy of the time deviation between the time systems of the two devices calculated subsequently.
[0050] In other embodiments, the first target data point may be the first changed data point in the first trajectory data, and similarly, the second target data point may also be the first changed data point in the second trajectory data. The selection of the target data point is not limited here.
[0051] The calculation of the angle trajectory is described below. The process of generating the first angle trajectory from the first trajectory data and the process of generating the second angle trajectory from the second trajectory data can refer to the following description.
[0052] The calculation of the angle trajectory can be understood as the calculation of the axis angle. It should be noted that the axis angle of the rotation represents the parameterization of the rotation with two values: an axis or line, and an angle describing the amount of rotation around this axis. In other words, the angle of the trajectory point in the trajectory data relative to the target data point can be understood as the angle value in the axis angle.
[0053] When the target data point is a data point in the initial static state, for each trajectory point in the trajectory data, the angle value of the axis angle between each trajectory point and the target data point is calculated, thereby obtaining an angle trajectory. Each row of data in the angle trajectory can be:
[0054] time_stamp angle;
[0055] Among them, time_stamp represents the timestamp, and angle represents the angle value in the axis angle.
[0056] The calculation formula of the angle value angle in the axis angle can refer to the following formula:
[0057]
[0058] Where n = Norm([Δq x ,Δq y ,Δq z ]); Δq w ,Δq x ,Δq y,Δq z Both represent the change in the parameter corresponding to the nth data point and the parameter corresponding to the target data point; Δq w ,Δq x ,Δq y ,Δq z It can be obtained by the following formula: Δq = q0 -1 *q n ; Among them, q0 represents the parameter corresponding to the target data point; q n It represents the parameter corresponding to the nth data point; abs represents the absolute value; Norm represents the modulus of the vector; arctan represents the inverse tangent.
[0059] Step 103 : determining a time deviation between the time systems of the first device and the second device based on a first angle track associated with the first timestamp and a second angle track associated with the second timestamp.
[0060] Here, since the relative angle changes of any two points in the same rigid body are completely equal between any two states, it is possible to determine the data points of the angle changes in the first angle track of the first timestamp and the second angle track associated with the second timestamp, and determine the time deviation between the time systems of the first device and the second device through the timestamps corresponding to the two data points.
[0061] See also Figure 3 , Figure 3 The horizontal axis is the timestamp and the vertical axis is the angle. Any data point with the same angle in the first angle track 301 and the second angle track 302 is determined, and then the difference in the timestamp between the two data points is calculated to obtain the time deviation between the time systems of the first device and the second device.
[0062] In the related art, the way to align the time systems of two devices is to use the same features between the two trajectory data output by each device. For example, the two trajectory data are projected to the direction of gravity, and it is found that the maximum value of the first trajectory data appears at time A, and the maximum value of the second trajectory data appears at time B, then AB (or BA) is the final determined time deviation. However, this method requires a high degree of hardware uniformity. If the geometric center positions of the two devices cannot coincide, or the geometric centers of the two devices rotate slightly at the highest point, it will cause a large error in the final result, which will lead to a large error in the time deviation of the time system between the two devices and poor accuracy.
[0063] The embodiment of the present application provides a data processing method, for a first device and a second device bound to the same rigid body, the first trajectory data of the first device is obtained, and the second trajectory data of the second device is obtained; then, based on the angle of the trajectory point in the first trajectory data relative to the first target data point, a first angle trajectory is generated, and, based on the angle of the trajectory point in the second trajectory data relative to the second target data point, a second angle trajectory is generated; finally, based on the first angle trajectory associated with the first timestamp and the second angle trajectory associated with the second timestamp, the time deviation between the time systems of the first device and the second device is determined. Since the relative angle change of any two points in the same rigid body is completely equal between any two states. Therefore, the data points of the angle change in the first angle trajectory of the first timestamp and the second angle trajectory associated with the second timestamp can be determined, and the time deviation between the time systems of the first device and the second device can be determined by the timestamps corresponding to the two data points. In this way, the error of the time deviation of the time system between the two devices can be reduced and the accuracy can be improved.
[0064] In other words, the angle calculation in the embodiment of the present application is more stable than the displacement calculation in the related art. Therefore, the time deviation determined based on the angle method has higher accuracy.
[0065] In one embodiment, the data processing method further includes: aligning the first trajectory data and the second trajectory data based on the time deviation.
[0066] Here, aligning the first trajectory data with the second trajectory data can be understood as aligning the time systems of the first device and the second device, that is, the trajectory data collected by the first device and the second device at the same time point can be determined.
[0067] In one embodiment, the data processing method further includes: determining the accuracy of the first device based on an alignment result of the first trajectory data and the second trajectory data.
[0068] That is, after the first trajectory data and the second trajectory data are aligned, the difference between the two trajectory data can be accurately compared, and then the accuracy of the first device can be determined.
[0069] Exemplarily, the first device may be a simultaneous positioning and mapping device, and the second device may be a motion capture device. Since the simultaneous positioning and mapping (SLAM) device is the core of the VR / AR scene, it is necessary to effectively evaluate the accuracy of SLAM. Since the motion capture device is usually more accurate, here, by aligning the second trajectory data output by the motion capture device with the first trajectory data output by the simultaneous positioning and mapping device, the accuracy of the first device can be determined based on the alignment result, thereby achieving effective evaluation of simultaneous positioning and mapping.
[0070] It can be seen that the data processing method provided in the embodiment of the present application can be applied to the evaluation of devices for different time systems.
[0071] In one embodiment, the above-mentioned step 103 determines the time deviation between the time systems of the first device and the second device based on the first angle trajectory associated with the first timestamp and the second angle trajectory associated with the second timestamp, including: determining the time deviation between the time systems of the first device and the second device based on the third target data point in the first angle trajectory associated with the first timestamp and the fourth target data point in the second angle trajectory associated with the second timestamp.
[0072] Here, the third target data point in the first angle track and the fourth target data point in the second angle track may have the same characteristics.
[0073] In one embodiment, the same feature may be the maximum angle value. For example, the third target data point may be the data point corresponding to the maximum angle value in the first angle track, and the fourth target data point may be the data point corresponding to the maximum angle value in the second angle track.
[0074] For example, see Figure 4 , Figure 4 The diagram shows a schematic diagram of an angle trajectory. When the first device and the second device perform the circular motion in the aforementioned embodiment, their angle trajectories are in the shape of a mountain peak, and the value of the highest point of the mountain peak (data point A) is close to π (3.1415926...). Therefore, here, the time deviation between the time systems of the first device and the second device can be determined by using the timestamp of the data point corresponding to the maximum value in the two angle trajectories, which can further reduce the error and improve the accuracy.
[0075] Of course, the target data point may also be selected as the data point corresponding to the second highest peak or the data point corresponding to the third highest peak in the angle trajectory, which is not limited here.
[0076] In another embodiment, the same feature may also have the same angle value. For example, the third target data point may be the data point that appears for the first time in the first angle trajectory and has an angle value of A. Correspondingly, the fourth target data point may be the data point that appears for the first time in the second angle trajectory and has an angle value of A.
[0077] See also Figure 5 The above step 103 determines the time deviation between the time systems of the first device and the second device based on the first angle trajectory associated with the first timestamp and the second angle trajectory associated with the second timestamp, and can also specifically include: steps 501-504.
[0078] Step 501 : determining a first time deviation between time systems of a first device and a second device based on a third target data point in a first angle trajectory associated with a first timestamp and a fourth target data point in a second angle trajectory associated with a second timestamp.
[0079] Among them, step 501 can refer to the description in the above-mentioned embodiment and will not be described in detail here.
[0080] Step 502: align the first angle track and the second angle track based on the first time offset.
[0081] Here, after the first time deviation is obtained, the initial alignment is performed.
[0082] For example, see Figure 6 , the third target data point may be the data point corresponding to the maximum angle in the first angle track, and the fourth target data point may be the data point corresponding to the maximum angle in the second angle track. Then, the first time deviation is determined based on the two target data points, and the first angle track and the second angle track are aligned. The alignment process can be understood as translating one of the angle tracks by the first time deviation. That is, the second angle track 602 can be translated to the left (i.e., in the direction close to the first angle track 601) by the first time deviation.
[0083] Step 503: within a preset search range of the aligned fourth target data point, the timestamp of the second angle trajectory is updated with a preset step size, and the error value between the data corresponding to the timestamp of the second angle trajectory after each update and the data corresponding to the same timestamp in the first angle trajectory is calculated based on a preset error function.
[0084] The data acquisition frequency in the second angle track is lower than the data acquisition frequency in the first angle track.
[0085] from Figure 6 It can be seen from the primary alignment shown that although the primary alignment has been achieved based on the maximum angle, the theoretical highest point of the peak of the second angle track 602 is not the highest acquisition point in the track because the data is collected as discrete data. Obviously, the theoretical highest point of the peak of the second angle track 602 is located somewhere in the middle of the highest acquisition point and the second highest acquisition point of the second angle track 602. Therefore, here, the second angle track can continue to be translated according to the above rules to determine the error value between the data corresponding to the timestamp of the updated second angle track and the data corresponding to the same timestamp in the first angle track.
[0086] Optionally, the preset step length and the preset search range may be determined in the following manner, including: determining the preset step length based on the acquisition frequency of data in the first angle trajectory; and determining the preset search range based on the acquisition frequency of data in the second angle trajectory.
[0087] That is, the preset step length during the search is determined by the data with a higher frequency, and the preset search range is determined by the data with a lower frequency.
[0088] Exemplarily, the first device collects trajectory data at a frequency of 1000 Hz, and the second device collects trajectory data at a frequency of 60 Hz.
[0089] At this time, the preset step length may be equal to 1s (second) / 1000=1ms (millisecond). The preset step length may be understood as the distance of each movement, and here, the distance of each movement is 1ms.
[0090] At this time, the preset range may be equal to 1 (second) / 60=17 ms (round up the floating point number). Here, the time of the initial alignment may be taken as 0 ms (millisecond), and the range of 17 ms (milliseconds) may be taken as the preset range.
[0091] That is, the preset range can be 0ms (milliseconds) at the time of the initial alignment, and the range of -17ms (milliseconds) to 17ms (milliseconds). Of course, the preset range can also be 0ms (milliseconds) at the time of the initial alignment, and the range of -17ms (milliseconds) to 0ms (milliseconds); the preset range can also be 0ms (milliseconds) at the time of the initial alignment, and the range of 0ms (milliseconds) to 17ms (milliseconds), which is not limited in this application.
[0092] In other words, the second angle track can move 1 ms each time within the range of -17 ms to 17 ms, and calculate the error value between the data corresponding to the timestamp of the second angle track after each movement and the data corresponding to the same timestamp in the first angle track.
[0093] The expression of the preset error function can be:
[0094]
[0095] Among them, error represents error; opti_angle i Indicates the angle value of the i-th acquisition point in the second angle track; slam_angle i represents the angle value of the i-th acquisition point in the first angle track; the total number of acquisition points is n. Here, it is necessary to determine the angles of the acquisition points with the same number as the first angle track and the second angle track.
[0096] In one embodiment, the above step 503 can be implemented specifically through the following steps:
[0097] S1: Add a preset step length to each timestamp in the second angle trajectory.
[0098] It should be noted that when translating to the right, each timestamp in the second angle track is added with a preset step length, and when translating to the left, each timestamp in the second angle track is added with the opposite number of the preset step length. Exemplarily, the preset step length is 1ms, then when translating to the right, each timestamp in the second angle track is added with 1ms; and when translating to the left, each timestamp in the second angle track is added with -1ms.
[0099] S2: Based on the updated second angle track, determine data in the first angle track corresponding to the same timestamp as in the updated second angle track.
[0100] S3: Calculate the error value between the data corresponding to the timestamp of the updated second angle trajectory and the data corresponding to the same timestamp in the first angle trajectory based on a preset error function.
[0101] That is, data corresponding to the timestamp of the updated second angle trajectory is searched out from the first angle trajectory, and an error value is calculated based on a preset error function.
[0102] Optionally, the above steps determine the data in the first angle trajectory corresponding to the same timestamp as the updated second angle trajectory based on the updated second angle trajectory, and may specifically include: obtaining the timestamp of the updated second angle trajectory; and calculating the data in the first angle trajectory corresponding to the same timestamp as the updated second angle trajectory based on linear interpolation.
[0103] It can be understood that when there is data corresponding to the same timestamp as in the updated second angle trajectory in the first angle trajectory, the data is directly used for error calculation. When there is no data corresponding to the same timestamp as in the updated second angle trajectory in the first angle trajectory, the corresponding data is calculated by linear interpolation of two adjacent timestamps.
[0104] In other words, when there is no data corresponding to the same timestamp as in the updated second angle track in the first angle track, the two high-frequency data closest in time are found for each low-frequency data, and the data corresponding to the timestamp of the low-frequency data are linearly interpolated using the two high-frequency data.
[0105] The linear interpolation formula can refer to the following formula:
[0106] angle=angle_left*weight_left+angle_right*weight_right;
[0107] Among them, angle represents the interpolation angle to be calculated; angle_left represents the angle corresponding to the nearest data point to the left of the interpolation point to be calculated; angle_right represents the angle corresponding to the nearest data point to the right of the interpolation point to be calculated. weight_left represents the weight of angle_left; weight_right represents the weight of angle_right. weight_right=1-weight_left; range=timestamp_right-timestamp_left; where timestamp_right represents the timestamp corresponding to angle_right; timestamp_left represents the timestamp corresponding to angle_left; timestamp_middle represents the timestamp corresponding to the interpolation point to be found.
[0108] After executing the above steps S1 to S3 for the first time, continue to add the preset step size to each timestamp in the updated second angle trajectory within the preset search range of the aligned fourth target data point, and repeat steps S2 to S3 until the error value between the data corresponding to the timestamp of the second angle trajectory after each update and the data corresponding to the same timestamp in the first angle trajectory is calculated.
[0109] Step 504: Determine a second time offset between the time systems of the first device and the second device based on the minimum error value.
[0110] Finally, based on the minimum error value, a second time offset between the time systems of the first device and the second device can be determined, wherein the time offset between the time systems of the first device and the second device is the sum of the first time offset and the second time offset.
[0111] Optionally, after the above steps, the first angle track and the second angle track are aligned based on the determined time deviation, see Figure 7 , align the second angle track 702 with the direction of the first angle track 601, Figure 7 The alignment results shown are compared to Figure 6 Has been further improved.
[0112] Similarly, after the above steps, the first trajectory data and the second trajectory data are aligned based on the determined time deviation, and the accuracy of the first device can be determined based on the alignment result of the first trajectory data and the second trajectory data.
[0113] Further references Figure 8 As an implementation of the methods shown in the above figures, the present disclosure provides an embodiment of a data processing device, and the device embodiment is Figure 1 Corresponding to the data processing method embodiment shown, the device can be specifically applied to various electronic devices.
[0114] like Figure 8 As shown, the data processing device of this embodiment includes: an acquisition unit 801, which is used to acquire first trajectory data of the first device and second trajectory data of the second device for a first device and a second device bound as the same rigid body, wherein the trajectory points in the first trajectory data are associated with the first timestamp, and the trajectory points in the second trajectory data are associated with the second timestamp; a generation unit 802, which is used to generate a first angle trajectory based on the angle of the trajectory points in the first trajectory data relative to the first target data point, and to generate a second angle trajectory based on the angle of the trajectory points in the second trajectory data relative to the second target data point; a determination unit 803, which is used to determine the time deviation between the time systems of the first device and the second device based on the first angle trajectory associated with the first timestamp and the second angle trajectory associated with the second timestamp.
[0115] In some embodiments, the data processing device further comprises an alignment unit, which is configured to align the first trajectory data and the second trajectory data based on the time deviation.
[0116] In some embodiments, the data processing apparatus further comprises an accuracy determination unit. The accuracy determination unit is configured to determine the accuracy of the first device based on the alignment result of the first trajectory data and the second trajectory data.
[0117] In some embodiments, the first target data point is a data point of the first device in an initial static state; the second target data point is a data point of the second device in an initial static state.
[0118] In some embodiments, the determination unit 803 is further specifically used to determine the time deviation between the time systems of the first device and the second device based on a third target data point in a first angle trajectory associated with the first timestamp and a fourth target data point in a second angle trajectory associated with the second timestamp.
[0119] In some embodiments, the third target data point is a data point corresponding to the maximum angle in the first angle trajectory; the fourth target data point is a data point corresponding to the maximum angle in the second angle trajectory.
[0120] In some embodiments, the determination unit 803 is further specifically used to determine a first time deviation between the time systems of the first device and the second device based on a third target data point in the first angle trajectory associated with the first timestamp and a fourth target data point in the second angle trajectory associated with the second timestamp; align the first angle trajectory and the second angle trajectory based on the first time deviation; update the timestamp of the second angle trajectory with a preset step size within a preset search range of the aligned fourth target data point, and calculate the error value between the data corresponding to the timestamp of the second angle trajectory after each update and the data corresponding to the same timestamp in the first angle trajectory based on a preset error function; wherein the acquisition frequency of the data in the second angle trajectory is lower than the acquisition frequency of the data in the first angle trajectory; based on the minimum error value, determine the second time deviation between the time systems of the first device and the second device; wherein the time deviation between the time systems of the first device and the second device is the sum of the first time deviation and the second time deviation.
[0121] In some embodiments, the determination unit 803 is further specifically used to determine the preset step size based on the collection frequency of data in the first angle trajectory before updating the timestamp of the second angle trajectory with a preset step size within the preset search range of the aligned fourth target data point; and determine the preset search range based on the collection frequency of data in the second angle trajectory.
[0122] In some embodiments, the determination unit 803 is also specifically used for S1: adding the preset step size to each timestamp in the second angle trajectory; S2: determining, based on the updated second angle trajectory, the data in the first angle trajectory corresponding to the same timestamp in the updated second angle trajectory; S3: calculating, based on the preset error function, the error value between the data corresponding to the timestamp of the updated second angle trajectory and the data corresponding to the same timestamp in the first angle trajectory; within the preset search range of the fourth target data point after the alignment, continuing to add the preset step size to each timestamp in the updated second angle trajectory, and repeating steps S2 to S3 until the error value between the data corresponding to the timestamp of the second angle trajectory after each update and the data corresponding to the same timestamp in the first angle trajectory is calculated.
[0123] In some embodiments, the determination unit 803 is further specifically configured to obtain a timestamp of the updated second angle trajectory; and calculate data corresponding to the same timestamp in the first angle trajectory as in the updated second angle trajectory based on a linear interpolation method.
[0124] In some embodiments, the first device comprises a simultaneous localization and mapping device, and the second device comprises a motion capture device.
[0125] Please refer to Fig. 9 , Fig. 9 An exemplary system architecture is shown in which the data processing method according to an embodiment of the present disclosure can be applied.
[0126] like Fig. 9 As shown, the system architecture may include terminal devices 901, 902, 903, a network 904, and a server 905. The network 904 may be used as a medium to provide a communication link between the terminal devices 901, 902, 903 and the server 905. The network 904 may include various connection types, such as wired, wireless communication links, or optical fiber cables, etc.
[0127] The terminal devices 901, 902, and 903 can interact with the server 905 through the network 904 to receive or send messages, etc. Various client applications, such as web browser applications, search applications, and news information applications, can be installed on the terminal devices 901, 902, and 903. The client applications in the terminal devices 901, 902, and 903 can receive user instructions and perform corresponding functions according to the user instructions.
[0128] Terminal devices 901, 902, and 903 can be hardware or software. When terminal devices 901, 902, and 903 are hardware, they can be various electronic devices with display screens and supporting web browsing, including but not limited to smart phones, tablet computers, e-book readers, MP3 players (Moving Picture Experts Group Audio Layer III, Moving Picture Experts Compression Standard Audio Layer 3), MP4 (Moving Picture Experts Group Audio Layer IV, Moving Picture Experts Compression Standard Audio Layer 4) players, laptop computers, and desktop computers, etc. When terminal devices 901, 902, and 903 are software, they can be installed in the electronic devices listed above. It can be implemented as multiple software or software modules (for example, software or software modules used to provide distributed services), or it can be implemented as a single software or software module. No specific limitation is made here.
[0129] The server 905 may be a server that provides various services, such as receiving information acquisition requests sent by the terminal devices 901, 902, and 903, acquiring display information corresponding to the information acquisition requests in various ways according to the information acquisition requests, and sending relevant data of the display information to the terminal devices 901, 902, and 903.
[0130] It should be noted that the data processing method provided in the embodiment of the present disclosure can be executed by a terminal device, and accordingly, the data processing device can be set in the terminal devices 901, 902, and 903. In addition, the data processing method provided in the embodiment of the present disclosure can also be executed by a server 905, and accordingly, the data processing device can be set in the server 905.
[0131] It should be understood that Fig. 9 The number of terminal devices, networks and servers in the embodiment is only for illustration. Any number of terminal devices, networks and servers may be provided according to implementation requirements.
[0132] Reference below Fig.10 , which shows an electronic device (eg, Fig. 9 The terminal device in the embodiment of the present disclosure may include but is not limited to a mobile phone, a notebook computer, a digital broadcast receiver, a PDA (personal digital assistant), a PAD (tablet computer), a PMP (portable multimedia player), a vehicle-mounted terminal (such as a vehicle-mounted navigation terminal), and other mobile terminals, and fixed terminals such as a digital TV, a desktop computer, and the like. Fig.10 The electronic device shown is only an example and should not bring any limitation to the functions and scope of use of the embodiments of the present disclosure.
[0133] like Fig.10 As shown, the electronic device may include a processing device (e.g., a central processing unit, a graphics processing unit, etc.) 1001, which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM) 1002 or a program loaded from a storage device 1008 into a random access memory (RAM) 1003. In the RAM 1003, various programs and data required for the operation of the electronic device are also stored. The processing device 1001, the ROM 1002, and the RAM 1003 are connected to each other via a bus 1004. An input / output (I / O) interface 1005 is also connected to the bus 1004.
[0134] Typically, the following devices may be connected to the I / O interface 1005: input devices 1006 including, for example, a touch screen, a touch pad, a keyboard, a mouse, a camera, a microphone, an accelerometer, a gyroscope, etc.; output devices 1007 including, for example, a liquid crystal display (LCD), a speaker, a vibrator, etc.; storage devices 1008 including, for example, a magnetic tape, a hard disk, etc.; and communication devices 1009. The communication device 1009 may allow the electronic device to communicate with other devices wirelessly or by wire to exchange data. Although Fig.10 An electronic device having various devices is shown, but it should be understood that it is not required to implement or possess all the devices shown. More or fewer devices may be implemented or possessed instead.
[0135] In particular, according to an embodiment of the present disclosure, the process described above with reference to the flowchart can be implemented as a computer software program. For example, an embodiment of the present disclosure includes a computer program product, which includes a computer program carried on a non-transitory computer-readable medium, and the computer program contains program code for executing the method shown in the flowchart. In such an embodiment, the computer program can be downloaded and installed from a network through a communication device 1009, or installed from a storage device 1008, or installed from a ROM 1002. When the computer program is executed by the processing device 1001, the above-mentioned functions defined in the method of the embodiment of the present disclosure are executed.
[0136] It should be noted that the computer-readable medium disclosed above may be a computer-readable signal medium or a computer-readable storage medium or any combination of the above two. The computer-readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or device, or any combination of the above. More specific examples of computer-readable storage media may include, but are not limited to: an electrical connection with one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above. In the present disclosure, a computer-readable storage medium may be any tangible medium containing or storing a program that may be used by or in combination with an instruction execution system, device or device. In the present disclosure, a computer-readable signal medium may include a data signal propagated in a baseband or as part of a carrier wave, in which a computer-readable program code is carried. This propagated data signal may take a variety of forms, including but not limited to an electromagnetic signal, an optical signal, or any suitable combination of the above. The computer readable signal medium may also be any computer readable medium other than a computer readable storage medium, which may send, propagate or transmit a program for use by or in conjunction with an instruction execution system, apparatus or device. The program code contained on the computer readable medium may be transmitted using any suitable medium, including but not limited to: wires, optical cables, RF (radio frequency), etc., or any suitable combination of the above.
[0137] In some embodiments, the client and the server may communicate using any currently known or future developed network protocol such as HTTP (HyperText Transfer Protocol), and may be interconnected with any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include a local area network ("LAN"), a wide area network ("WAN"), an internet (e.g., the Internet), and a peer-to-peer network (e.g., an ad hoc peer-to-peer network), as well as any currently known or future developed network.
[0138] The computer-readable medium may be included in the electronic device, or may exist independently without being incorporated into the electronic device.
[0139] The computer-readable medium carries one or more programs. When the one or more programs are executed by the electronic device, the electronic device: for a first device and a second device bound as the same rigid body, obtains first trajectory data of the first device and obtains second trajectory data of the second device, wherein the trajectory points in the first trajectory data are associated with a first timestamp, and the trajectory points in the second trajectory data are associated with a second timestamp; generates a first angle trajectory based on the angle of the trajectory points in the first trajectory data relative to the first target data point, and generates a second angle trajectory based on the angle of the trajectory points in the second trajectory data relative to the second target data point; determines the time deviation between the time systems of the first device and the second device based on the first angle trajectory associated with the first timestamp and the second angle trajectory associated with the second timestamp.
[0140] Computer program code for performing the operations of the present disclosure may be written in one or more programming languages or a combination thereof, including, but not limited to, object-oriented programming languages, such as Java, Smalltalk, C++, and conventional procedural programming languages, such as "C" or similar programming languages. The program code may be executed entirely on the user's computer, partially on the user's computer, as a separate software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In cases involving a remote computer, the remote computer may be connected to the user's computer through any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computer (e.g., through the Internet using an Internet service provider).
[0141] The flow chart and block diagram in the accompanying drawings illustrate the possible architecture, function and operation of the system, method and computer program product according to various embodiments of the present disclosure. In this regard, each square box in the flow chart or block diagram can represent a module, a program segment or a part of a code, and the module, the program segment or a part of the code contains one or more executable instructions for realizing the specified logical function. It should also be noted that in some implementations as replacements, the functions marked in the square box can also occur in a sequence different from that marked in the accompanying drawings. For example, two square boxes represented in succession can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each square box in the block diagram and / or flow chart, and the combination of the square boxes in the block diagram and / or flow chart can be implemented with a dedicated hardware-based system that performs a specified function or operation, or can be implemented with a combination of dedicated hardware and computer instructions.
[0142] The units involved in the embodiments described in the present disclosure may be implemented by software or hardware. The name of the unit does not limit the unit itself in some cases. For example, the acquisition unit 801 may also be described as "a unit for acquiring first trajectory data of the first device and second device bound to the same rigid body, and acquiring second trajectory data of the second device".
[0143] The functions described above herein may be performed at least in part by one or more hardware logic components. For example, without limitation, exemplary types of hardware logic components that may be used include: field programmable gate arrays (FPGAs), application specific integrated circuits (ASICs), application specific standard products (ASSPs), systems on chips (SOCs), complex programmable logic devices (CPLDs), and the like.
[0144] In the context of the present disclosure, a machine-readable medium may be a tangible medium that may contain or store a program for use by or in conjunction with an instruction execution system, device, or equipment. A machine-readable medium may be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium may include, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, device, or equipment, or any suitable combination of the foregoing. A more specific example of a machine-readable storage medium may include an electrical connection based on one or more lines, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
[0145] The above description is only a preferred embodiment of the present disclosure and an explanation of the technical principles used. Those skilled in the art should understand that the scope of disclosure involved in the present disclosure is not limited to the technical solutions formed by a specific combination of the above technical features, but should also cover other technical solutions formed by any combination of the above technical features or their equivalent features without departing from the above disclosed concept. For example, the above features are replaced with the technical features with similar functions disclosed in the present disclosure (but not limited to) by each other to form a technical solution.
[0146] In addition, although each operation is described in a specific order, this should not be understood as requiring these operations to be performed in the specific order shown or in a sequential order. Under certain circumstances, multitasking and parallel processing may be advantageous. Similarly, although some specific implementation details are included in the above discussion, these should not be interpreted as limiting the scope of the present disclosure. Some features described in the context of a separate embodiment can also be implemented in a single embodiment in combination. On the contrary, the various features described in the context of a single embodiment can also be implemented in multiple embodiments individually or in any suitable sub-combination mode.
[0147] Although the subject matter has been described in language specific to structural features and / or methodological logical actions, it should be understood that the subject matter defined in the appended claims is not necessarily limited to the specific features or actions described above. On the contrary, the specific features and actions described above are merely example forms of implementing the claims.
Claims
1. A data processing method, characterized in that: include: For a first device and a second device bound as the same rigid body, first trajectory data of the first device is obtained, and second trajectory data of the second device is obtained; wherein the trajectory points in the first trajectory data are associated with a first timestamp, and the trajectory points in the second trajectory data are associated with a second timestamp; generating a first angle trajectory based on an angle of a trajectory point in the first trajectory data relative to a first target data point, and generating a second angle trajectory based on an angle of a trajectory point in the second trajectory data relative to a second target data point; An amount of time deviation between time systems of the first device and the second device is determined based on a first angle trajectory associated with the first timestamp and a second angle trajectory associated with the second timestamp.
2. The method according to claim 1, characterized in that The method further comprises: The first trajectory data and the second trajectory data are aligned based on the time offset.
3. The method according to claim 2, characterized in that The method further comprises: Based on the alignment result of the first trajectory data and the second trajectory data, the accuracy of the first device is determined.
4. The method according to claim 1, characterized in that: The first target data point is a data point of the first device in an initial static state; the second target data point is a data point of the second device in an initial static state.
5. The method according to claim 1, characterized in that The determining, based on a first angle track associated with the first timestamp and a second angle track associated with the second timestamp, a time deviation between time systems of the first device and the second device, comprises: An amount of time deviation between time systems of the first device and the second device is determined based on a third target data point in the first angular trajectory associated with the first timestamp and a fourth target data point in the second angular trajectory associated with the second timestamp.
6. The method according to claim 5, characterized in that The third target data point is a data point corresponding to the maximum angle in the first angle trajectory; the fourth target data point is a data point corresponding to the maximum angle in the second angle trajectory.
7. The method according to claim 1, characterized in that The determining, based on a first angle track associated with the first timestamp and a second angle track associated with the second timestamp, a time deviation between time systems of the first device and the second device, comprises: determining a first time deviation amount between time systems of the first device and the second device based on a third target data point in the first angular trajectory associated with the first timestamp and a fourth target data point in the second angular trajectory associated with the second timestamp; Based on the first time deviation, aligning the first angle track and the second angle track; Within a preset search range of the aligned fourth target data point, the timestamp of the second angle trajectory is updated with a preset step size, and an error value between data corresponding to the timestamp of the second angle trajectory after each update and data corresponding to the same timestamp in the first angle trajectory is calculated based on a preset error function; wherein the acquisition frequency of the data in the second angle trajectory is lower than the acquisition frequency of the data in the first angle trajectory; Based on the minimum error value, a second time deviation between the time systems of the first device and the second device is determined; wherein the time deviation between the time systems of the first device and the second device is the sum of the first time deviation and the second time deviation.
8. The method according to claim 7, characterized in that Before updating the timestamp of the second angle trajectory with a preset step length within the preset search range of the aligned fourth target data point, the method further includes: Determining the preset step size based on the acquisition frequency of the data in the first angle trajectory; The preset search range is determined based on a collection frequency of data in the second angle trajectory.
9. The method according to claim 7, characterized in that: The method of updating the timestamp of the second angle trajectory with a preset step length within a preset search range of the aligned fourth target data point, and calculating the error value between the data corresponding to the timestamp of the second angle trajectory after each update and the data corresponding to the same timestamp in the first angle trajectory based on a preset error function, includes: S1: adding the preset step length to each timestamp in the second angle trajectory; S2: Based on the updated second angle track, determine data in the first angle track corresponding to the same timestamp in the updated second angle track; S3: calculating, based on the preset error function, an error value between data corresponding to the timestamp of the updated second angle trajectory and data corresponding to the same timestamp in the first angle trajectory; Within the preset search range of the aligned fourth target data point, continue to add the preset step size to each timestamp in the updated second angle trajectory, and repeat steps S2 to S3 until the error value between the data corresponding to the timestamp of the second angle trajectory after each update and the data corresponding to the same timestamp in the first angle trajectory is calculated.
10. The method according to claim 9, characterized in that The determining, based on the updated second angle track, data corresponding to the same timestamp in the first angle track as in the updated second angle track includes: Obtaining a timestamp of the updated second angle trajectory; Based on the linear interpolation method, data corresponding to the same timestamp in the first angle trajectory as in the updated second angle trajectory is calculated.
11. The method according to any one of claims 1 to 10, characterized in that The first device includes a simultaneous positioning and mapping device, and the second device includes a motion capture device.
12. A data processing device, characterized in that: include: an acquiring unit, configured to acquire, for a first device and a second device bound as a same rigid body, first trajectory data of the first device and second trajectory data of the second device, wherein a trajectory point in the first trajectory data is associated with a first timestamp, and a trajectory point in the second trajectory data is associated with a second timestamp; a generating unit, configured to generate a first angle trajectory based on an angle of a trajectory point in the first trajectory data relative to a first target data point, and to generate a second angle trajectory based on an angle of a trajectory point in the second trajectory data relative to a second target data point; A determining unit is configured to determine a time deviation amount between time systems of the first device and the second device based on a first angle trajectory associated with the first timestamp and a second angle trajectory associated with the second timestamp.
13. An electronic device, characterized in that: include: one or more processors; a storage device for storing one or more programs, When the one or more programs are executed by the one or more processors, the one or more processors implement the method according to any one of claims 1 to 11.
14. A computer readable medium having a computer program stored thereon, characterized in that: When the program is executed by a processor, the method according to any one of claims 1 to 11 is implemented.