Background technology
Along with industrial machine man-based development in recent years, drive the turn up gradually of service robot industry, Intelligent hardware field simultaneously from 2014 also starts projection, according to the statistics of alliance of international robot, within 2015, service robot sales volume will reach 8,500,000,000 dollars, and keep 20% ~ 30% higher rate of growth, in Intelligent hardware field, according to Ai Rui research, within 2014, global Intelligent hardware installation amount reaches 6,000,000,000, and estimating 2017 will more than 14,000,000,000.
In the behind of market high speed development, problem is obvious equally, the potentiality in market are also excavated out far away on the one hand, on the other hand, robot and Intelligent hardware enter feature modeling and the recognition technology that service industry also also exists some technological difficulties, particularly three-dimensional environment, and such as robot enters in actual home environment, carry out Context awareness and autonomous safely etc., all also have certain technological difficulties at present.
Goal of the invention
Fundamental purpose of the present invention is exactly solve to represent and identification problem based on the environmental characteristic after the environmental modeling of 3 d grid map, it provides a kind of method, make the environmental characteristic based on 3 d grid map, be convenient to store and calculate, thus reach the convenient object identified, for other practical applications provide technical support.Can be, but not limited to be applied in the robot game towards family and robot cleaner aspect.
Technical scheme
The object of the present invention is achieved like this: by relevant device and algorithm, such as three-dimensional laser radar etc., obtain the 3 d grid cartographic information of actual environment, system is represented through environmental characteristic, calculate and store the feature of volume elements in 3 d grid map, after the information setting required target volume elements, by environmental characteristic recognition system, in 3 d grid map, match all required candidate's volume elements.It comprises the following steps:
(1) in environmental characteristic expression system, consider the convenience of calculating, we set one affects distance delta, and namely barrier volume elements is to the coverage of periphery volume elements, and σ can be but be not limited to Euclidean distance, Manhattan (Manhattan) distance etc.Simultaneously also in order to convenience of calculation, volume elements x [δ on influenced all average discrete to eight driftage faces of volume elements x
0, δ
π/4, δ
pi/2, δ
3 π/4, δ
π, δ
5 π/4, δ
3 pi/2s, δ
7 π/4], then each driftage face δ
iin to affect component all discrete to driftage face δ
i[η on eight interior angles of pitch
0, η
π/12, η
π/4, η
5 π/12, η
7 π/12, η
3 π/4, η
11 π/12, η
π], form suffered influence matrix f (x) of volume elements x, and the eigenmatrix of suffered influence matrix f (x) of calculated body element x and characteristic spectrum, provide the computing method of two kinds of eigenmatrixes and characteristic spectrum here,
(2) in environmental characteristic expression system, each element of the influence matrix of each idle volume elements is initialized as 0, analyze the impact of each barrier volume elements on all volume elements in σ distance one by one, such as, in the process analyzed, the yaw angle of the relative volume elements x of barrier volume elements ξ is θ, luffing angle is β, distance is d, d≤σ, then barrier volume elements ξ to the influence function of volume elements x can be but be not limited to f (x
β, θ, d)=1/d, if θ is just on a certain driftage face of volume elements x, then directly to superpose on this driftage face, if θ is between certain two driftage face, such as θ ∈ (π/4, pi/2), then decompose, f (x according to vector
β, θ, d) decompose project to driftage face δ
π/4on vector f
awith driftage face δ
pi/2on vector f
b(two projection vector f
awith f
bequal with Z axis angle, and with f (x
β, θ, d) coplanar), by same vector decomposition method more respectively vector f
awith f
bdecomposition projects on adjacent two angle of pitch directions in each driftage face, and after completing all obstructing objects meta analysises, the influence matrix of each volume elements completes as calculated, and is stored in grid, is designated as:
(3) in environmental characteristic expression system, consider the convenience of calculating, we ask for eigenmatrix F (x) of f (x), and are stored in grid:
Method one, ask for F (x) by two-dimensional fourier transform, make transformation operator
obtain according to fast two-dimensional Fourier transformation calculations,
Method two, asks for F (x) by Walsh conversion, makes transformation operator
calculate according to fast two-dimensional WalshHadama conversion,
8x8 matrix in above-mentioned formula is the WalshHadama transformation matrix of 8 dimensions, different dimensions, and corresponding WalshHadama transformation matrix is not identical, wherein:
(4) in environmental characteristic expression system, consider the convenience of calculating, we ask for the characteristic spectrum P (x) of eigenmatrix F (x), and are stored in grid:
Method one, convert eigenmatrix F (x) obtained according to fast two-dimensional Fourier, Wo Menyou,
By asking modular arithmetic, characteristic spectrum element P (x) [i] [j]=| F (x) [i] [j] |=| F
i+1, j+1|, i, j ∈ [0,7]
Method two, convert eigenmatrix F (x) obtained according to fast two-dimensional WalshHadama, Wo Menyou,
(5) in environmental characteristic recognition system, we set threshold value degree
threshold, and construct the influence matrix of targeted environment volume elements y
two-dimentional WalshHadama transform method is used according to above step, ask for characteristic of correspondence spectrum P (y), all volume elements x searched for by 3 d grid map, and the corresponding characteristic spectrum of comparison, remember that the angle between vectorial P (x) and vectorial P (y) is ∠ (P (x), P (y))≤degree
threshold, calculate
if cos is ∠ (P (x), P (y))>=cos (degree
threshold), just represent that volume elements x is similar to target volume elements y in actual environment, matches the volume elements of one of them candidate,
(6) represent and recognition system through environmental characteristic, we can successfully find out all with environment that is object matching, for subsequent applications provides support.
System used in the present invention is composed as follows: environmental characteristic represents system, environmental characteristic recognition system.These two systems are the software systems according to function setting, and each subsystem concrete function is as follows:
* environmental characteristic represents system: on existing 3 d grid map, analyzes relevant volume elements, calculates and stores influence matrix, eigenmatrix, the characteristic spectrum of volume elements,
* environmental characteristic recognition system: provide the volume elements influence matrix that desired environment is corresponding, the 3 d grid map of existing volume elements feature is searched for and searches, and matches all with volume elements like expectation environment facies.
Embodiment
Below in conjunction with accompanying drawing, embodiments of the present invention are described.
The inventive method overall system architecture used can with reference to figure 1, and it is made up of two subsystems, specifically comprises following steps:
The first step
First, environmental characteristic represents system, definition distance is Euclidean distance, setting affects distance delta=4, namely barrier volume elements only affects the volume elements within peripheral distance 4, as the 3 d grid map that Fig. 2 (a) is environment, the impact vector of Fig. 2 (b) barrier volume elements and decomposition method:
f(x
β,θ,d)=f
1+f
2
=f
1+ f
3+ f
4(f
3with f
4f
2component on two adjacent driftage faces)
=f '
3+ f '
4+ f
3+ f
4(f
1by f
3with f
4the long ratio of mould resolve into f '
3with f '
4)
=(f′
3+f
3)+(f′
4+f
4)
=f
a+ f
b(f
awith f
bequal with Z axis angle)
Go off course on faces and eight angles of pitch to eight discrete for the impact of volume elements by Fig. 3 (a) Suo Shi, the matrix after discrete is as shown in Fig. 3 (b).
Secondly, environmental characteristic recognition system, setting degree
threshold=5 °.
Second step
Environmental characteristic represents system, the element f of the influence matrix of each volume elements of initialization
ij=0, i, j ∈ [1,8], each volume elements one by one in scanning three-dimensional grating map, on each barrier volume elements total calculation on the impact of periphery volume elements.
Such as, as shown in Figure 4, barrier volume elements (1,1,1) affects f (x to volume elements (2,1,1)
pi/2, π, 1)=1, affects the driftage face of discretize to volume elements (2,1,1) with on the angle of pitch to this, easily knows f (x
pi/2, π, 1) just at driftage face δ
πon, and at angle of pitch η
5 π/12with η
7 π/12between, so the mode of decomposing by vector, only need f (x
pi/2, π, 1) project to angle of pitch η
5 π/12with η
7 π/12upper, know f (x by Fig. 2 and Fig. 3
pi/2, π, 1) decompose later obtaining:
In like manner, barrier volume elements (1,2,1) is to the impact of volume elements (2,1,1)
discrete to driftage face δ
3 π/4on angle of pitch η
5 π/12with η
7 π/12on, after decomposition:
Barrier volume elements (1,3,1) is to the impact of volume elements (2,1,1)
discrete to driftage face δ
3 π/4with driftage face δ
pi/2be respectively after upper:
Again f
awith f
bproject to the angle of pitch η on affiliated driftage face
5 π/12with η
7 π/12on, after decomposition:
Barrier volume elements (1,1,2) is to the impact of volume elements (2,1,1)
discrete to driftage face δ
πon angle of pitch η
π/4on, after decomposition:
Barrier volume elements (1,2,2) is to the impact of volume elements (2,1,1)
discrete to driftage face δ
3 π/4on angle of pitch η
π/4with η
5 π/12on, after decomposition:
Barrier volume elements (1,3,2) is to the impact of volume elements (2,1,1)
discrete to driftage face δ
3 π/4with driftage face δ
pi/2be respectively (coordinate in each driftage face represents, does not consider directivity) after upper:
Again f
awith f
bproject to the angle of pitch η on affiliated driftage face
5 π/12with η
π/4on, as follows:
?
After decomposition:
Barrier volume elements (1,1,3) is to the impact of volume elements (2,1,1)
discrete to driftage face δ
πon angle of pitch η
5 π/12with η
π/4after upper:
Barrier volume elements (1,2,3) is to the impact of volume elements (2,1,1)
discrete to driftage face δ
3 π/4on angle of pitch η
π/4with η
π/12on, after decomposition:
Barrier volume elements (1,3,3) is to the impact of volume elements (2,1,1)
discrete to driftage face δ
3 π/4with driftage face δ
pi/2be respectively after upper:
Again f
awith f
bproject to the angle of pitch η on affiliated driftage face
5 π/12with η
π/4on, as follows:
?
After decomposition:
To sum up, the influence matrix suffered by volume elements (2,1,1)
3rd step
The eigenmatrix F (2,1,1) of the influence matrix f (2,1,1) of volume elements (2,1,1) is obtained, Wo Menyou according to Fast W alshHadama conversion:
4th step
Obtain the characteristic spectrum P (2,1,1) of volume elements (2,1,1) according to Fast W alshHadama conversion, by previous step eigenmatrix F (2,1,1) we have:
P(2,1,1)=[0.0051,0.0001,0.0057,0.0325]
5th step
In environmental characteristic recognition system, such as we are interested in Yishanmen, and we want the place found on 3 d grid map near door, first, construct the influence matrix of this fitting of door environment, as follows:
In like manner we have:
P(door)=[0.0045,0.0003,0.0064,0.0336]
6th step
By environmental characteristic recognition system, search for whole 3 d grid map, search all volume elements matched with P (door), such as we compare P (2,1,1) and P (door)
cos∠(P(2,1,1),P(door))=0.999625≥cos(degree
threshold)=0.996195
In like manner, we are interested in another Yishanmen, and we want the place found on 3 d grid map near door, and the influence matrix of environment is as follows:
We have equally:
P′(door)=[0.0045,0.0003,0.0064,0.0336]
To sum up, we can see that the characteristic spectrum P (door) of f (door) and f ' (door) and P ' (door) are identical, also be similar in actual environment, represented and recognition system by our environmental characteristic, these " door " environment all can be matched, this has just absolutely proved our system, for similar environment, there is rotational invariance, in the process of environmental characteristic identification, just greatly reduce exhaustive comparison number of times, the efficiency of whole method is high, the time complexity of whole method and the size of grating map are linear.