state.h
Go to the documentation of this file.
00001 /*
00002 
00003 Copyright (c) 2010, Stephan Weiss, ASL, ETH Zurich, Switzerland
00004 You can contact the author at <stephan dot weiss at ieee dot org>
00005 
00006 All rights reserved.
00007 
00008 Redistribution and use in source and binary forms, with or without
00009 modification, are permitted provided that the following conditions are met:
00010 * Redistributions of source code must retain the above copyright
00011 notice, this list of conditions and the following disclaimer.
00012 * Redistributions in binary form must reproduce the above copyright
00013 notice, this list of conditions and the following disclaimer in the
00014 documentation and/or other materials provided with the distribution.
00015 * Neither the name of ETHZ-ASL nor the
00016 names of its contributors may be used to endorse or promote products
00017 derived from this software without specific prior written permission.
00018 
00019 THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
00020 ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
00021 WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
00022 DISCLAIMED. IN NO EVENT SHALL ETHZ-ASL BE LIABLE FOR ANY
00023 DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
00024 (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
00025 LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
00026 ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
00027 (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
00028 SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
00029 
00030 */
00031 
00032 #ifndef STATE_H_
00033 #define STATE_H_
00034 
00035 #include <Eigen/Dense>
00036 #include <Eigen/Geometry>
00037 #include <vector>
00038 #include <ssf_core/eigen_conversions.h>
00039 #include <sensor_fusion_comm/ExtState.h>
00040 #include <sensor_fusion_comm/DoubleArrayStamped.h>
00041 #include <geometry_msgs/PoseWithCovarianceStamped.h>
00042 
00043 #define N_STATE 25 /// error state size
00044 
00045 namespace ssf_core
00046 {
00052 class State
00053 {
00054 public:
00055   // states varying during propagation
00056   Eigen::Matrix<double, 3, 1> p_;         
00057   Eigen::Matrix<double, 3, 1> v_;         
00058   Eigen::Quaternion<double> q_;           
00059   Eigen::Matrix<double, 3, 1> b_w_;       
00060   Eigen::Matrix<double, 3, 1> b_a_;       
00061 
00062   // states not varying during propagation
00063   double L_;                              
00064   Eigen::Quaternion<double> q_wv_;        
00065   Eigen::Quaternion<double> q_ci_;        
00066   Eigen::Matrix<double, 3, 1> p_ci_;      
00067 
00068   // system inputs
00069   Eigen::Matrix<double,3,1> w_m_;         
00070   Eigen::Matrix<double,3,1> a_m_;         
00071 
00072   Eigen::Quaternion<double> q_int_;       
00073 
00074   Eigen::Matrix<double, N_STATE, N_STATE> P_;
00075 
00076   double time_; 
00077 
00079 
00082   void reset();
00083 
00085   void getPoseCovariance(geometry_msgs::PoseWithCovariance::_covariance_type & cov);
00086 
00088 
00089   void toPoseMsg(geometry_msgs::PoseWithCovarianceStamped & pose);
00090 
00092 
00093   void toExtStateMsg(sensor_fusion_comm::ExtState & state);
00094 
00096 
00097   void toStateMsg(sensor_fusion_comm::DoubleArrayStamped & state);
00098 
00099 
00100 
00101 };
00102 
00103 }
00104 
00105 #endif /* STATE_H_ */


ssf_core
Author(s): Stephan Weiss, Markus Achtelik
autogenerated on Fri Jan 3 2014 11:21:29