ethzasl-msf - Modular Sensor Fusion
Time delay compensated single and multi sensor fusion framework based on an EKF
Main Page
Namespaces
Classes
Files
File List
File Members
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Macros
Pages
msf_core
include
msf_core
msf_sensorhandler.h
Go to the documentation of this file.
1
/*
2
* Copyright (C) 2012-2013 Simon Lynen, ASL, ETH Zurich, Switzerland
3
* You can contact the author at <slynen at ethz dot ch>
4
*
5
* Licensed under the Apache License, Version 2.0 (the "License");
6
* you may not use this file except in compliance with the License.
7
* You may obtain a copy of the License at
8
*
9
* http://www.apache.org/licenses/LICENSE-2.0
10
*
11
* Unless required by applicable law or agreed to in writing, software
12
* distributed under the License is distributed on an "AS IS" BASIS,
13
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
* See the License for the specific language governing permissions and
15
* limitations under the License.
16
*/
17
#ifndef MSF_SENSORHANDLER_H_
18
#define MSF_SENSORHANDLER_H_
19
20
namespace
msf_core {
25
template
<
typename
EKFState_T>
26
class
SensorHandler
{
27
friend
class
MSF_SensorManager
<EKFState_T> ;
28
int
lastseq_
;
29
protected
:
30
MSF_SensorManager<EKFState_T>
&
manager_
;
31
int
sensorID
;
32
std::string
topic_namespace_
;
33
std::string
parameternamespace_
;
34
void
setSensorID
(
int
ID) {
35
sensorID
= ID;
36
}
37
void
sequenceWatchDog
(
size_t
seq,
const
std::string& topic) {
38
if
((
int
) seq !=
lastseq_
+ 1 &&
lastseq_
!= 0) {
39
MSF_WARN_STREAM
(
40
topic <<
": message drop curr seq:"
<< seq <<
" expected: "
41
<<
lastseq_
+ 1);
42
}
43
lastseq_
= seq;
44
}
45
public
:
46
EIGEN_MAKE_ALIGNED_OPERATOR_NEW
;
47
48
SensorHandler
(
MSF_SensorManager<EKFState_T>
& mng,
49
const
std::string& topic_namespace,
50
const
std::string& parameternamespace)
51
:
lastseq_
(0),
52
manager_
(mng),
53
sensorID
(-1),
54
topic_namespace_
(topic_namespace),
55
parameternamespace_
(parameternamespace) {
56
}
57
virtual
~SensorHandler
() {
58
}
59
};
60
}
61
#endif // MSF_SENSORHANDLER_H_
Generated on Wed Nov 6 2013 22:21:53 for ethzasl-msf - Modular Sensor Fusion by
1.8.1.2