This application claims priority to Chinese Patent Application No. 201810595287.5, filed Jun. 11, 2018, which is hereby incorporated by reference herein as if set forth in its entirety.
The present disclosure relates to positioning technology, and particularly to a motion target direction angle obtaining method and apparatus as well as a robot using the same.
A motion target may be a target device having the capability of autonomous motion or moving in response to manipulation instructions, for example, a robot, a smart car, or a smart aircraft, or be other target having the capability of moving and carrying a positioning device, for example, a target person or target object carrying a positioning device.
At present, the positioning of motion targets has become more and more important. Taking robots as an example, navigation is one of the most basic and challenging capabilities of mobile robots, and the accurate positioning for a robot is the basis for ensuring the stable operation of a navigation system. The problems about the positioning of a robot include obtaining the real-time position and direction angle (e.g., yaw angle) of the robot in an environment. The common robot wireless positioning methods include absolute positioning methods such as UWB (ultra wideband) based positioning and GPS (global positioning system) positioning as well as relative positioning methods such as odometer based positioning and IMU (inertial measurement unit) based positioning.
In an absolute positioning method, when a position is demarcated in a map, the positioning is accurate while it will not output the direction angle, and the accurate orientation cannot be realized. When an odometer is used on a robot, the position and the direction angle of the robot are estimated by calculating the accumulative signal number of the encoder and the IMU of the robot. In this case, there has good data precision in a short time while accumulative errors will be generated after a long motion of the robot, which affects the positioning precision.
At present, in order to solve the problem of direction angles, it usually uses a least squares method to calculate a direction angle by: collecting multiple sets of position data of a robot, fitting the data by curve fitting or straight line fitting, and calculating the current direction angle of the robot by calculating the slope of the current fitting points. In which, the two data fitting methods have the following drawbacks:
1. for the straight line fitting, since there are mainly curves in the navigation route of the robot, the precision of the straight line fitting is low in most cases, and the accurate direction angle of the robot cannot be provided in real time.
2. for the curve fitting, the fitting of the long-term motion curve of the robot is generally can not be performed by using the existing curve, while the fitting point of the short-term motion curve of the robot is diverged.
To describe the technical schemes in this embodiments of the present disclosure more clearly, the following briefly introduces the drawings required for describing the embodiments or the prior art. Apparently, the drawings in the following description merely show some examples of the present disclosure. For those skilled in the art, other drawings can be obtained according to the drawings without creative efforts.
In the following descriptions, for purposes of explanation instead of limitation, specific details such as particular system architecture and technique are set forth in order to provide a thorough understanding of embodiments of the present disclosure. However, it will be apparent to those skilled in the art that the present disclosure may be implemented in other embodiments that are less specific of these details. In other instances, detailed descriptions of well-known systems, devices, circuits, and methods are omitted so as not to obscure the description of the present disclosure with unnecessary detail.
For the purpose of describing the technical solutions of the present disclosure, the following describes through specific embodiments.
As shown in
The first creating module 61 is configured to create an absolute coordinate system, and obtain an absolute position coordinate of at least one point after the first point in the absolute coordinate system, where the first point and the at least one point are points on a motion trajectory of a motion target, and the points are obtained through an absolute positioning method.
The second creating module 62 is configured to create a relative coordinate system with the first point as an origin, and obtain a relative position coordinate corresponding to the at least one point in the relative coordinate system, where the relative position coordinate is a coordinate of a point of the motion target obtained by a relative positioning method.
The first processing module 63 is configured to calculate matrix parameters of a transformation matrix based on the absolute position coordinate of the at least one point and the relative position coordinate corresponding to the at least one point, where the transformation matrix is for transforming between the absolute coordinate system and the relative coordinate system.
The second processing module 64 is configured to determine a direction angle of the motion target at the first point based on the matrix parameters.
In one embodiment, the first processing module 63 is configured to:
create a matrix equation corresponding to each point based on the absolute position coordinate of each point, the relative position coordinate of each point, and the transformation matrix;
compose the matrix equation corresponding to each point into overdetermined equations; and
solve the overdetermined equations to obtain the matrix parameters of the transformation matrix.
In one embodiment, the first processing module 63 is configured to:
decouple the overdetermined equations; and
solve the decoupled overdetermined equations based on a least squares method to obtain the matrix parameters of the transformation matrix.
In one embodiment, the transformation matrix is for transforming the absolute coordinate system to the relative coordinate system, and the equation of the transformation matrix is:
where, (xmapi,ymapi) is the absolute position coordinate of the i-th point; (xodomi,yodomi) is the relative position coordinate of the i-th point; and θ, m, and n are the matrix parameters.
In one embodiment, the absolute positioning method includes positioning the motion target through distances between the motion target and a plurality of base stations.
In one embodiment, the relative positioning method includes positioning the motion target through an odometer disposed on the motion target, wherein the relative coordinate system includes an odometer coordinate system of the odometer.
It should be noted that, each of the above-mentioned modules/units may be implemented in the form of hardware (e.g., a circuit), software (e.g., a program), or a combination thereof (e.g., a circuit with a single chip microcomputer).
In this embodiment, the matrix parameters of the transformation matrix of the absolute coordinate system and the relative coordinate system are calculated through the absolute position coordinate and the relative position coordinate of the at least one point, and then the direction angle of the motion target at the first point is determined based on the matrix parameters, which is capable of calculating the direction angle of the motion target accurately. The present disclosure combines the absolute positioning method and the relative positioning method, and uses two types of position coordinates of multiple positions and the transformation matrix between two coordinate systems to calculate the direction angle, which is capable of realizing the high-precision calculation of the direction angle.
Exemplarily, the computer program 72 may be divided into one or more modules/units, and the one or more modules/units are stored in the storage 71 and executed by the processor 70 to realize the present disclosure. The one or more modules/units may be a series of computer program instruction sections capable of performing a specific function, and the instruction sections are for describing the execution process of the computer program 72 in the robot 7. For example, computer program 72 can be divided into a first creating module, a second creating module, a first processing module, and a second processing module. The specific function of each module is as follows.
The first creating module is configured to create an absolute coordinate system, and obtain an absolute position coordinate of at least one point after the first point in the absolute coordinate system, where the first point and the at least one point are points on a motion trajectory of a motion target, and the points are obtained through an absolute positioning method.
The second creating module is configured to create a relative coordinate system with the first point as an origin, and obtain a relative position coordinate corresponding to the at least one point in the relative coordinate system, where the relative position coordinate is a coordinate of a point of the motion target obtained by a relative positioning method.
The first processing module is configured to calculate matrix parameters of a transformation matrix based on the absolute position coordinate of the at least one point and the relative position coordinate corresponding to the at least one point, where the transformation matrix is for transforming between the absolute coordinate system and the relative coordinate system.
The second processing module is configured to determine a direction angle of the motion target at the first point based on the matrix parameters.
In one embodiment, the relative positioning method includes positioning the robot through the odometer, where the relative coordinate system includes an odometer coordinate system of the odometer.
It can be understood by those skilled in the art that
The processor 70 may be a central processing unit (CPU), or be other general purpose processor, a digital signal processor (DSP), an application specific integrated circuit (ASIC), a field-programmable gate array (FPGA), or be other programmable logic device, a discrete gate, a transistor logic device, and a discrete hardware component. The general purpose processor may be a microprocessor, or the processor may also be any conventional processor.
The storage 71 may be an internal storage unit of the robot 7, for example, a hard disk or a memory of the robot 7. The storage 71 may also be an external storage device of the robot 7, for example, a plug-in hard disk, a smart media card (SMC), a secure digital (SD) card, flash card, and the like, which is equipped on the robot 7. Furthermore, the storage 71 may further include both an internal storage unit and an external storage device, of the robot 7. The storage 71 is configured to store the computer program 72 and other programs and data required by the robot 7. The storage 71 may also be used to temporarily store data that has been or will be output.
S101: creating an absolute coordinate system, and obtaining an absolute position coordinate of at least one point after the first point in the absolute coordinate system, where the first point and the at least one point are points on a motion trajectory of a motion target, and the points are obtained through an absolute positioning method.
The absolute positioning method may include UWB (ultra wideband) based positioning, GPS (Global Positioning System) positioning, or positioning a motion target through distances between the motion target and a plurality of base stations. In this embodiment, the method of positioning the motion target through distances between the motion target and a plurality of base stations for example, an UWB based positioning, is used, which can accurately position a motion track of the motion target in the absolute coordinate system. It should be noted that other absolute positioning methods can also be adopted, which is not limited herein.
The first point is a point at which a direction angle calculation is required. It can select at least one point on the motion trajectory of the motion target which is located after the first point, and obtain the absolute position coordinate of the at least one point. The absolute position coordinate is a coordinate in the absolute coordinate system which is positioned through the absolute positioning method. The time corresponding to any of the at least one point is after the time corresponding to the first point, that is, the motion target is moved to the first point first, and then moved to the at least one point.
The at least one point which is close to the first point can be obtained according to the first point, so that the direction angle (e.g., a yaw angle) can be calculated in a shorter time after the motion target is moved to the first point, thereby ensuring the timeliness of the calculation of the direction angle of the first position, so as to navigate or adjust the motion posture of the motion target in time based on the direction angle of the first point. For example, the distance between the first point and any two adjacent points in the at least one point is less than a preset distance threshold, or the time of the motion target to move between any two adjacent points is less than a preset time threshold, so that the timeliness of the calculation of the direction angle of the first position can be ensured.
S102: creating a relative coordinate system with the first point as an origin, and obtaining a relative position coordinate of the at least one point in the relative coordinate system, where the relative position coordinate is a coordinate of a point of the motion target obtained by a relative positioning method.
In this embodiment, the relative positioning method may include odometer based positioning or IMU based positioning, and the coordinate of the current position of the motion target with respect to a starting position can be positioned through the relative positioning method, so as to create the relative coordinate system with the starting position as the origin. In this embodiment, when the direction angle of the first point is calculated, the first point is used as the starting position, and the relative coordinate system with the first position point as the origin is created.
In this embodiment, the positioning method of positioning the motion target through an odometer is used, which can position the coordinate of the point of the motion target in the relative coordinate system in an accurate manner. The relative coordinate system may include an odometer coordinate system. In which, the odometer coordinate system may take the first point as the origin, and the right front of the motion target at the first point is defined as the X axis of the odometer coordinate system, and the left of the motion target is defined as the Y axis of the odometer coordinate system. The odometer can calculate the current pose of the motion target by performing integration calculation through a motor encoder, where the pose includes the coordinate and the direction angle (for example, a yaw angle, a roll angle, and/or a pitch angle). It should be noted that other relative positioning methods can also be adopted, which is not limited herein.
S103: calculating matrix parameters of a transformation matrix based on the absolute position coordinate of the at least one point and the relative position coordinate of the at least one point, where the transformation matrix is for transforming between the absolute coordinate system and the relative coordinate system.
In this embodiment, the transformation matrix may be a matrix for transforming from the absolute coordinate system to the relative coordinate system, or may be a matrix for transforming from the relative coordinate system to the absolute coordinate system, which is not limited herein. One point corresponds to one absolute position coordinate and one relative position coordinate. The matrix parameters of the transformation matrix can be calculated based on the absolute position coordinate of the at least one point and the relative position coordinate of the at least one point.
S301: creating a matrix equation corresponding to each point based on the absolute position coordinate of each point, the relative position coordinate of each point, and the transformation matrix.
In this embodiment, the matrix equation corresponding to one point can be created based on the absolute position coordinate, the relative position coordinate, and the transformation matrix of the point. The matrix equation corresponding to each point is respectively created. In which, the matrix parameters are used as the unknown variable of the matrix equation.
The description is made by an example as follows. The transformation matrix is a matrix for transforming from the absolute coordinate system to the relative coordinate system, and a formula for transforming coordinate system based on the transformation matrix is as follows:
the matrix parameters are used as the unknown variable to convert the formula (1) into the matrix equation, and the obtained matrix equation is as follows:
where (xmapi,ymapi) is the absolute position coordinate of the i-th point; (xodomi,yodomi) is the relative position coordinate of the i-th point; and θ, m, and n are matrix parameters.
It should be noted that the transformation matrix may also be a matrix for transforming from the relative coordinate system to the absolute coordinate system, and the corresponding transformation matrix and the matrix equation will change. Therefore, the transformation matrix and the matrix equation are not limited herein, which are only used as examples.
S302: composing the matrix equation corresponding to each point into overdetermined equations.
S303: solving the overdetermined equations to obtain the matrix parameters of the transformation matrix.
If the absolute positioning method and the relative positioning method do not have positioning errors, there is only one unique solution for the transformation matrix of transforming from the absolute coordinate system to the relative coordinate system. However, in the actual positioning, there are positioning errors in the absolute positioning method and the relative positioning method, which results in that the solution for the transformation matrix is not unique. If the transformation matrix is calculated only by the absolute position coordinate and relative position coordinate of one point, there will be a large error in the transformation matrix. In this embodiment, the matrix equations corresponding to multiple points are composed into the overdetermined equations, and then the overdetermined equations are solved, which is capable of calculating the transformation matrix by integrating the coordinates of the multiple points, thereby reducing the error of the transformation matrix and improving the precision of the calculation of the direction angle.
S401: decoupling the overdetermined equations.
S402: solving the decoupled overdetermined equations based on a least squares method to obtain the matrix parameters of the transformation matrix.
In this embodiment, the overdetermined equations can be decoupled to linearize the equations, and the overdetermined equations are solved through the least squares method so as to obtain the accurate matrix parameters.
For example, assuming that s=sin(θ) and c=cos(θ), after sin(θ) and cos(θ) of the overdetermined equations are decoupled, the decoupled overdetermined equations will become to:
the least squares method is used to solve c and s in the overdetermined equations, so as to determine the matrix parameters of the transformation matrix.
In this embodiment, the solution of the overdetermined equations can be accurately solved through the decoupling process and the least squares method, thereby ensuring the precision of the matrix parameters.
S104: determining a direction angle of the motion target at the first point based on the matrix parameters.
In this embodiment, since the relative coordinate system is created with the first point as the origin, the transformation matrix of the absolute coordinate system and the relative coordinate system is related to the direction angle of the motion target at the first point, and the direction angle of the motion target at the first point can be determined based on the matrix parameters.
In this embodiment, the matrix parameters of the transformation matrix of the absolute coordinate system and the relative coordinate system are calculated through the absolute position coordinate and the relative position coordinate of the at least one point, and then the direction angle of the motion target at the first point is determined based on the matrix parameters, which is capable of calculating the direction angle of the motion target accurately. The present disclosure combines the absolute positioning method and the relative positioning method, and uses two types of position coordinates of multiple positions and the transformation matrix between two coordinate systems to calculate the direction angle, which is capable of realizing the high-precision calculation of the direction angle.
In order to verify the feasibility of this embodiment, the direction angle calculated using AMCL (adaptive Monte Carlo localization) is adopted to compare with the direction angle calculated using the method provided by this embodiment.
It should be understood that, the sequence of the serial number of the steps in the above-mentioned embodiments does not mean the execution order while the execution order of each process should be determined by its function and internal logic, which should not be taken as any limitation to the implementation process of the embodiments.
Those skilled in the art may clearly understand that, for the convenience and simplicity of description, the division of the above-mentioned functional units and modules is merely an example for illustration. In actual applications, the above-mentioned functions may be allocated to be performed by different functional units according to requirements, that is, the internal structure of the device may be divided into different functional units or modules to complete all or part of the above-mentioned functions. The functional units and modules in this embodiment may be integrated in one processing unit, or each unit may exist alone physically, or two or more units may be integrated in one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of software functional unit. In addition, the specific name of each functional unit and module is merely for the convenience of distinguishing each other and are not intended to limit the scope of protection of the present disclosure. For the specific operation process of the units and modules in the above-mentioned system, reference may be made to the corresponding processes in the above-mentioned method embodiments, and are not described herein.
In the above-mentioned embodiments, the description of each embodiment has its focuses, and the parts which are not described or mentioned in one embodiment may refer to the related descriptions in other embodiments.
Those ordinary skilled in the art may clearly understand that, the exemplificative units and steps described in this embodiments disclosed herein may be implemented through electronic hardware or a combination of computer software and electronic hardware. Whether these functions are implemented through hardware or software depends on the specific application and design constraints of the technical schemes. Those ordinary skilled in the art may implement the described functions in different manners for each particular application, while such implementation should not be considered as beyond the scope of the present disclosure.
In this embodiments provided by the present disclosure, it should be understood that the disclosed apparatus/robot and method may be implemented in other manners. For example, the above-mentioned apparatus/robot embodiment is merely exemplary. For example, the division of modules or units is merely a logical functional division, and other division manner may be used in actual implementations, that is, multiple units or components may be combined or be integrated into another system, or some of the features may be ignored or not performed. In addition, the shown or discussed mutual coupling may be direct coupling or communication connection, and may also be indirect coupling or communication connection through some interfaces, devices or units, and may also be electrical, mechanical or other forms.
The units described as separate components may or may not be physically separated. The components represented as units may or may not be physical units, that is, may be located in one place or be distributed to multiple network units. Some or all of the units may be selected according to actual needs to achieve the objectives of this embodiment.
In addition, each functional unit in each of the embodiments of the present disclosure may be integrated into one processing unit, or each unit may exist alone physically, or two or more units may be integrated in one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of software functional unit.
When the integrated module/unit is implemented in the form of a software functional unit and is sold or used as an independent product, the integrated module/unit may be stored in a non-transitory computer-readable storage medium. Based on this understanding, all or part of the processes in the method for implementing the above-mentioned embodiments of the present disclosure are implemented, and may also be implemented by instructing relevant hardware through a computer program. The computer program may be stored in a non-transitory computer-readable storage medium, which may implement the steps of each of the above-mentioned method embodiments when executed by a processor. In which, the computer program includes computer program codes which may be the form of source codes, object codes, executable files, certain intermediate, and the like. The computer-readable medium may include any primitive or device capable of carrying the computer program codes, a recording medium, a USB flash drive, a portable hard disk, a magnetic disk, an optical disk, a computer memory, a read-only memory (ROM), a random access memory (RAM), electric carrier signals, telecommunication signals and software distribution media. It should be noted that the content contained in the computer readable medium may be appropriately increased or decreased according to the requirements of legislation and patent practice in the jurisdiction. For example, in some jurisdictions, according to the legislation and patent practice, a computer readable medium does not include electric carrier signals and telecommunication signals.
The above-mentioned embodiments are merely intended for describing but not for limiting the technical schemes of the present disclosure. Although the present disclosure is described in detail with reference to the above-mentioned embodiments, it should be understood by those skilled in the art that, the technical schemes in each of the above-mentioned embodiments may still be modified, or some of the technical features may be equivalently replaced, while these modifications or replacements do not make the essence of the corresponding technical schemes depart from the spirit and scope of the technical schemes of each of the embodiments of the present disclosure, and should be included within the scope of the present disclosure.
Number | Date | Country | Kind |
---|---|---|---|
201810595287.5 | Jun 2018 | CN | national |