GraftUKFVelocity.h
Go to the documentation of this file.
1 /*
2  * Copyright (c) 2013, Willow Garage, Inc.
3  * All rights reserved.
4  *
5  * Redistribution and use in source and binary forms, with or without
6  * modification, are permitted provided that the following conditions are met:
7  *
8  * * Redistributions of source code must retain the above copyright
9  * notice, this list of conditions and the following disclaimer.
10  * * Redistributions in binary form must reproduce the above copyright
11  * notice, this list of conditions and the following disclaimer in the
12  * documentation and/or other materials provided with the distribution.
13  * * Neither the name of the Willow Garage, Inc. nor the names of its
14  * contributors may be used to endorse or promote products derived from
15  * this software without specific prior written permission.
16  *
17  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
18  * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
19  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
20  * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
21  * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
22  * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
23  * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
24  * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
25  * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
26  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
27  * POSSIBILITY OF SUCH DAMAGE.
28  */
29 
30 /*
31  * Author: Chad Rockey
32  */
33 
34 #ifndef GRAFT_UKFVELOCITY_H
35 #define GRAFT_UKFVELOCITY_H
36 
37 #include <Eigen/Dense>
38 #include <Eigen/Cholesky>
39 
40 #include <graft/GraftState.h>
41 #include <nav_msgs/Odometry.h>
42 #include <geometry_msgs/QuaternionStamped.h>
43 #include <sensor_msgs/Imu.h>
44 #include <tf/transform_datatypes.h>
45  #include <graft/GraftSensor.h>
46 
47 #define SIZE 3 // State size: vx, vy, wz
48 
49 using namespace Eigen;
50 
52  public:
55 
56  MatrixXd f(MatrixXd x, double dt);
57 
58  std::vector<MatrixXd > predict_sigma_points(std::vector<MatrixXd >& sigma_points, double dt);
59 
60  graft::GraftStatePtr getMessageFromState();
61 
62  graft::GraftStatePtr getMessageFromState(Matrix<double, SIZE, 1>& state, Matrix<double, SIZE, SIZE>& covariance);
63 
64  double predictAndUpdate();
65 
66  void setTopics(std::vector<boost::shared_ptr<GraftSensor> >& topics);
67 
68  void setInitialCovariance(std::vector<double>& P);
69 
70  void setProcessNoise(std::vector<double>& Q);
71 
72  void setAlpha(const double alpha);
73 
74  void setKappa(const double kappa);
75 
76  void setBeta(const double beta);
77 
78  private:
79 
80  Matrix<double, SIZE, 1> graft_state_;
81  Matrix<double, SIZE, 1> graft_control_;
82  Matrix<double, SIZE, SIZE> graft_covariance_;
83 
84  Matrix<double, SIZE, SIZE> Q_;
85 
88 
89  double alpha_;
90  double beta_;
91  double kappa_;
92 
93  std::vector<boost::shared_ptr<GraftSensor> > topics_;
94 };
95 
96 #endif
GraftUKFVelocity::graft_state_
Matrix< double, SIZE, 1 > graft_state_
Definition: GraftUKFVelocity.h:80
GraftUKFVelocity::last_update_time_
ros::Time last_update_time_
Definition: GraftUKFVelocity.h:86
boost::shared_ptr
GraftUKFVelocity::alpha_
double alpha_
Definition: GraftUKFVelocity.h:89
GraftUKFVelocity::beta_
double beta_
Definition: GraftUKFVelocity.h:90
GraftUKFVelocity
Definition: GraftUKFVelocity.h:51
f
f
GraftSensor.h
GraftUKFVelocity::topics_
std::vector< boost::shared_ptr< GraftSensor > > topics_
Definition: GraftUKFVelocity.h:93
GraftUKFVelocity::kappa_
double kappa_
Definition: GraftUKFVelocity.h:91
GraftUKFVelocity::graft_control_
Matrix< double, SIZE, 1 > graft_control_
Definition: GraftUKFVelocity.h:81
GraftUKFVelocity::graft_covariance_
Matrix< double, SIZE, SIZE > graft_covariance_
Definition: GraftUKFVelocity.h:82
transform_datatypes.h
ros::Time
GraftUKFVelocity::last_imu_time_
ros::Time last_imu_time_
Definition: GraftUKFVelocity.h:87
GraftUKFVelocity::Q_
Matrix< double, SIZE, SIZE > Q_
Definition: GraftUKFVelocity.h:84


graft
Author(s): Chad Rockey
autogenerated on Wed Mar 2 2022 00:20:33