Posture data processing method and device, electronic equipment and storage medium
By combining the gravity vector of the object's own coordinate system and the gyroscope measurement value with ultrasonic position data processing, the problem of attitude data processing in a static state of the ultrasonic positioning system is solved, thus improving the accuracy and stability of indoor positioning.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-10-18
- Publication Date
- 2026-04-07
AI Technical Summary
In existing technologies, ultrasonic positioning systems cannot process attitude data when the object being measured is initially in a relatively static state, especially in indoor environments, where the Kalman filter fusion method requires a shaking process and is therefore unsuitable.
By using the gravity vector of the object's own coordinate system and the gyroscope measurement value, it is determined whether the object is in a preset state. Combined with at least two sets of ultrasonic position data, the position vectors of the object's world coordinate system and its own coordinate system are determined, and attitude processing is performed.
It enables attitude data processing when the measured object is in a relatively static state, improving the positioning accuracy and stability of the ultrasonic positioning system in indoor environments.
Smart Images

Figure CN115574812B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] Embodiments of the present application relate to the technical field of communication, and in particular, to a pose data processing method and device, electronic equipment and storage medium. BACKGROUND
[0002] With the rapid development of various industries in society, people's demand for positioning and navigation is increasing, especially in complex indoor environments, it is often necessary to determine the position information of various facilities and articles in the room. However, due to the limitations of positioning time, positioning accuracy and complex indoor environment conditions, a relatively perfect indoor positioning technology cannot be well utilized at present. Therefore, many indoor positioning technology solutions have been proposed by industry professionals, such as ultrasonic positioning technology.
[0003] An ultrasonic positioning system determines the specific position of a target by using the spatial propagation characteristics of ultrasonic waves. An ultrasonic wave generator is placed on the target to be positioned, and ultrasonic wave pulses are sent at regular time intervals around the target. The pulse signals emitted by the ultrasonic wave generator are received by three fixed positioning devices around the target. Since the ultrasonic wave propagates slowly in space, the specific position of the ultrasonic wave generator, that is, the position of the target to be positioned, can be deduced by comparing the time sequence of signals received by the three receiving devices. When the target moves, the movement trajectory of the target can be described by continuous positioning.
[0004] In the prior art, when a single ultrasonic device is deployed, the initial pose determination method is the Kalman filter fusion method. However, during the initialization process of the measured object, the measured object may be in a relatively static state, and the Kalman filter fusion method requires a process of shaking the measured object. Therefore, it is not possible to perform pose data processing on a measured object with an initial pose in a relatively static state. SUMMARY
[0005] Therefore, embodiments of the present application provide a pose data processing method and device, electronic equipment and storage medium to at least partially solve the above problems.
[0006] According to a first aspect of embodiments of the present application, a pose data processing method is provided, comprising: determining whether a measured object is in a preset state according to a gravity vector of a self coordinate system of the measured object and a gyroscope measurement value; when the measured object is in the preset state, determining a first position vector and a second position vector of the measured object according to at least two groups of ultrasonic position data, wherein the first position vector is a world coordinate system position vector of the measured object, and the second position vector is a self coordinate system position vector of the measured object; and performing pose processing on the first position vector, the second position vector, the gravity vector of the self coordinate system of the measured object, and the gravity vector of the world coordinate system of the measured object to determine pose data of the measured object.
[0007] In another implementation manner of the present application, the determining whether the measured object is in the preset state according to the gravity vector of the measured object in its own coordinate system and the gyro measurement value comprises: obtaining an accelerometer measurement value of the measured object and calculating a module length of the accelerometer measurement value to obtain a module of the gravity vector of the measured object in its own coordinate system; obtaining a gyro measurement value of the measured object and calculating a module length of the gyro measurement value to obtain a module of the gyro measurement value of the measured object; and determining whether the measured object is in the preset state according to the module of the gyro measurement value of the measured object and the module of the gravity vector of the measured object in its own coordinate system.
[0008] In another implementation manner of the present application, the determining whether the measured object is in the preset state according to the module of the gyro measurement value of the measured object and the module of the gravity vector of the measured object in its own coordinate system comprises: when the module of the gyro measurement value of the measured object is in a zero value range and when the module of the gravity vector of the measured object in its own coordinate system is in a gravity acceleration threshold value range, determining that the measured object is in the preset state, otherwise, determining that the measured object is not in the preset state.
[0009] In another implementation manner of the present application, the obtaining the gyro measurement value of the measured object and calculating a module length of the gyro measurement value to obtain a module of the gyro measurement value of the measured object comprises: obtaining angular velocity measurement values of three axes of a gyro of the measured object; and calculating the angular velocity measurement values of the three axes of the gyro by using a square root function to obtain the module of the gyro measurement value of the measured object.
[0010] In another implementation manner of the present application, the obtaining the accelerometer measurement value of the measured object and calculating a module length of the accelerometer measurement value to obtain a module of the gravity vector of the measured object in its own coordinate system comprises: obtaining acceleration measurement values of three axes of an accelerometer of the measured object; and calculating the acceleration measurement values of the three axes of the accelerometer by using a square root function to obtain the module of the gravity vector of the measured object in its own coordinate system.
[0011] In another implementation manner of the present application, the determining the first position vector and the second position vector of the measured object according to at least two groups of ultrasonic position data when the measured object is in the preset state comprises: calculating a first position vector of the measured object according to positioning coordinates of two ultrasonic sensors on the measured object in a world coordinate system; and calculating a second position vector of the measured object according to position coordinates of the two ultrasonic sensors on the measured object in its own coordinate system.
[0012] In another implementation manner of the present application, the attitude processing on the first position vector, the second position vector, the gravity vector of the self coordinate system of the measured object and the gravity vector of the world coordinate system of the measured object is performed to determine the attitude data of the measured object, including: calculating the attitude transfer matrix from the self coordinate system of the measured object to the world coordinate system according to the first position vector of the measured object, the second position vector of the measured object, the gravity vector of the self coordinate system of the measured object and the gravity vector of the world coordinate system of the measured object; and performing transpose operation on the attitude transfer matrix to obtain the attitude data of the measured object.
[0013] According to a second aspect of the embodiments of the present application, an attitude data processing apparatus is provided, including: a state determining module, configured to determine whether a measured object is in a preset state according to a gravity vector of a self coordinate system of the measured object and a gyroscopic measurement value; a position calculating module, configured to determine a first position vector and a second position vector of the measured object according to at least two groups of ultrasonic position data when the measured object is in the preset state, wherein the first position vector is a world coordinate system position vector of the measured object, and the second position vector is a self coordinate system position vector of the measured object; and an attitude processing module, configured to perform attitude processing on the first position vector, the second position vector, the gravity vector of the self coordinate system of the measured object and the gravity vector of the world coordinate system of the measured object to determine attitude data of the measured object.
[0014] According to a third aspect of the embodiments of the present application, an electronic device is provided, including: a processor, a memory, a communication interface and a communication bus, the processor, the memory and the communication interface complete mutual communication through the communication bus; the memory is used to store at least one executable instruction, and the executable instruction makes the processor execute the corresponding operation of the method according to the first aspect.
[0015] According to a fourth aspect of the embodiments of the present application, a computer storage medium is provided, which stores a computer program, and the program is executed by a processor to implement the method according to the first aspect.
[0016] In the scheme of the embodiments of the present application, during the attitude initialization process of the measured object, the measured object may be in a relatively static state, which leads to the failure of attitude data processing on the measured object. The world coordinate system position vector of the measured object and the self coordinate system position vector of the measured object are determined and obtained according to at least two groups of ultrasonic position data, and the attitude data of the measured object can be processed by combining the gravity vector of the self coordinate system of the measured object and the gravity vector of the world coordinate system of the measured object, so as to realize the attitude data processing when the measured object is in the preset state. BRIEF DESCRIPTION OF DRAWINGS
[0017] In order to more clearly illustrate the technical solutions in the embodiments of the present application or the prior art, the following will briefly introduce the drawings needed in the embodiments or prior art description. Obviously, the drawings in the following description are only some embodiments of the present application, and other drawings can also be obtained by those skilled in the art based on these drawings.
[0018] Figure 1 A step flow chart of a posture data processing method according to an embodiment of the present application.
[0019] Figure 2 A schematic diagram of a gyroscope according to an embodiment of the present application.
[0020] Figure 3 A schematic block diagram of a posture data processing apparatus according to an embodiment of the present application.
[0021] Figure 4 A schematic diagram of an electronic device according to an embodiment of the present application. DETAILED DESCRIPTION
[0022] In order to make the technical solutions in the embodiments of the present application better understood, the following will clearly and specifically describe the technical solutions in the embodiments of the present application with reference to the drawings in the embodiments of the present application. Obviously, the described embodiments are only some of the embodiments of the present application, but not all of the embodiments. Based on the embodiments in the embodiments of the present application, all other embodiments obtained by those skilled in the art should belong to the scope of protection of the embodiments of the present application.
[0023] It should be understood that the terms "first", "second", and "third" and the like in the claims, specification, and drawings of the present disclosure are used to distinguish different objects, and are not used to describe a particular order. The terms "include" and "contain" used in the specification and claims of the present disclosure indicate the presence of described features, whole, steps, operations, elements and / or components, but do not exclude the presence or addition of one or more other features, whole, steps, operations, elements, components and / or sets thereof.
[0024] It should also be understood that the terms used in the present disclosure specification are only for the purpose of describing specific embodiments, and are not intended to limit the present disclosure. As used in the present disclosure specification and claims, unless the context clearly indicates otherwise, the singular forms "a", "an" and "the" are intended to include the plural forms. It should be further understood that the term "and / or" used in the present disclosure specification and claims means any combination of one or more of the associated listed items and all possible combinations, and includes these combinations.
[0025] The existing attitude data processing method is to determine the initial pose by three known methods, i.e., a manual calibration method, a nine-axis SINS fusion method, and a Kalman filter fusion method when a single ultrasonic receiving sensor is deployed. The nine-axis SINS fusion method uses an acceleration sensor to realize observation of the pitch angle and roll angle, and uses a geomagnetic sensor to realize observation of the heading angle. The main problem is that there are many disturbances in the indoor environment, such as metal pipes, metal objects, and wireless radiation of mobile phones. The Kalman filter fusion method requires a process of shaking the receiving sensor, and initializes the attitude according to the motion vector. Therefore, it is impossible to process the attitude data of the measured object in a relatively static state.
[0026] Figure 1 A step flowchart of an attitude data processing method of one embodiment of the present application is shown. The attitude data processing method of the embodiment includes:
[0027] S210: determining whether the measured object is in a preset state according to a gravity vector of a self coordinate system of the measured object and a gyroscope measurement value.
[0028] It should be noted that the measured object here can be a VR controller. The self coordinate system here refers to a coordinate system established based on the measured object itself, which will change due to movement of the measured object itself. The world coordinate system here refers to an absolute coordinate system of a system, and the coordinates of all points on the screen are determined based on the origin of the coordinate system before the user coordinate system is established, and will not change due to movement of the measured object itself. The gravity vector of the self coordinate system of the measured object here refers to the measurement result of the accelerometer in the self coordinate system of the measured object. The preset state here refers to a state in which the measured object is relatively static in space.
[0029] The gyroscope measurement value here refers to the data value measured by the gyroscope on the moving measured object. The moving measured object here can be a mobile controller, such as a handle type controller or a ring type controller of a virtual reality device. The gyroscope here refers to an angular motion detection device that uses the momentum moment of a high-speed rotating body to sense the angular motion of the sensing shell relative to the inertial space around one or two axes perpendicular to the rotation axis. Angular motion detection devices made by other principles that have the same function are also called gyroscopes. The gyroscope measurement value here refers to the measured angular velocity value. The modulus of the vector is a mathematical term, and the length of the vector is called the modulus of the vector. Since the gyroscope measurement value can accurately reflect the motion state of the measured object, the motion state of the measured object can be accurately determined through the above manner.
[0030] S220: determining a first position vector and a second position vector of the measured object according to at least two groups of ultrasonic position data when the measured object is in the preset state, wherein the first position vector is a world coordinate system position vector of the measured object, and the second position vector is a self coordinate system position vector of the measured object.
[0031] It should be noted that the world coordinate system position vector of the measured object refers to the position vector of the measured object in the world coordinate system, and the self coordinate system position vector of the measured object refers to the position vector of the measured object in the self coordinate system. The ultrasonic position data herein includes position data of the measured object in the world coordinate system and position data of the measured object in the self coordinate system. Since the calculation of a vector requires at least two groups of position data, the world coordinate system position vector of the measured object and the self coordinate system position vector of the measured object are determined and obtained according to at least two groups of ultrasonic position data. The ultrasonic position data herein can be distance data measured by ultrasonic waves, that is, data measured by using an ultrasonic ranging principle (distance measurement according to a time difference when the receiver receives ultrasonic waves).
[0032] S230: performing attitude processing on the first position vector, the second position vector, a self coordinate system gravity vector of the measured object, and a world coordinate system gravity vector of the measured object to determine attitude data of the measured object.
[0033] It should be noted that the attitude herein is used to describe the relative relationship between the self coordinate system of the measured object and the world coordinate system of the measured object. The world coordinate system gravity vector of the measured object herein refers to the gravitational acceleration of the measured object in the world coordinate system, which is a constant, and the vector direction is vertically downward, and can be represented as Gn, and the specific value is [0 0 9.8], unit m / s 2 .
[0034] In the scheme of the embodiment of the application, during the attitude initialization process of the measured object, the measured object can be in a relatively static state, so that the attitude data of the measured object cannot be processed. The world coordinate system position vector of the measured object and the self coordinate system position vector of the measured object are determined and obtained according to at least two groups of ultrasonic position data, and the attitude data of the measured object can be processed by combining the self coordinate system gravity vector of the measured object and the world coordinate system gravity vector of the measured object, so as to realize the attitude data processing of the measured object in the preset state.
[0035] In a possible implementation, the determining whether the measured object is in the preset state according to the gravity vector of the measured object in its own coordinate system and the gyroscope measurement value includes: obtaining an accelerometer measurement value of the measured object and calculating a module length of the accelerometer measurement value to obtain a module of the gravity vector of the measured object in its own coordinate system; obtaining a gyroscope measurement value of the measured object and calculating a module length of the gyroscope measurement value to obtain a module of the gyroscope measurement value of the measured object; and determining whether the measured object is in the preset state according to the module of the gyroscope measurement value of the measured object and the module of the gravity vector of the measured object in its own coordinate system.
[0036] It should be noted that the module here refers to the module of a vector, and the length of the vector is called the module of the vector. Since the module of the gyroscope measurement value of the measured object and the module of the gravity vector of the measured object in its own coordinate system can determine the motion state of the measured object, it can be determined whether the measured object is in the preset state. In the above manner, the motion state of the measured object can be accurately determined, and it can be determined whether the measured object is in the preset state.
[0037] In a possible implementation, the determining whether the measured object is in the preset state according to the module of the gyroscope measurement value of the measured object and the module of the gravity vector of the measured object in its own coordinate system includes: when the module of the gyroscope measurement value of the measured object is in a zero value range and when the module of the gravity vector of the measured object in its own coordinate system is in a gravity acceleration threshold range, determining that the measured object is in the preset state, otherwise, determining that the measured object is not in the preset state.
[0038] It should be noted that since the measured object can have a small displacement or the measurement can have a small error, it can be determined that the measured object is in the preset state according to that the module of the gyroscope measurement value of the measured object is in a zero value range and that the module of the gravity vector of the measured object in its own coordinate system is in a gravity acceleration threshold range. Specifically, let the gravity vector of the measured object in its own coordinate system be [accx, accy, accz] with a unit of m / s 2 , and let the gyroscope measurement value of the measured object be [Gyrox, Gyroy, Gyroz]. The judgment condition is whether the module length of the gravity vector of the measured object in its own coordinate system is in a gravity acceleration threshold range, that is, close to 9.8, and whether the module length of the gyroscope measurement value of the measured object is in a zero value range, that is, close to 0. The range in the following formula is a preferred value.
[0039] accx^ 2 +accy^ 2 +accz^ 2 ∈[9.5,10.1](unit: m / s 2 )
[0040] Gyrox 2 +Gyroy 2 +Gyroz 2 ∈ [-0.1, 0.1] (unit: rad / s)
[0041] Preferably, when the module of the gravity vector of the self-coordinate system of the measured object is in [9.5, 10.1] and the module of the gyroscope measurement value of the measured object is in [-0.1, 0.1], it is determined that the measured object is in the preset state. In the above manner, the motion state of the measured object can be accurately determined, and it can be determined whether it is in the preset state.
[0042] In a possible implementation, the obtaining of the gyroscope measurement value of the measured object and the calculation of the module of the gyroscope measurement value to obtain the module of the gyroscope measurement value of the measured object comprises: obtaining the angular velocity measurement values of three axes of the gyroscope of the measured object; and calculating the angular velocity measurement values of the three axes of the gyroscope by using a square root function to obtain the module of the gyroscope measurement value of the measured object.
[0043] It should be noted that, as shown in Figure 2 , the three axes of the gyroscope here refer to the x-axis, the y-axis and the z-axis in the space rectangular coordinate system, and can also be represented by the inner ring axis, the outer ring axis and the outer frame axis of the gyroscope coordinate system. When the rotor of the gyroscope rotates at a high speed, if an external moment acts on the outer ring axis, the gyroscope will rotate around the inner ring axis; if an external moment acts on the inner ring axis, the gyroscope will rotate around the outer ring axis. The direction of the rotation angular velocity is perpendicular to the direction of the external moment.
[0044] The angular velocity here refers to the angle turned by the measured object per unit time when the measured object moves in a circle, and is used to describe the speed of the movement of the measured object around the center of the circle. The square root here, also called the second root, is the arithmetic square root, which is a non-negative number. The square root function here is Gyro_mod = sqrt(Gyrox 2 +Gyroy 2 +Gyroz 2 ), wherein Gyrox, Gyroy and Gyroz are the positioning data of the three axes of the gyroscope, with the unit of rad / s. In the above manner, the module of the gyroscope measurement value of the measured object can be accurately calculated.
[0045] In a possible implementation, the obtaining the accelerometer measurement of the measured object and calculating the modulus of the accelerometer measurement to obtain the modulus of the gravity vector of the self coordinate system of the measured object comprises: obtaining the acceleration measurement of three axes of the accelerometer of the measured object; and calculating the acceleration measurement of the three axes of the accelerometer by using a square root function to obtain the modulus of the gravity vector of the self coordinate system of the measured object.
[0046] It should be noted that the acceleration here refers to the rate of change of the speed of the measured object with respect to time, and indicates the speed of the change of the measured object. The square root function here is accx_mod=sqrt(accx 2 +accy 2 +accz 2 ), wherein accx, accy and accz are the acceleration measurement of the three axes of the accelerometer, and the unit is m / s^ 2 By the above method, the modulus of the gravity vector of the self coordinate system of the measured object can be accurately calculated.
[0047] In a possible implementation, when the measured object is in a preset state, the first position vector and the second position vector of the measured object are determined according to at least two groups of ultrasonic position data, which comprises: calculating the first position vector of the measured object according to the positioning coordinates of the two ultrasonic sensors on the measured object in the world coordinate system; and calculating the second position vector of the measured object according to the position coordinates of the two ultrasonic sensors on the measured object in the self coordinate system.
[0048] It should be noted that the greater the distance between the ultrasonic sensors, the higher the accuracy of the attitude calculation. In order to perform the attitude calculation, the distance between the ultrasonic sensors is preferably 3-4 cm. Since an angle of more than 70° between every two ultrasonic sensors will cause a positioning blind area, the angle between the normals of every two ultrasonic sensors is preferably 70°. By the above method, the measurement range of the ultrasonic sensor can be increased, and the position vector can be accurately calculated.
[0049] The ultrasonic position data here includes position data of the measured object in a world coordinate system and position data of the measured object in a self coordinate system. Specifically, the self coordinate system of the measured object is referred to as the b system (for short, b system); and the world coordinate system of the measured object is referred to as the n system (for short, n system). The positioning results of the ultrasonic sensor A and the ultrasonic sensor B are A (x1, y1, z1), B (x2, y2, z2), where the ultrasonic sensor A and the ultrasonic sensor B are arranged on the measured object. The position vector of the world coordinate system of the measured object is Pn, that is, [x2-x1, y2-y1, z2-z1]. According to the position coordinates A (a, b, c) and B (d, e, f) of the two points on the structure of the measured object, the position vector of the self coordinate system of the measured object is Pb, that is, [d-a, e-b, f-c]. In the above manner, the position vector of the world coordinate system of the measured object and the position vector of the self coordinate system of the measured object can be accurately calculated.
[0050] In a possible implementation, the attitude processing on the first position vector, the second position vector, the gravity vector of the self coordinate system of the measured object, and the gravity vector of the world coordinate system of the measured object is performed to determine the attitude data of the measured object, including: calculating the attitude transfer matrix of the self coordinate system of the measured object to the world coordinate system according to the first position vector of the measured object, the second position vector of the measured object, the gravity vector of the self coordinate system of the measured object, and the gravity vector of the world coordinate system of the measured object; and performing transpose operation on the attitude transfer matrix to obtain the attitude data of the measured object.
[0051] Specifically, the gravity vector of the self coordinate system of the measured object is Gb, and the attitude transfer matrix of the self coordinate system of the measured object to the world coordinate system is Cbn. Based on the conversion relationship between the two coordinate systems, there are
[0052] Gn=Cbn*Gb (1)
[0053] Pn=Cbn*Pb (2)
[0054] In the above formula, Cbn is the attitude transfer matrix of the b system to the n system. The transpose Cnb is referred to as the attitude of the measured object in the world coordinate system. The solving process is: the above two equations are solved together, and the cross multiplication of both sides is performed to obtain
[0055] Gn×Pn=(Cbn*Gb)×(Cbn*Pb)=Cbn(Gb×Pb) (3)
[0056] Solving (1)-(3) together, [Gn Pn Gn×Pn]=Cbn[Gb Pb Gb×Pb]
[0057] Therefore, Cbn=[Gn Pn Gn×Pn]*[Gb Pb Gb×Pb]-1
[0058] Finally, the posture transition matrix Cbn is transposed to obtain the posture data Cnb of the measured object. In this way, the posture data of the measured object can be accurately calculated.
[0059] Figure 3 A schematic block diagram of a posture data processing apparatus according to another embodiment of the present application. The scheme of the embodiment of the present application can be applied to electronic devices, including but not limited to electronic devices with data processing capabilities, etc.
[0060] The posture data processing apparatus of the embodiment includes: a state determination module 310 configured to determine whether a measured object is in a preset state according to a gravity vector of a self coordinate system of the measured object and a gyroscope measurement value; a position calculation module 320 configured to determine a first position vector and a second position vector of the measured object according to at least two groups of ultrasonic position data when the measured object is in the preset state, wherein the first position vector is a world coordinate system position vector of the measured object, and the second position vector is a self coordinate system position vector of the measured object; and a posture processing module 330 configured to perform posture processing on the first position vector, the second position vector, a gravity vector of the self coordinate system of the measured object, and a gravity vector of a world coordinate system of the measured object, and determine posture data of the measured object.
[0061] In some examples, the state determination module 310 is specifically configured to: obtain an accelerometer measurement value of the measured object and calculate a module length of the accelerometer measurement value to obtain a module of the gravity vector of the self coordinate system of the measured object; obtain a gyroscope measurement value of the measured object and calculate a module length of the gyroscope measurement value to obtain a module of the gyroscope measurement value of the measured object; and determine whether the measured object is in the preset state according to the module of the gyroscope measurement value of the measured object and the module of the gravity vector of the self coordinate system of the measured object.
[0062] In some examples, the state determination module 310 is specifically configured to: when the module of the gyroscope measurement value of the measured object is in a zero value range and when the module of the gravity vector of the self coordinate system of the measured object is in a gravity acceleration threshold value range, determine that the measured object is in the preset state, otherwise, determine that the measured object is not in the preset state.
[0063] In some examples, the state determination module 310 is specifically configured to: obtain angular velocity measurement values of three axes of a gyroscope of the measured object; and calculate the angular velocity measurement values of the three axes of the gyroscope by using a square root function to obtain the module of the gyroscope measurement value of the measured object.
[0064] In some examples, the state determining module 310 is specifically configured to: obtain acceleration measurement values of three axes of an accelerometer of the measured object; and calculate the acceleration measurement values of the three axes of the accelerometer by using a square root function to obtain a module of a gravity vector of a self coordinate system of the measured object.
[0065] In some examples, the position calculating module 320 is specifically configured to: calculate a first position vector of the measured object according to positioning coordinates of two ultrasonic sensors on the measured object in a world coordinate system; and calculate a second position vector of the measured object according to position coordinates of the two ultrasonic sensors on the measured object in a self coordinate system.
[0066] In some examples, the attitude processing module 330 is specifically configured to: calculate an attitude transfer matrix of the self coordinate system of the measured object to the world coordinate system according to the first position vector of the measured object, the second position vector of the measured object, the gravity vector of the self coordinate system of the measured object, and a gravity vector of the world coordinate system of the measured object; and perform a transpose operation on the attitude transfer matrix to obtain attitude data of the measured object.
[0067] Referring to Figure 4 , a structural schematic diagram of an electronic device according to another embodiment of the present application is shown, and the embodiments of the present application do not limit the specific implementation of the electronic device.
[0068] As Figure 4 shown, the electronic device can include a processor 402, a communications interface 404, a memory 406 in which a program 410 is stored, and a communications bus 408.
[0069] The processor, the communications interface, and the memory complete mutual communication through the communications bus. The communications interface is configured to communicate with other electronic devices or servers. The processor is configured to execute the program, and specifically can execute the related steps in the above method embodiments. Specifically, the program can include program code, and the program code includes computer operation instructions.
[0070] The processor can be a processor CPU, or an application specific integrated circuit ASIC, or one or more integrated circuits configured to implement the embodiments of the present application. The one or more processors included in the smart device can be the same type of processor, such as one or more CPUs; or can be different types of processors, such as one or more CPUs and one or more ASICs.
[0071] a memory for storing a program. The memory can include a high-speed RAM memory and can also include a non-volatile memory, such as at least one disk memory.
[0072] The program can be specifically used to enable the processor to perform operations of: determining whether the measured object is in a preset state according to a gravity vector of a self-coordinate system of the measured object and a gyroscopic measurement value; when the measured object is in the preset state, determining a first position vector and a second position vector of the measured object according to at least two groups of ultrasonic position data, wherein the first position vector is a world-coordinate-system position vector of the measured object, and the second position vector is a self-coordinate-system position vector of the measured object; and performing attitude processing on the first position vector, the second position vector, a gravity vector of the self-coordinate system of the measured object, and a gravity vector of a world-coordinate system of the measured object to determine attitude data of the measured object.
[0073] The above implementation manners are only used to illustrate the embodiments of the present application, and not to limit the embodiments of the present application. A person of ordinary skill in the art can make various changes and modifications without departing from the spirit and scope of the embodiments of the present application. Therefore, all equivalent technical solutions also belong to the scope of the embodiments of the present application, and the patent protection scope of the embodiments of the present application should be defined by the claims. The system, device, module or unit illustrated in the above embodiments can be specifically implemented by a computer chip or entity, or by a product having certain functions.
[0074] For the convenience of description, the above device is described as various units respectively described in functions. Of course, in the implementation of the present application, the functions of each unit can be implemented in the same or more software and / or hardware.
[0075] Those skilled in the art should understand that the embodiments of the present application can be provided as a method, a system, or a computer program product. Therefore, the present application can be in the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware aspects. Moreover, the present application can be in the form of a computer program product implemented on one or more computer usable storage media (including but not limited to magnetic disk storage, CD-ROM, optical storage, etc.) containing computer usable program code.
[0076] The computer program instructions can also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer-implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart block or blocks. Figure 1 one or more flow or blocks Figure 1 means for functionally implementing the steps listed in the flowchart block or blocks.
[0077] These computer program instructions can also be stored in a computer readable memory that can direct a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer readable memory produce an article of manufacture including instructions which implement the function specified in the flowchart block or blocks. Figure 1 one or more flow or blocks Figure 1 means for functionally implementing the steps listed in the flowchart block or blocks.
[0078] The computer program instructions can also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer-implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart block or blocks. Figure 1 one or more flow or blocks Figure 1 means for functionally implementing the steps listed in the flowchart block or blocks.
[0079] In one typical configuration, the computing device includes one or more processors (CPUs), input / output interfaces, network interfaces, and memory. The memory can include non-persistent memory, random access memory (RAM), and / or non-volatile memory such as read-only memory (ROM) or flash memory, among others, in a computer readable medium. The memory is an example of computer readable media.
[0080] Computer-readable media includes permanent and non-permanent, movable and non-movable media that can be implemented by any method or technology to store information. The information can be computer-readable instructions, data structures, program modules or other data. Examples of computer storage media include, but are not limited to, phase-change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technologies, compact disc read-only memory (CD-ROM), digital versatile disc (DVD) or other optical storage, magnetic cassette, magnetic tape, magnetic disk storage or other magnetic storage devices, or any other non-transmission medium that can be used to store information accessible to a computing device. According to the definition herein, computer-readable media does not include transitory media such as modulated data signals and carriers.
[0081] It should also be noted that the terms "comprising", "containing", or any other variant thereof are intended to cover non-exclusive inclusion, such that processes, methods, articles or devices that comprise a list of elements do not only include those elements, but also other elements not explicitly listed or inherent to such processes, methods, articles or devices. Without more limitations, the element defined by the statement "comprising a" does not exclude the presence of additional identical elements in the process, method, article or device comprising the element.
[0082] Those skilled in the art will appreciate that embodiments of the present application can be provided as a method, system or computer program product. Accordingly, the present application can take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, the present application can take the form of a computer program product implemented on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROMs, optical storage devices, etc.) containing computer usable program code.
[0083] The present application can be described in the general context of computer-executable instructions, such as program modules, being executed by a computer. Generally, program modules include routines, programs, objects, components, data structures, etc., that perform particular transactions or implement particular abstract data types. The present application can also be practiced in a distributed computing environment where transactions are performed by remote processing devices that are connected through a communication network. In a distributed computing environment, program modules can be located in both local and remote computer storage media including storage devices.
[0084] The various embodiments in this specification are described in a progressive manner. Similar or identical parts between embodiments can be referred to interchangeably. Each embodiment focuses on describing the differences from other embodiments. In particular, the system embodiments are basically similar to the method embodiments, so the description is relatively simple; relevant parts can be referred to the descriptions in the method embodiments.
Claims
1. A method for processing attitude data, characterized in that, include: Based on the gravity vector of the object's own coordinate system and the gyroscope measurement value, it is determined whether the object is in a preset state. The preset state is that the magnitude of the gyroscope measurement value of the object is within the zero range of [-0.1, 0.1] rad / s, and the magnitude of the gravity vector of the object's own coordinate system is within the gravitational acceleration threshold range of [9.5, 10.1] m / s². When the object under test is in a preset state, the first position vector and the second position vector of the object under test are determined based on at least two sets of ultrasonic position data, wherein the first position vector is the world coordinate system position vector Pn of the object under test, and the second position vector is the self coordinate system position vector Pb of the object under test. The first position vector, the second position vector, the gravity vector Gb of the object's own coordinate system, and the gravity vector Gn of the object's world coordinate system are subjected to attitude processing to determine the attitude data of the object; the attitude processing process specifically includes: Based on the transformation relationships between the world coordinate system and its own coordinate system, Gn = Cbn * Gb and Pn = Cbn * Pb, and the cross product relationship Gn × Pn = Cbn * (Gb × Pb) derived from the transformation relationships; Solving the system of equations simultaneously yields the attitude transfer matrix Cbn from the object's own coordinate system to the world coordinate system. The formula for Cbn is: Cbn = [Gn, Pn, Gn × Pn] ⋅ [Gb, Pb, Gb × Pb] −1 The attitude transition matrix Cbn is transposed to obtain the attitude data Cnb of the object under test.
2. The method according to claim 1, wherein, The step of determining whether the object under test is in a preset state based on the gravity vector of the object's own coordinate system and the gyroscope measurement value includes: Acquire the accelerometer measurement value of the object under test and calculate the magnitude of the accelerometer measurement value to obtain the magnitude of the gravity vector of the object under test in its own coordinate system; The gyroscope measurement value of the object under test is obtained and the modulus of the gyroscope measurement value is calculated to obtain the modulus of the gyroscope measurement value of the object under test. Based on the magnitude of the gyroscope measurement of the object under test and the magnitude of the gravity vector of the object under test's own coordinate system, it is determined whether the object under test is in a preset state.
3. The method according to claim 2, wherein, The step of determining whether the object under test is in a preset state based on the magnitude of the gyroscope measurement value of the object under test and the magnitude of the gravity vector of the object under test's own coordinate system includes: When the magnitude of the gyroscope measurement of the object under test is within the zero range and the magnitude of the gravity vector of the object under test's own coordinate system is within the gravity acceleration threshold range, the object under test is determined to be in a preset state; otherwise, the object under test is determined not to be in a preset state.
4. The method according to claim 3, wherein, The step of acquiring the gyroscope measurement value of the object under test and calculating the modulus of the gyroscope measurement value to obtain the modulus of the gyroscope measurement value of the object under test includes: Obtain the angular velocity measurements of the three axes of the gyroscope of the object under test; The angular velocity measurements of the three axes of the gyroscope are calculated using the square root function to obtain the modulus of the gyroscope measurement values of the object being measured.
5. The method according to claim 3, wherein, The step of acquiring the accelerometer measurement value of the object under test and calculating the magnitude of the accelerometer measurement value to obtain the magnitude of the gravity vector of the object under test in its own coordinate system includes: Acquire the acceleration measurements of the three axes of the accelerometer of the object being measured; The square root function is used to calculate the acceleration measurements of the three axes of the accelerometer to obtain the magnitude of the gravity vector of the object's own coordinate system.
6. The method according to claim 1, wherein, When the object under test is in a preset state, determining the first position vector and the second position vector of the object under test based on at least two sets of ultrasonic position data includes: Based on the positioning coordinates of the two ultrasonic sensors on the object under test in the world coordinate system, the first position vector of the object under test is calculated. The second position vector of the object under test is calculated based on the position coordinates of the two ultrasonic sensors on the object under test in its own coordinate system.
7. The method according to claim 1, wherein, The step of performing attitude processing on the first position vector, the second position vector, the gravity vector of the object under test's own coordinate system, and the gravity vector of the object under test's world coordinate system to determine the attitude data of the object under test includes: The attitude transfer matrix from the object's own coordinate system to the world coordinate system is calculated based on the object's first position vector, the object's second position vector, the object's own coordinate system gravity vector, and the object's world coordinate system gravity vector. The attitude transition matrix is transposed to obtain the attitude data of the object under test.
8. An attitude data processing apparatus, comprising: The state determination module is used to determine whether the object under test is in a preset state based on the gravity vector of the object's own coordinate system and the gyroscope measurement value. The preset state is that the magnitude of the gyroscope measurement value of the object under test is within the zero value range of [-0.1, 0.1] rad / s, and the magnitude of the gravity vector of the object's own coordinate system is within the gravitational acceleration threshold range of [9.5, 10.1] m / s². The position calculation module is used to determine the first position vector and the second position vector of the object under test based on at least two sets of ultrasonic position data when the object under test is in a preset state. The first position vector is the world coordinate system position vector Pn of the object under test, and the second position vector is the self coordinate system position vector Pb of the object under test. The attitude processing module is used to perform attitude processing on the first position vector, the second position vector, the gravity vector Gb of the measured object's own coordinate system, and the gravity vector Gn of the measured object's world coordinate system to determine the attitude data of the measured object; the attitude processing process specifically includes: Based on the transformation relationships between the world coordinate system and its own coordinate system, Gn = Cbn * Gb and Pn = Cbn * Pb, and the cross product relationship Gn × Pn = Cbn * (Gb × Pb) derived from the transformation relationships; Solving the system of equations simultaneously yields the attitude transfer matrix Cbn from the object's own coordinate system to the world coordinate system. The formula for Cbn is: Cbn = [Gn, Pn, Gn × Pn] ⋅ [Gb, Pb, Gb × Pb] −1 The attitude transition matrix Cbn is transposed to obtain the attitude data Cnb of the object under test.
9. An electronic device, comprising: The processor, memory, communication interface, and communication bus are provided, wherein the processor, memory, and communication interface communicate with each other via the communication bus. The memory is used to store at least one executable instruction that causes the processor to perform the operation corresponding to the method as described in any one of claims 1-7.
10. A computer storage medium having a computer program stored thereon, which, when executed by a processor, implements the method as described in any one of claims 1-7.
Citation Information
Patent Citations
Adaptive optimal-REQUEST algorithm for inertial-geomagnetic combination attitude calculation
CN107621261A
Indoor pedestrian navigation attitude estimation method based on foot-worn inertia measurement unit
CN110398245A
High-precision horizontal attitude measurement method and system in complex dynamic environment
CN114264304A