Summary of the invention
The objective of the invention is to overcome the deficiencies in the prior art, provide a kind of for the method for positioning mobile robot that proofread and correct to paste code error, under the situation that does not increase hardware cost, solved the problem of pasting the robot fluctuation of service that code error causes.
The present invention solves its technical matters and takes following technical scheme to realize:
A kind of for proofreading and correct the method for positioning mobile robot that pastes code error, may further comprise the steps:
Step 1: lay the alignment code label that can be used for judging direction and code value on ground;
Step 2: set up default code value map file and revise the code value map file;
Step 3: deposit ideal value in default code value map file as default code value;
Step 4:AGV at first repeatedly measures the car body error amount, obtains the expectation value of car body error amount again with statistical method, and then obtains to paste the sign indicating number deviation and revise code value, will paste the sign indicating number deviation and revise code value to deposit correction code value map file in;
Step 5: will revise the code value map file and download in the AGV control device;
In the step 6:AGV motion process, the AGV control device calculates the pose of AGV under world coordinate system according to revising the code value map file, pastes code error thereby proofread and correct.
And described default code value and correction code value include lateral coordinates X, along slope coordinate Y and angle θ.
And described step 4 uses statistical method to calculate the time value of car body error amount and the step of correction code value is:
⑴ will preset the code value map file and download in the AGV control device;
⑵ AGV is in motion process, and the AGV control device repeatedly calculates the car body error amount according to default code value;
⑶ calculate the expectation value of car body error amount with statistical method;
⑷ the expectation value that code error equals the car body error amount is pasted in order;
⑸ add that by default code value pasting code error obtains to revise code value.
And the expectation value of described car body error amount is the car body AME.
And the detailed process that described step ⑵ calculates the car body error amount is as follows:
⑴ set up following three coordinate systems: image coordinate system (u, v), dolly coordinate system (x dolly, y dolly), world coordinate system (the x world, the y world);
⑵ calculate under the dolly coordinate system mobile robot's dolly with respect to deviation angle and the deviation position of sign indicating number;
⑶ calculate sign indicating number with respect to deviation position and the deviation angle of world coordinate system;
⑷ calculate mobile robot's dolly with respect to deviation angle and the deviation position of world coordinate system, thereby obtain mobile robot's position.
And the expectation value that described step ⑶ calculates the car body error amount with statistical method comprises following three kinds of methods:
⑴ many AGV read same sign indicating number, obtain a plurality of car body error amounts, calculate the expectation value of car body error amount;
⑵ pass through same sign indicating number from the AGV of mulitpath, obtains a plurality of car body error amounts, calculates the expectation value of car body error amount;
⑶ AGV reads same code value for many times, repeatedly obtains the car body error amount, calculates the expectation value of car body error amount.
And the method that described step 6 is calculated the pose of AGV under world coordinate system is: the pose of AGV under world coordinate system equals to revise the expectation value that code value adds the car body error amount.
Advantage of the present invention and good effect are:
Its error was obeyed certain statistical law when the present invention adopted under a kind of hypothesis average case dolly through a sign indicating number or a series of yards, then add up the average error value of this car body, and think that this error is owing to paste the design philosophy that code error causes, the AGV control device at first adopts the method for default code value repeatedly to measure the car body error, obtain the mean value of car body error again with statistical method, and order: the expectation value of pasting code error=car body error amount, add that by default code value pasting code error has obtained the correction code value, recalculate exact position and the attitude of AGV under world coordinate system by revising code value+subsides code error again, thereby solved AGV because pasting the fluctuation of service problem that code error causes, it adopts the processing mode of software to obtain and adopts two effects that code reader is same, effectively saved the Products Development cost.
Embodiment
Below in conjunction with accompanying drawing the present invention is further described.
Its error was obeyed certain statistical law when the present invention adopted under a kind of hypothesis average case dolly through a sign indicating number or a series of yards, then add up the average error value of this car body, and think that this error is owing to paste the design philosophy that code error causes, the AGV controller at first adopts the method for default code value repeatedly to measure the car body error, obtain the mean value of car body error again with statistical method, and order: paste code error=car body average error, add that by default code value pasting code error has obtained the correction code value, recalculate exact position and the attitude of AGV under world coordinate system by revising code value+subsides code error again, thereby solved AGV because pasting the fluctuation of service problem that code error causes.This method comprises the alignment code that all can be used for judging direction and code value to the type of alignment code on the ground without limits, and present embodiment is that example describes with the two-dimension code.
A kind of for proofreading and correct the method for positioning mobile robot that pastes code error, may further comprise the steps:
Step 1: lay the alignment code label that can be used for judging direction and code value on ground.
As shown in Figure 1, in the present embodiment, lay the two-dimension code that can be used for judging direction and code value on the ground, 1 meter at interval of two-dimension code, what Fig. 1 provided is world coordinate system, and its initial point can be taken from certain indoor corner as initial point, and two limits in this corner are as X-axis, the Y-axis of world coordinate system.
Step 2: set up default code value map file and revise the code value map file.
Paste the certain error of meeting generation in the sign indicating number process in reality, as can be seen from Figure 1, there are angular error in alignment code position (X2, Y5, θ), (X4, Y2, θ), (X2, Y3, θ), (X4, Y4, θ), alignment code coordinate (X3, Y1, θ) location error.In order to solve this position deviation problem, this step is set up two map files: default code value map file and correction code value map file.
Step 3: deposit ideal value in default code value map file as default code value;
Default code value map file does not consider to paste the error of sign indicating number, and default code value is desirable setting value, as shown in Figure 2.Default code value comprises lateral coordinates, along slope coordinate and angle: X, Y, θ, has 5 row, 5 row sign indicating numbers among Fig. 1, and the X value is respectively X1 to X5, and the Y value is respectively Y1 to Y5; Two groups of opposite side of hypothesis sign indicating number are parallel with X-axis, the Y-axis of world coordinate system respectively among Fig. 1, therefore, suppose that the θ angle is 0 degree or 90 degree.
Step 4:AGV at first repeatedly measures the car body error amount, obtains the expectation value of car body error amount again with statistical method, and then obtains to paste the sign indicating number deviation and revise code value, will paste the sign indicating number deviation and revise code value to deposit correction code value map file in;
This method uses statistical to calculate the expectation value of car body error amount, and in the present embodiment, the expectation value of car body error amount adopts average car body error amount.
The detailed process of this step is as follows:
1, will preset the code value map file downloads in the AGV control device;
2, AGV is in motion process, and the AGV control device repeatedly calculates the car body error amount according to default code value;
The present invention is based on patented claim formerly " based on mobile robot positioning system and the method for two-dimension code label " (number of patent application is 201310017927.1), this step is calculated the calculating that the car body error amount adopts car body error amount in this patented claim, and detailed process is as follows:
⑴ set up following three coordinate systems: image coordinate system (u, v), dolly coordinate system (x dolly, y dolly), world coordinate system (the x world, the y world);
⑵ calculate under the dolly coordinate system mobile robot's dolly with respect to deviation angle and the deviation position of sign indicating number;
1., the relation of uncalibrated image coordinate system and dolly coordinate system:
P
Dolly(x, y)=R * P
Image(u1, v1);
In the following formula:
P
Image(u1 v1) is the coordinate of 1 P1 in space in image coordinate system;
P
Dolly(x y) is the coordinate of 1 P1 in space under the dolly coordinate system;
R is the rotation matrix value;
2., one or more summits under the image coordinate system are converted to the dolly coordinate system, the coordinate after the conversion is:
P
The sign indicating number label(x1, y1)=R * P
The sign indicating number label(u1, v1);
P
The sign indicating number label(x2, y2)=R * P
The sign indicating number label(u2, v2);
P
The sign indicating number label(x3, y3)=R * P
The sign indicating number label(u3, v3);
P
The sign indicating number label(x4, y4)=R * P
The sign indicating number label(u4, v4);
In the following formula, P
The sign indicating number label(x1, y1), P
The sign indicating number label(x2, y2), P
The sign indicating number label(x3, y3), P
The sign indicating number label(x4 y4) is four apex coordinates of sign indicating number in the dolly coordinate system, P
The sign indicating number label(u1, v1), P
The sign indicating number label(u2, v2), P
The sign indicating number label(u3, v3), P
The sign indicating number label(u4 v4) is four apex coordinates of sign indicating number in image coordinate system;
3., mobile robot's dolly changes θ with respect to the attitude of sign indicating number label under the counting of carriers coordinate system
1
θ
1=atan2 (Point2.x+Point3.x-Point1.x-Point4.x, Point2.y+Point3.y-Point1.y-Point4.y; In the following formula, Point1.x, Point2.x, Point3.x, Point4.x are the X-axis coordinate on four summits of sign indicating number label under the dolly coordinate system; Point1.y, Point2.y, Point3.y, Point4.y are the Y-axis coordinate on four summits of sign indicating number label under the dolly coordinate system;
4., calculate yard coordinate (X of tag hub point in the dolly coordinate system
The sign indicating number center, Y
The sign indicating number center):
X
The sign indicating number center=(Point1.x+Point2.x+Point3.x+Point4.x)/4;
Y
The sign indicating number center=(Point1.y+Point2.y+Point3.y+Point4.y)/4;
X
The sign indicating number center, Y
The sign indicating number center, wherein, X
The sign indicating number centerBe the X-axis coordinate of regular two-dimension code composite label central point under the dolly coordinate system, Y
The sign indicating number centerY-axis coordinate for regular two-dimension code composite label central point under the dolly coordinate system;
5., calculate whole the coordinate P of image center in image coordinate system
Picture centre(u, v):
Computing method are: directly respectively reducing by half with the length and width size of whole image obtains again;
6., the center point coordinate with whole image is converted to dolly coordinate system coordinate:
P
Picture centre(x, y)=R * P
Picture centre(u, v), in the following formula, X
Picture centreBe the X-axis coordinate of image center under the dolly coordinate system, Y
Picture centreBe the Y-axis coordinate of image center under the dolly coordinate system;
7., under the counting of carriers coordinate system mobile robot's dolly with respect to the change in location of regular two-dimension code composite label:
Mobile robot's dolly is at the deviation x of directions X
1=X
The sign indicating number center-X
Picture centre
Mobile robot's dolly is at the deviation y of Y-direction
1=Y
The sign indicating number center-Y
Picture centre
⑶ calculate sign indicating number with respect to deviation position and the deviation angle of world coordinate system;
Alignment code is relative static with respect to the deviation position of world coordinate system with deviation angle, can disposablely determine when laying two-dimension code.
⑷ calculate mobile robot's dolly with respect to deviation angle and the deviation position of world coordinate system, thereby obtain mobile robot's exact position.
3, AGV adopts the average car body error amount of statistical method compute location sign indicating number, and concrete steps are as follows:
⑴ many AGV read same code value, obtain a plurality of car body error amounts, calculate average car body error amount;
Therefore AGV itself may, adopt many AGV to obtain mean value because the mechanicalness error causes the error of car body and sign indicating number;
⑵ pass through same sign indicating number from the AGV of mulitpath, obtains a plurality of car body error amounts, calculates average car body error amount;
Path by an alignment code generally has four: front, rear, left and right; Since same alignment code close on the sign indicating number may produce error to it, therefore, get the mean value that four paths car body error amounts get.
⑶ AGV reads same code value for many times, repeatedly obtains the car body error amount, calculates average car body error amount.
4, order: paste code error=average car body error amount;
Because its error was obeyed certain statistical law when the present invention adopted under a kind of hypothesis average case dolly through a sign indicating number or a series of yards, then add up the average error value of this car body, and think that this error is owing to paste the design philosophy that code error causes, so, order: paste code error=average car body error amount.
5, revise code value=default code value+subsides code error;
When the subsides code error is negative, default code value-subsides code error=correction code value;
When the subsides code error is positive number, default code value+subsides code error=correction code value.
Be the computation process that code value is revised in the example explanation with alignment code (X2, Y5, θ), (X3, Y1, θ) below, as shown in Figures 3 and 4.
For alignment code (X2, Y5, θ), at first calculate the car body error amount:
? |
The X-axis error |
The Y-axis error |
The θ angular error |
The 1st time |
0 |
0 |
0.9 |
The 2nd time |
0 |
0 |
1 |
The 3rd time |
0 |
0 |
1.1 |
The 4th |
0 |
0 |
0.8 |
The 5th |
0 |
0 |
1 |
The 6th time |
0 |
0 |
1 |
The 7th time |
0 |
0 |
1.2 |
The 8th time |
0 |
0 |
1.1 |
The 9th time |
0 |
0 |
0.9 |
The 10th time |
0 |
0 |
1 |
Obtain mean value: (0.9+1+1.1+0.8+1+1+1.2+1.1+0.9+1)/10=1
Then, calculate the modified value of sign indicating number: the relative position error θ that records AGV and sign indicating number with statistical method
The car body deviation=+1
0, description code is at the right side of AGV, then θ
Paste code error=-1
0, then revise back: θ
Revise code value=90
0-1
0=89
0
For alignment code (X3, Y1, θ), at first calculate the car body error amount:
? |
The X-axis error |
The Y-axis error |
The θ angular error |
The 1st time |
-2 |
0 |
0 |
The 2nd time |
-2 |
0 |
0 |
The 3rd time |
-2 |
0 |
0 |
The 4th |
-3 |
0 |
0 |
The 5th |
-2 |
0 |
0 |
The 6th time |
-1.5 |
0 |
0 |
The 7th time |
-2 |
0 |
0 |
The 8th time |
-1 |
0 |
0 |
The 9th time |
-2 |
0 |
0 |
The 10th time |
-2.5 |
0 |
0 |
Obtain mean value: (2-2-2-3-2-1.5-2-1-2-2.5)/10=2
Then, calculate the correction code value of this alignment code: the relative position error X that records AGV and alignment code with statistical method
The car body deviation=+2, description code is at the right side of AGV, X
Paste the sign indicating number deviation=-2, then revise back: X
Revise code value=X3-2.
5, will paste code error and correction code value deposits in the correction code value map file.
Step 5: will revise the code value map file and download in the AGV control device.
In the step 6:AGV motion process, the AGV control device pastes code error according to revising the pose of code value calculating under world coordinate system thereby proofread and correct.
As shown in Figure 4, for alignment code (X2, Y5, θ), AGV proofreaies and correct and pastes code error value: θ
Car is proofreaied and correct=θ
Sign indicating number is revised-(1
0)=90
0For alignment code (X2, Y3, θ), AGV proofreaies and correct and pastes code error value: θ
Car is proofreaied and correct=θ
Sign indicating number is revised-(2
0)=90
0For alignment code (X3, Y1, θ), AGV proofreaies and correct and pastes code error value: X
Car is proofreaied and correct=X
Revise code value+ (2).
It is emphasized that; embodiment of the present invention is illustrative; rather than it is determinate; therefore the present invention includes and be not limited to the embodiment described in the embodiment; every other embodiments that drawn by those skilled in the art's technical scheme according to the present invention belong to the scope of protection of the invention equally.