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 
24 namespace msf_updates {
25 
26 /*
27  * This file contains the state definition of the EKF as defined for a given set
28  * of sensors / states to estimate
29  */
30 
31 enum StateDefinition { // Must not manually set the enum values!
32  p,
33  v,
34  q,
35  b_w,
36  b_a,
37  L,
42 };
43 
44 namespace {
45 
46 /***
47  * Setup core state, then auxiliary state.
48  */
49 typedef boost::fusion::vector<
50  // States varying during propagation - must not change the ordering here for
51  // now, CalcQ has the ordering hardcoded
54  msf_core::StateVar_T<Eigen::Matrix<double, 3, 1>, v,
55  msf_core::CoreStateWithPropagation>,
57  msf_core::CoreStateWithPropagation>,
58  msf_core::StateVar_T<Eigen::Matrix<double, 3, 1>, b_w,
60  msf_core::StateVar_T<Eigen::Matrix<double, 3, 1>, b_a,
61  msf_core::CoreStateWithoutPropagation>,
62 
63  // States not varying during propagation.
65  msf_core::StateVar_T<Eigen::Quaternion<double>, q_wv,
67  msf_core::StateVar_T<Eigen::Matrix<double, 3, 1>, p_wv>,
68  msf_core::StateVar_T<Eigen::Quaternion<double>, q_ic>,
69  msf_core::StateVar_T<Eigen::Matrix<double, 3, 1>, p_ic>
70 
71 > fullState_T;
72 }
73 
75 typedef shared_ptr<EKFState> EKFStatePtr;
76 typedef shared_ptr<const EKFState> EKFStateConstPtr;
77 
78 }
79 
80 #include <msf_updates/static_ordering_assertions.h> //DO NOT REMOVE THIS
81 #endif /* MSF_STATEDEF_HPP_ */