ethzasl-msf - Modular Sensor Fusion
Time delay compensated single and multi sensor fusion framework based on an EKF
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
msf_statedef.hpp
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_STATEDEF_HPP_
18 #define MSF_STATEDEF_HPP_
19 
20 #include <Eigen/Dense>
21 #include <msf_core/msf_fwds.h>
22 #include <boost/fusion/container.hpp>
23 #include <boost/static_assert.hpp>
24 
25 namespace msf_updates {
26 
27 /*
28  * This file contains the state definition of the EKF as defined for a given set
29  * of sensors / states to estimate.
30  */
31 
32 enum StateDefinition { // Must not manually set the enum values!
33  p,
34  v,
35  q,
36  b_w,
37  b_a,
38  p_ip
39 };
40 
41 namespace {
42 
43 /***
44  * Setup core state, then auxiliary state.
45  */
46 typedef boost::fusion::vector<
47  // States varying during propagation - must not change the ordering here for
48  // now, CalcQ has the ordering hardcoded.
51  msf_core::StateVar_T<Eigen::Matrix<double, 3, 1>, v,
52  msf_core::CoreStateWithPropagation>,
54  msf_core::CoreStateWithPropagation>,
55  msf_core::StateVar_T<Eigen::Matrix<double, 3, 1>, b_w,
57  msf_core::StateVar_T<Eigen::Matrix<double, 3, 1>, b_a,
58  msf_core::CoreStateWithoutPropagation>,
59 
60  // States not varying during propagation.
61  msf_core::StateVar_T<Eigen::Matrix<double, 3, 1>, p_ip>
62 > fullState_T;
63 }
64 
66 typedef boost::shared_ptr<EKFState> EKFStatePtr;
67 typedef boost::shared_ptr<const EKFState> EKFStateConstPtr;
68 }
69 
70 #include <msf_updates/static_ordering_assertions.h> //DO NOT REMOVE THIS
71 #endif /* MSF_STATEDEF_HPP_ */