Main Page
Classes
Files
File List
File Members
src
perception
lidar_egomotion
src
mbicp
mbicp_aux.c
Go to the documentation of this file.
1
/**************************************************************************************************
2
Software License Agreement (BSD License)
3
4
Copyright (c) 2011-2013, LAR toolkit developers - University of Aveiro - http://lars.mec.ua.pt
5
All rights reserved.
6
7
Redistribution and use in source and binary forms, with or without modification, are permitted
8
provided that the following conditions are met:
9
10
*Redistributions of source code must retain the above copyright notice, this list of
11
conditions and the following disclaimer.
12
*Redistributions in binary form must reproduce the above copyright notice, this list of
13
conditions and the following disclaimer in the documentation and/or other materials provided
14
with the distribution.
15
*Neither the name of the University of Aveiro nor the names of its contributors may be used to
16
endorse or promote products derived from this software without specific prior written permission.
17
18
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
19
IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
20
FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR
21
CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
22
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
23
DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER
24
IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
25
OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
26
***************************************************************************************************/
27
/*
28
* This program is free software; you can redistribute it and/or modify
29
* it under the terms of the GNU General Public License as published by
30
* the Free Software Foundation; either version 2 of the License, or
31
* (at your option) any later version.
32
*
33
* This program is distributed in the hope that it will be useful,
34
* but WITHOUT ANY WARRANTY; without even the implied warranty of
35
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
36
* GNU General Public License for more details.
37
*
38
* You should have received a copy of the GNU General Public License
39
* along with this program; if not, write to the Free Software
40
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
41
*
42
*/
43
49
#include "
MbICP.h
"
50
#include "
MbICP2.h
"
51
52
int
C_Fixed_Num_Readings
(
void
)
53
{
54
return
MAXLASERPOINTS
;
55
}
56
57
int
C_Num_Associations
(
float
max_dist)
58
{
59
int
result = 0;
60
int
i;
61
62
for
(i = 0; i <
cntAssociationsTemp
; i++) {
63
if
(
cp_associationsTemp
[i].dist <= max_dist)
64
result++;
65
}
66
67
return
result;
68
}
69
70
float
C_Mean_Error
(
void
)
71
{
72
float
error = 0.0;
73
int
i;
74
75
if
(
cntAssociationsTemp
== 0)
76
return
1000000.0f;
77
78
for
(i = 0; i <
cntAssociationsTemp
; i++) {
79
error +=
cp_associationsTemp
[i].
dist
;
80
}
81
82
return
error / (float)cntAssociationsTemp;
83
}
84
TAsoc::dist
float dist
Definition:
TData.h:101
MbICP.h
MbICP scan matcher main header.
C_Fixed_Num_Readings
int C_Fixed_Num_Readings(void)
Definition:
mbicp_aux.c:52
MbICP2.h
MbICP scan matcher modified main header.
C_Num_Associations
int C_Num_Associations(float max_dist)
Definition:
mbicp_aux.c:57
MAXLASERPOINTS
#define MAXLASERPOINTS
Definition:
TData.h:64
C_Mean_Error
float C_Mean_Error(void)
Definition:
mbicp_aux.c:70
cp_associationsTemp
TAsoc cp_associationsTemp[MAXLASERPOINTS]
Definition:
MbICP.c:114
cntAssociationsTemp
int cntAssociationsTemp
Definition:
MbICP.c:115
lidar_egomotion
Author(s): Jorge Almeida
autogenerated on Mon Mar 2 2015 01:32:10