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