定位方法、装置、业务处理系统以及计算机可读存储介质Positioning method, device, business processing system, and computer readable storage medium
技术领域Technical field
本发明涉及一种计算机及其软件技术领域,特别涉及一种用于双驱移动机器人的定位的方法、装置、业务处理系统以及计算机可读存储介质。The present invention relates to the field of computers and software technologies thereof, and in particular, to a method, an apparatus, a service processing system, and a computer readable storage medium for positioning a dual-drive mobile robot.
背景技术Background technique
随着工业发展,移动机器人逐渐被广泛应用,例如电商公司可以使用移动机器人在仓库内搬运货物。双驱移动机器人通常采用左轮和右轮的双驱模式,车体轮系采用差速固定舵方式,驱动电机为伺服电机,通过控制两个电机的转速从而实现对车的速度控制和姿态控制。With the development of the industry, mobile robots are gradually being widely used. For example, e-commerce companies can use mobile robots to carry goods in warehouses. The two-wheel drive mobile robot usually adopts the double-drive mode of the left and right wheels. The car body train adopts the differential fixed rudder mode, and the drive motor is the servo motor. By controlling the rotational speed of the two motors, the speed control and attitude control of the vehicle are realized.
双驱移动机器人的定位技术主要有基于编码器定位和基于惯性导航定位两种。The positioning technology of the two-wheeled mobile robot is mainly based on encoder positioning and inertial navigation based positioning.
基于编码器的机器人定位方法具体为:当机器人在两个二维码点之间行走时,如果地面严格水平,排除其他误差的影响,可以认为机器人走直线。在车轮上安装有编码器,当车轮转动时,编码器会发出数个脉冲信号,导航解算单元接收到这个信号后,通过计算脉冲信号的个数,可以得知车轮在测量时间内直线上的距离,这样就可以得到机器人在直线上的坐标。然而,在地面水平度平整度不够、轮子半径不相等、机器人载重不均匀等情况下,机器人不再按直线行走,而是走曲线,尤其是当某个轮子打滑时,机器人会产生大幅度的转向,对编码器方式定位结果造成很大的误差。The encoder-based robot positioning method is specifically: when the robot walks between two two-dimensional code points, if the ground is strictly level and the influence of other errors is excluded, the robot can be considered to be in a straight line. An encoder is mounted on the wheel. When the wheel rotates, the encoder will send several pulse signals. After receiving the signal, the navigation solving unit can calculate the number of the pulse signals to know that the wheel is in a straight line within the measuring time. The distance so that you can get the coordinates of the robot on a straight line. However, in the case of insufficient horizontal flatness, uneven wheel radius, and uneven robot load, the robot no longer walks in a straight line, but walks the curve, especially when a certain wheel slips, the robot will produce a large Turning, causing a large error in the encoder mode positioning results.
基于惯性导航的机器人定位方法具体为:将惯性测量传感器置于载体中心点上,采集机器人运动的加速度、角速度等基础运动数据信 息,通过方向余弦矩阵将之转化到导航坐标系下,经过一系列导航算法即可解算出载体的速度、位置以及姿态角信息。然而,惯性导航传感器由于成本原因,实际应用中选择MEMS工艺低成本传感器,器件的零位较不稳定,随机漂移较严重,尤其是加速度计在10秒时间内由于漂移造成的位移计算误差达几十公分,这在实际应用中是不能接受的。The robot positioning method based on inertial navigation is specifically: placing the inertial measurement sensor on the center point of the carrier, collecting the basic motion data information such as the acceleration and angular velocity of the robot motion, and transforming it into the navigation coordinate system through the direction cosine matrix, after a series of The navigation algorithm can solve the velocity, position and attitude angle information of the carrier. However, due to cost reasons, the inertial navigation sensor selects the MEMS process low-cost sensor in practical applications. The zero position of the device is unstable and the random drift is serious. Especially, the displacement calculation error caused by the drift of the accelerometer in 10 seconds is up to several Ten centimeters, which is unacceptable in practical applications.
发明内容Summary of the invention
有鉴于此,本发明提供一种用于双驱移动机器人的定位方法以及定位装置,以及用于双驱移动机器人的定位的业务处理系统和计算机可读存储介质,有助于解决现有技术中的定位不准确的技术问题。In view of this, the present invention provides a positioning method and positioning device for a dual-drive mobile robot, and a service processing system and a computer readable storage medium for positioning of the dual-drive mobile robot, which are helpful in solving the prior art. The positioning of the inaccurate technical issues.
为实现发明目的,根据本发明的第一个方面,提供了一种用于双驱移动机器人的定位方法,包括:获取所述双驱移动机器人的初始横坐标、初始纵坐标、初始航向角、初始倾斜角、初始侧倾角;根据所述初始航向角、所述初始倾斜角以及所述初始侧倾角确定所述双驱移动机器人的新航向角、新倾斜角以及新侧倾角;确定所述双驱移动机器人的左右驱动轮的平均移动距离;根据所述初始横坐标、所述初始纵坐标、所述新航向角以及所述左右驱动轮的平均移动距离确定所述双驱移动机器人的新横坐标和新纵坐标。In order to achieve the object of the invention, according to a first aspect of the present invention, a positioning method for a dual-drive mobile robot is provided, comprising: acquiring an initial abscissa, an initial ordinate, an initial heading angle of the dual-drive mobile robot, An initial tilt angle, an initial roll angle; determining a new heading angle, a new tilt angle, and a new roll angle of the dual-drive mobile robot according to the initial head angle, the initial tilt angle, and the initial roll angle; determining the double Driving an average moving distance of the left and right driving wheels of the mobile robot; determining a new horizontal of the dual-drive mobile robot according to the initial abscissa, the initial ordinate, the new heading angle, and the average moving distance of the left and right driving wheels Coordinates and new ordinates.
可选地,所述根据所述初始航向角、所述初始倾斜角以及所述初始侧倾角确定所述双驱移动机器人的新航向角、新倾斜角以及新侧倾角的步骤包括:Optionally, the determining, according to the initial heading angle, the initial tilt angle, and the initial roll angle, the new heading angle, the new tilt angle, and the new roll angle of the dual-drive mobile robot include:
根据所述初始航向角、所述初始倾斜角以及所述初始侧倾角按照下列公式计算四元数:Calculating the quaternion according to the initial heading angle, the initial tilt angle, and the initial roll angle according to the following formula:
其中,
表示初始航向角,θ(k)表示初始倾斜角,γ(k)表示初始侧倾角,a、b、c、d表示四元数;
among them, Indicates the initial heading angle, θ(k) represents the initial tilt angle, γ(k) represents the initial roll angle, and a, b, c, d represent the quaternion;
根据所述四元数按照下列公式计算所述新航向角、所述新倾斜角以及所述新侧倾角:Calculating the new heading angle, the new tilt angle, and the new roll angle according to the quaternion according to the following formula:
θ(k+1)=arcsin(2(cd+ab))θ(k+1)=arcsin(2(cd+ab))
其中,
表示新航向角,θ(k+1)表示新倾斜角,γ(k+1)表示新侧倾角。
among them, Indicates the new heading angle, θ(k+1) represents the new tilt angle, and γ(k+1) represents the new roll angle.
可选地,所述确定所述双驱移动机器人的左右驱动轮的平均移动距离的步骤包括:根据下列公式计算所述双驱移动机器人的左右驱动轮的平均移动距离:
其中U(k)表示左右驱动轮平均移动距离,r表示驱动轮半径,π表示圆周率,n
R表示单个采样周期内右驱动轮编码器的脉冲数数量,n
L表示单个采样周期内右驱动轮编码器的脉冲数数量,n
total表示驱动轮旋转一圈的总脉冲数。
Optionally, the step of determining an average moving distance of the left and right driving wheels of the dual-drive mobile robot comprises: calculating an average moving distance of the left and right driving wheels of the dual-drive mobile robot according to the following formula: Where U(k) represents the average moving distance of the left and right driving wheels, r represents the driving wheel radius, π represents the pi, n R represents the number of pulses of the right drive wheel encoder in a single sampling period, and n L represents the right drive wheel in a single sampling period The number of pulses of the encoder, n total represents the total number of pulses of one revolution of the drive wheel.
可选地,所述根据所述初始横坐标、所述初始纵坐标、所述新航向角以及所述左右驱动轮的平均移动距离确定所述双驱移动机器人的新横坐标和新纵坐标的步骤包括:根据所述初始横坐标、所述新航向角以及所述左右驱动轮的平均移动距离按照下列公式确定所述新横坐标:
其中X(k+1)表示新横坐标,X(k)表示初始横坐标;根据所述初始纵坐标、所述新航向角以及所述左右驱动轮的平均移动距离按照下列公式确定所述新纵坐标:
其中Y(k+1)表示新纵坐标,Y(k)表示初始纵坐标。
Optionally, the determining the new abscissa and the new ordinate of the dual-drive mobile robot according to the initial abscissa, the initial ordinate, the new heading angle, and the average moving distance of the left and right driving wheels The step includes: determining the new abscissa according to the initial abscissa, the new heading angle, and the average moving distance of the left and right driving wheels according to the following formula: Where X(k+1) represents the new abscissa and X(k) represents the initial abscissa; the new ordinate is determined according to the initial ordinate, the new heading angle and the average moving distance of the left and right driving wheels according to the following formula Y-axis: Where Y(k+1) represents the new ordinate and Y(k) represents the initial ordinate.
为实现发明目的,根据本发明的第二个方面,提供了一种用于双驱移动机器人的定位装置,包括:获取模块,获取所述双驱移动机器人的初始横坐标、初始纵坐标、初始航向角、初始倾斜角、初始侧倾角;角度计算模块,用于根据所述初始航向角、所述初始倾斜角以及所述初始侧倾角确定所述双驱移动机器人的新航向角、新倾斜角以及新侧倾角;距离计算模块,用于确定所述双驱移动机器人的左右驱动轮的平均移动距离;坐标计算模块,用于根据所述初始横坐标、所述初始纵坐标、所述新航向角以及所述左右驱动轮的平均移动距离确定所述双驱移动机器人的新横坐标和新纵坐标。In order to achieve the object of the invention, according to a second aspect of the present invention, a positioning apparatus for a dual-drive mobile robot includes: an acquisition module for acquiring an initial abscissa, an initial ordinate, and an initial of the dual-drive mobile robot a heading angle, an initial tilt angle, an initial roll angle; an angle calculation module, configured to determine a new heading angle and a new tilt angle of the dual-drive mobile robot according to the initial heading angle, the initial tilt angle, and the initial roll angle And a new roll angle; a distance calculation module, configured to determine an average moving distance of the left and right driving wheels of the dual-drive mobile robot; a coordinate calculation module, configured to determine, according to the initial abscissa, the initial ordinate, the new heading The angle and the average moving distance of the left and right driving wheels determine a new abscissa and a new ordinate of the dual-drive mobile robot.
可选地,所述角度计算模块还用于:Optionally, the angle calculation module is further configured to:
根据所述初始航向角、所述初始倾斜角以及所述初始侧倾角按照下列公式计算四元数:Calculating the quaternion according to the initial heading angle, the initial tilt angle, and the initial roll angle according to the following formula:
其中,
表示初始航向角,θ(k)表示初始倾斜角,γ(k)表示初始侧倾角,a、b、c、d表示四元数;
among them, Indicates the initial heading angle, θ(k) represents the initial tilt angle, γ(k) represents the initial roll angle, and a, b, c, d represent the quaternion;
根据所述四元数按照下列公式计算所述新航向角、所述新倾斜角以及所述新侧倾角:Calculating the new heading angle, the new tilt angle, and the new roll angle according to the quaternion according to the following formula:
θ(k+1)=arcsin(2(cd+ab))θ(k+1)=arcsin(2(cd+ab))
其中,
表示新航向角,θ(k+1)表示新倾斜角,γ(k+1)表示新侧倾角。
among them, Indicates the new heading angle, θ(k+1) represents the new tilt angle, and γ(k+1) represents the new roll angle.
可选地,所述距离计算模块还用于:根据下列公式计算所述双驱移动机器人的左右驱动轮的平均移动距离:
其中U(k)表示左右驱动轮平均移动距离,r表示驱动轮半径,π表示圆周率,n
R表示单个采样周期内右驱动轮编码器的脉冲数数量,n
L表示单个采样周期内右驱动轮编码器的脉冲数数量,n
total表示驱动轮旋转一圈的总脉冲数。
Optionally, the distance calculation module is further configured to: calculate an average moving distance of the left and right driving wheels of the dual-drive mobile robot according to the following formula: Where U(k) represents the average moving distance of the left and right driving wheels, r represents the driving wheel radius, π represents the pi, n R represents the number of pulses of the right drive wheel encoder in a single sampling period, and n L represents the right drive wheel in a single sampling period The number of pulses of the encoder, n total represents the total number of pulses of one revolution of the drive wheel.
可选地,所述坐标计算模块还用于:根据所述初始横坐标、所述新航向角以及所述左右驱动轮的平均移动距离按照下列公式确定所述新横坐标:
其中X(k+1)表示新横坐标,X(k)表示初始横坐标;根据所述初始纵坐标、所述新航向角以及所述左右驱动轮的平均移动距离按照下列公式确定所述新纵坐标:
其中Y(k+1)表示新纵坐标,Y(k)表示初始纵坐标。
Optionally, the coordinate calculation module is further configured to: determine the new abscissa according to the initial abscissa, the new heading angle, and the average moving distance of the left and right driving wheels according to the following formula: Where X(k+1) represents the new abscissa and X(k) represents the initial abscissa; the new ordinate is determined according to the initial ordinate, the new heading angle and the average moving distance of the left and right driving wheels according to the following formula Y-axis: Where Y(k+1) represents the new ordinate and Y(k) represents the initial ordinate.
为实现发明目的,根据本发明的第三个方面,提供了一种用于双驱移动机器人的定位的电子设备。In order to achieve the object of the invention, according to a third aspect of the invention, an electronic device for positioning of a two-wheel drive mobile robot is provided.
本发明实施例的一种电子设备,包括:一个或多个处理器;存储装置,用于存储一个或多个程序,当所述一个或多个程序被所述一个或多个处理器执行,使得所述一个或多个处理器实现本发明实施例的一种用于双驱机器人的定位方法。An electronic device according to an embodiment of the present invention includes: one or more processors; and storage means 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 are caused to implement a positioning method for a dual-drive robot according to an embodiment of the present invention.
为实现发明目的,根据本发明的第四个方面,提供了一种用于双驱移动机器人的定位的计算机可读存储介质。In order to achieve the object of the invention, according to a fourth aspect of the invention, a computer readable storage medium for positioning of a dual drive mobile robot is provided.
本发明实施例的一种计算机可读存储介质,其上存储有计算机程序,所述程序被处理器执行时实现本发明实施例的一种用于双驱机器人的定位方法。A computer readable storage medium according to an embodiment of the present invention, wherein a computer program is stored thereon, and when the program is executed by the processor, a positioning method for a dual-drive robot according to an embodiment of the present invention is implemented.
根据本发明的技术方案是将惯性系统与编码器相互融合的导航定位技术方案,结合两者的优势,利用惯导算法确定航向角,利用编码测距算法确定位移,然后利用航向角和位移得到一个较精确的机器人位姿信息。本发明实施方式的用于双驱移动机器人的定位方法以及定位装置可以对复杂的工况和地面环境有交强的纠错和抗干扰能力,比单一传感器导航定位有更高的可靠性。需要说明的是,上述的非惯用的可选方式所具有的进一步效果将在下文中结合具体实施方式加以说明。The technical solution according to the present invention is a navigation and positioning technology scheme in which an inertial system and an encoder are integrated with each other, and combines the advantages of both, uses an inertial navigation algorithm to determine a heading angle, uses a coded ranging algorithm to determine the displacement, and then uses the heading angle and the displacement to obtain A more accurate robot pose information. The positioning method and the positioning device for the dual-drive mobile robot according to the embodiment of the present invention can have strong error correction and anti-interference ability for complex working conditions and the ground environment, and have higher reliability than single sensor navigation and positioning. It should be noted that the further effects of the above non-conventional alternatives will be described below in conjunction with the specific embodiments.
附图说明DRAWINGS
附图用于更好地理解本发明,不构成对本发明的不当限定。其中:The drawings are intended to provide a better understanding of the invention and are not intended to limit the invention. among them:
图1是根据本发明实施方式的用于双驱移动机器人的定位方法的主要步骤的流程示意图;1 is a flow chart showing main steps of a positioning method for a two-wheel drive mobile robot according to an embodiment of the present invention;
图2是根据本发明实施方式的用于双驱移动机器人的定位装置的主要模块的结构示意图。2 is a schematic structural diagram of main modules of a positioning device for a two-wheel drive mobile robot according to an embodiment of the present invention.
具体实施方式detailed description
以下结合附图对本发明的示范性实施方式做出说明,其中包括本发明实施方式的各种细节以助于理解,应当将它们认为仅仅是示范性的。因此,本领域普通技术人员应当认识到,可以对这里描述的实施方式做出各种改变和修改,而不会背离本发明的范围和精神。同样,为了清楚和简明,以下的描述中省略了对公知功能和结构的描述。The exemplary embodiments of the present invention are described with reference to the accompanying drawings, which are in the Accordingly, it will be apparent to those skilled in the art that various modifications and changes can be made to the embodiments described herein without departing from the scope and spirit of the invention. Also, descriptions of well-known functions and constructions are omitted in the following description for clarity and conciseness.
图1是根据本发明实施方式的用于双驱移动机器人的定位方法的主要步骤的流程示意图。如图1所示,该实施方式的用于双驱移动机器人的定位方法可以包括如下的步骤A至步骤D。1 is a flow chart showing the main steps of a positioning method for a two-wheel drive mobile robot according to an embodiment of the present invention. As shown in FIG. 1, the positioning method for the two-wheel drive mobile robot of this embodiment may include the following steps A to D.
步骤A:获取双驱移动机器人的初始横坐标、初始纵坐标、初始航向角、初始倾斜角、初始侧倾角。Step A: Obtain the initial abscissa, the initial ordinate, the initial heading angle, the initial tilt angle, and the initial roll angle of the dual-drive mobile robot.
步骤B:根据初始航向角、初始倾斜角以及初始侧倾角确定双驱移动机器人的新航向角、新倾斜角以及新侧倾角。Step B: Determine the new heading angle, the new tilt angle, and the new roll angle of the dual-drive mobile robot according to the initial heading angle, the initial tilt angle, and the initial roll angle.
步骤C:确定双驱移动机器人的左右驱动轮的平均移动距离。Step C: Determine the average moving distance of the left and right driving wheels of the dual-drive mobile robot.
步骤D:根据初始横坐标、初始纵坐标、新航向角以及左右驱动轮的平均移动距离确定双驱移动机器人的新横坐标和新纵坐标。Step D: Determine the new abscissa and the new ordinate of the dual-drive mobile robot according to the initial abscissa, the initial ordinate, the new heading angle, and the average moving distance of the left and right driving wheels.
可选地,步骤B中可以利用惯导算法根据初始航向角、初始倾斜角以及初始侧倾角确定双驱移动机器人的新航向角、新倾斜角以及新侧倾角,具体过程如下。Optionally, in step B, the homing algorithm can determine the new heading angle, the new tilt angle, and the new roll angle of the dual-drive mobile robot according to the initial heading angle, the initial tilt angle, and the initial roll angle. The specific process is as follows.
首先,根据初始航向角、初始倾斜角以及初始侧倾角按照下列公式计算四元数。其中,
表示初始航向角,θ(k)表示初始倾斜角,γ(k)表示初始侧倾角,a、b、c、d表示四元数。
First, the quaternion is calculated according to the following formula according to the initial heading angle, the initial tilt angle, and the initial roll angle. among them, Indicates the initial heading angle, θ(k) represents the initial tilt angle, γ(k) represents the initial roll angle, and a, b, c, d represent the quaternion.
由于双驱移动机器人运动引起姿态角的变化,四元数随之变化,更新方程为:Due to the change of the attitude angle caused by the motion of the double-drive mobile robot, the quaternion changes accordingly, and the update equation is:
用四阶毕卡法求解该微分方程,得到解为:The fourth-order Pika method is used to solve the differential equation and the solution is:
其中:among them:
设采样间隔为Δt,则:
其中
为陀螺仪测量出来的三个分量。
Let the sampling interval be Δt, then: among them The three components measured for the gyroscope.
通过解算出的四元数可以得到更新后的方向余弦矩阵:The updated direction cosine matrix can be obtained by solving the calculated quaternion:
从而可以计算新航向角
新倾斜角θ(k+1)、以及新侧倾角γ(k+1),计算公式如下:
Thereby calculating the new heading angle The new tilt angle θ(k+1) and the new roll angle γ(k+1) are calculated as follows:
θ(k+1)=arcsin(2(cd+ab))θ(k+1)=arcsin(2(cd+ab))
可选地,步骤C可以利用编码测距算法来确定双驱移动机器人的左右驱动轮的平均移动距离。具体过程如下。Optionally, step C may utilize an encoding ranging algorithm to determine an average moving distance of the left and right driving wheels of the dual-drive mobile robot. The specific process is as follows.
由于左右驱动轮的平均移动距离应该等于左驱动轮的移动距离和右驱动轮的移动距离的平均值,因此可以根据下列公式计算左右驱动轮的平均移动距离:
其中U(k)表示左右驱动轮平均移动距离,r表示驱动轮半径,π表示圆周率,n
R表示单个采样周期内右驱动轮编码器的脉冲数数量,n
L表示单个采样周期内右驱动轮编码器的脉冲数数量,n
total表示驱动轮旋转一圈的总脉冲数。
Since the average moving distance of the left and right driving wheels should be equal to the average of the moving distance of the left driving wheel and the moving distance of the right driving wheel, the average moving distance of the left and right driving wheels can be calculated according to the following formula: Where U(k) represents the average moving distance of the left and right driving wheels, r represents the driving wheel radius, π represents the pi, n R represents the number of pulses of the right drive wheel encoder in a single sampling period, and n L represents the right drive wheel in a single sampling period The number of pulses of the encoder, n total represents the total number of pulses of one revolution of the drive wheel.
可选地,步骤D可以包括如下的步骤D1和步骤D2。Optionally, step D may include the following steps D1 and D2.
步骤D1:根据初始横坐标、新航向角以及左右驱动轮的平均移动距离按照下列公式确定新横坐标:
其中X(k+1)表示新横坐标,X(k)表示初始横坐标。
Step D1: Determine the new abscissa according to the initial abscissa, the new heading angle, and the average moving distance of the left and right driving wheels according to the following formula: Where X(k+1) represents the new abscissa and X(k) represents the initial abscissa.
步骤D2:根据初始纵坐标、新航向角以及左右驱动轮的平均移动距离按照下列公式确定新纵坐标:
其中Y(k+1)表示新纵坐标,Y(k)表示初始纵坐标。
Step D2: Determine the new ordinate according to the initial ordinate, the new heading angle, and the average moving distance of the left and right driving wheels according to the following formula: Where Y(k+1) represents the new ordinate and Y(k) represents the initial ordinate.
图2是根据本发明实施方式的用于双驱移动机器人的定位装置的主要模块的结构示意图。如图2所示,该实施方式的用于双驱移动机器人的定位装置20可以包括获取模块21、角度计算模块22、距离计算模块23和坐标计算模块24。2 is a schematic structural diagram of main modules of a positioning device for a two-wheel drive mobile robot according to an embodiment of the present invention. As shown in FIG. 2, the positioning device 20 for a two-wheel drive mobile robot of this embodiment may include an acquisition module 21, an angle calculation module 22, a distance calculation module 23, and a coordinate calculation module 24.
获取模块21用于获取双驱移动机器人的初始横坐标、初始纵坐标、初始航向角、初始倾斜角、初始侧倾角。The obtaining module 21 is configured to obtain an initial abscissa, an initial ordinate, an initial heading angle, an initial tilt angle, and an initial roll angle of the dual-drive mobile robot.
角度计算模块22用于根据初始航向角、初始倾斜角以及初始侧倾角确定双驱移动机器人的新航向角、新倾斜角以及新侧倾角。The angle calculation module 22 is configured to determine a new heading angle, a new tilt angle, and a new roll angle of the dual-drive mobile robot according to the initial heading angle, the initial tilt angle, and the initial roll angle.
距离计算模块23用于确定双驱移动机器人的左右驱动轮的平均 移动距离。The distance calculation module 23 is for determining the average moving distance of the left and right driving wheels of the two-wheel drive mobile robot.
坐标计算模块24用于根据初始横坐标、初始纵坐标、新航向角以及左右驱动轮的平均移动距离确定双驱移动机器人的新横坐标和新纵坐标。The coordinate calculation module 24 is configured to determine the new abscissa and the new ordinate of the dual-drive mobile robot according to the initial abscissa, the initial ordinate, the new heading angle, and the average moving distance of the left and right driving wheels.
可选地,角度计算模块22还用于:根据初始航向角、初始倾斜角以及初始侧倾角按照下列公式计算四元数:Optionally, the angle calculation module 22 is further configured to: calculate the quaternion according to the initial heading angle, the initial tilt angle, and the initial roll angle according to the following formula:
其中,
表示初始航向角,θ(k)表示初始倾斜角,γ(k)表示初始侧倾角,a、b、c、d表示四元数。
among them, Indicates the initial heading angle, θ(k) represents the initial tilt angle, γ(k) represents the initial roll angle, and a, b, c, d represent the quaternion.
以及角度计算模块22还用于根据四元数按照下列公式计算新航向角
新倾斜角θ(k+1)、以及新侧倾角γ(k+1)。
And the angle calculation module 22 is further configured to calculate a new heading angle according to the quaternion according to the following formula The new tilt angle θ(k+1) and the new roll angle γ(k+1).
θ(k+1)=arcsin(2(cd+ab))θ(k+1)=arcsin(2(cd+ab))
可选地,距离计算模块23还用于根据下列公式计算双驱移动机器人的左右驱动轮的平均移动距离:
其中U(k)表示左右驱动轮平均移动距离,r表示驱动轮半径,π表示圆周率,n
R表示单个采样周期内右驱动轮编码器的脉冲数数量,n
L表示单个采样周期内右驱动轮编码器的脉冲数数量,n
total表示驱动轮旋转一圈的总脉冲数。
Optionally, the distance calculation module 23 is further configured to calculate an average moving distance of the left and right driving wheels of the dual-drive mobile robot according to the following formula: Where U(k) represents the average moving distance of the left and right driving wheels, r represents the driving wheel radius, π represents the pi, n R represents the number of pulses of the right drive wheel encoder in a single sampling period, and n L represents the right drive wheel in a single sampling period The number of pulses of the encoder, n total represents the total number of pulses of one revolution of the drive wheel.
可选地,坐标计算模块24还用于:根据初始横坐标、新航向角以及左右驱动轮的平均移动距离按照下列公式确定新横坐标:
其中X(k+1)表示新横坐标,X(k)表示初始横坐标;根据初始纵坐标、新航向角以及左右驱动轮的平均移动距离按照下列公式确定新纵坐标:
其中Y(k+1)表示新纵坐标,Y(k)表示初始纵坐标。
Optionally, the coordinate calculation module 24 is further configured to: determine the new abscissa according to the initial formula, the new heading angle, and the average moving distance of the left and right driving wheels according to the following formula: Where X(k+1) represents the new abscissa and X(k) represents the initial abscissa; according to the initial ordinate, the new heading angle and the average moving distance of the left and right driving wheels, the new ordinate is determined according to the following formula: Where Y(k+1) represents the new ordinate and Y(k) represents the initial ordinate.
根据本发明实施方式的用于双驱移动机器人的定位方法以及定位装置是将惯性系统与编码器相互融合的导航定位技术方案,结合两者的优势,利用惯导算法确定航向角,利用编码测距算法确定位移,然后利用航向角和位移得到一个较精确的机器人位姿信息。本发明实施方式的用于双驱移动机器人的定位方法以及定位装置可以对复杂的工况和地面环境有交强的纠错和抗干扰能力,比单一传感器导航定位有更高的可靠性。The positioning method and the positioning device for the dual-drive mobile robot according to the embodiment of the present invention are a navigation and positioning technology scheme that fuses the inertial system and the encoder, and combines the advantages of the two, and uses the inertial navigation algorithm to determine the heading angle, and uses the coding test. The distance algorithm determines the displacement, and then uses the heading angle and displacement to obtain a more accurate robot pose information. The positioning method and the positioning device for the dual-drive mobile robot according to the embodiment of the present invention can have strong error correction and anti-interference ability for complex working conditions and the ground environment, and have higher reliability than single sensor navigation and positioning.
本发明还提供了一种用于双驱移动机器人的定位的业务处理系统。该业务处理系统包括存储器;以及耦接至所述存储器的处理器,所述处理器被配置为基于存储在所述存储器的指令执行本发明的用于双驱机器人的定位方法。The present invention also provides a service processing system for positioning of a two-wheel drive mobile robot. The business processing system includes a memory; and a processor coupled to the memory, the processor configured to perform the positioning method for a dual-drive robot of the present invention based on instructions stored in the memory.
本发明还提供了一种用于双驱移动机器人的定位的计算机可读存储介质,其上存储有计算机程序指令,该指令被处理器执行时实现本发明的用于双驱机器人的定位方法的步骤。The present invention also provides a computer readable storage medium for positioning of a two-drive mobile robot, on which computer program instructions are stored, which are executed by the processor to implement the positioning method for a dual-drive robot of the present invention. step.
上述具体实施方式,并不构成对本发明保护范围的限制。本领域技术人员应该明白的是,取决于设计要求和其他因素,可以发生各种各样的修改、组合、子组合和替代。任何在本发明的精神和原则之内所作的修改、等同替换和改进等,均应包含在本发明保护范围之内。The above specific embodiments do not constitute a limitation of the scope of the present invention. Those skilled in the art will appreciate that a wide variety of modifications, combinations, sub-combinations and substitutions can occur depending on design requirements and other factors. Any modifications, equivalent substitutions and improvements made within the spirit and scope of the invention are intended to be included within the scope of the invention.