Main Page
Modules
Namespaces
Classes
Files
File List
File Members
sm
csm
mbicp
MbICP2.h
Go to the documentation of this file.
1
/*************************************************************************************/
2
/* */
3
/* File: MbICP.h */
4
/* Authors: Luis Montesano and Javier Minguez */
5
/* Modified: 1/3/2006 */
6
/* */
7
/* This library implements the: */
8
/* */
9
/* J. Minguez, F. Lamiraux and L. Montesano */
10
/* Metric-Based Iterative Closest Point, */
11
/* Scan Matching for Mobile Robot Displacement Estimation */
12
/* IEEE Transactions on Roboticics (2006) */
13
/* */
14
/*************************************************************************************/
15
16
17
/* **************************************************************************************** */
18
// This file contains inner information of the MbICP that you want to see from the outside
19
/* **************************************************************************************** */
20
21
#ifndef MbICP2
22
#define MbICP2
23
24
#include "
TData.h
"
25
26
#ifdef __cplusplus
27
extern
"C"
{
28
#endif
29
30
31
// ************************
32
// Scan inner matching parameters
33
typedef
struct
{
34
/* --------------------- */
35
/* --- Thresold parameters */
36
/* Bw: maximum angle diference between points of different scans */
37
/* Points with greater Bw cannot be correspondent (eliminate spurius asoc.) */
38
/* This is a speed up parameter */
39
float
Bw
;
40
41
/* Br: maximum distance difference between points of different scans */
42
/* Points with greater Br cannot be correspondent (eliminate spurius asoc.) */
43
float
Br
;
44
45
/* --------------------- */
46
/* --- Inner parameters */
47
48
/* L: value of the metric */
49
/* When L tends to infinity you are using the standart ICP */
50
/* When L tends to 0 you use the metric (more importance to rotation */
51
float
LMET
;
52
53
/* laserStep: selects points of each scan with an step laserStep */
54
/* When laserStep=1 uses all the points of the scans */
55
/* When laserStep=2 uses one each two ... */
56
/* This is an speed up parameter */
57
int
laserStep
;
58
59
/* ProjectionFilter: */
60
/* Eliminate the points that cannot be seen given the two scans (see Lu&Millios 97) */
61
/* It works well for angles < 45 \circ*/
62
/* 1 : activates the filter */
63
/* 0 : desactivates the filter */
64
int
ProjectionFilter
;
65
66
/* MaxDistInter: maximum distance to interpolate between points in the ref scan */
67
/* Consecutive points with less Euclidean distance than MaxDistInter are considered to be a segment */
68
float
MaxDistInter
;
69
70
/* filtrado: in [0,1] sets the % of asociations NOT considered spurious */
71
float
filter
;
72
73
/* AsocError: in [0,1] */
74
/* One way to check if the algorithm diverges if to supervise if the number of associatios goes below a thresold */
75
/* When the number of associations is below AsocError, the main function will return error in associations step */
76
float
AsocError
;
77
78
/* --------------------- */
79
/* --- Exit parameters */
80
/* MaxIter: sets the maximum number of iterations for the algorithm to exit */
81
/* More iterations more chance you give the algorithm to be more accurate */
82
int
MaxIter
;
83
84
/* error_th: in [0,1] sets the maximum error ratio between iterations to exit */
85
/* In each iteration, the error is the residual of the minimization */
86
/* When error_th tends to 1 more precise is the solution of the scan matching */
87
float
error_th
;
88
89
/* errx_out,erry_out, errt_out: minimum error of the asociations to exit */
90
/* In each iteration, the error is the residual of the minimization in each component */
91
/* The condition is (lower than errx_out && lower than erry_out && lower than errt_out */
92
/* When error_XXX tend to 0 more precise is the solution of the scan matching */
93
float
errx_out,
erry_out
, errt_out;
94
95
/* IterSmoothConv: number of consecutive iterations that satisfity the error criteria */
96
/* (error_th) OR (errorx_out && errory_out && errt_out) */
97
/* With this parameter >1 avoids random solutions */
98
int
IterSmoothConv
;
99
100
}
TSMparams
;
101
102
103
// ---------------------------------------------------------------
104
// ---------------------------------------------------------------
105
// Variables definition
106
// ---------------------------------------------------------------
107
// ---------------------------------------------------------------
108
109
110
// ************************
111
// Static structure to initialize the SM parameters
112
extern
TSMparams
params
;
113
114
// Original points to be aligned
115
extern
Tscan
ptosRef
;
116
extern
Tscan
ptosNew
;
117
118
// At each step::
119
120
// Those points removed by the projection filter (see Lu&Millios -- IDC)
121
extern
Tscan
ptosNoView
;
// Only with ProjectionFilter=1;
122
123
// Structure of the associations before filtering
124
extern
TAsoc
cp_associations
[
MAXLASERPOINTS
];
125
extern
int
cntAssociationsT
;
126
127
// Filtered Associations
128
extern
TAsoc
cp_associationsTemp
[
MAXLASERPOINTS
];
129
extern
int
cntAssociationsTemp
;
130
131
// Current motion estimation
132
extern
Tsc
motion2
;
133
134
#ifdef __cplusplus
135
}
136
#endif
137
138
#endif
TSMparams::Br
float Br
Definition:
MbICP2.h:43
TSMparams::ProjectionFilter
int ProjectionFilter
Definition:
MbICP2.h:64
params
TSMparams params
Definition:
MbICP.c:57
ptosNew
Tscan ptosNew
Definition:
MbICP.c:61
TData.h
cntAssociationsTemp
int cntAssociationsTemp
Definition:
MbICP.c:69
ptosRef
Tscan ptosRef
Definition:
MbICP.c:60
cntAssociationsT
int cntAssociationsT
Definition:
MbICP.c:65
TSMparams::MaxIter
int MaxIter
Definition:
MbICP2.h:82
motion2
Tsc motion2
Definition:
MbICP.c:75
ptosNoView
Tscan ptosNoView
Definition:
MbICP.c:72
MAXLASERPOINTS
#define MAXLASERPOINTS
Definition:
TData.h:22
Tsc
Definition:
TData.h:42
TSMparams::IterSmoothConv
int IterSmoothConv
Definition:
MbICP2.h:98
TSMparams::LMET
float LMET
Definition:
MbICP2.h:51
cp_associationsTemp
TAsoc cp_associationsTemp[MAXLASERPOINTS]
Definition:
MbICP.c:68
TAsoc
Definition:
TData.h:56
TSMparams
Definition:
MbICP2.h:33
TSMparams::laserStep
int laserStep
Definition:
MbICP2.h:57
TSMparams::MaxDistInter
float MaxDistInter
Definition:
MbICP2.h:68
TSMparams::Bw
float Bw
Definition:
MbICP2.h:39
cp_associations
TAsoc cp_associations[MAXLASERPOINTS]
Definition:
MbICP.c:64
TSMparams::AsocError
float AsocError
Definition:
MbICP2.h:76
TSMparams::filter
float filter
Definition:
MbICP2.h:71
TSMparams::erry_out
float erry_out
Definition:
MbICP2.h:93
TSMparams::error_th
float error_th
Definition:
MbICP2.h:87
Tscan
Definition:
TData.h:48
csm
Author(s): Andrea Censi
autogenerated on Tue May 11 2021 02:18:23