-
Notifications
You must be signed in to change notification settings - Fork 30
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1 from gsilano/feature/kalman_filter
Extended Kalman Filter
- Loading branch information
Showing
15 changed files
with
557 additions
and
73 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,76 @@ | ||
/* | ||
* Copyright 2018 Giuseppe Silano, University of Sannio in Benevento, Italy | ||
* Copyright 2018 Pasquale Oppido, University of Sannio in Benevento, Italy | ||
* Copyright 2018 Luigi Iannelli, University of Sannio in Benevento, Italy | ||
* | ||
* Licensed under the Apache License, Version 2.0 (the "License"); | ||
* you may not use this file except in compliance with the License. | ||
* You may obtain a copy of the License at | ||
* | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an "AS IS" BASIS, | ||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
* See the License for the specific language governing permissions and | ||
* limitations under the License. | ||
*/ | ||
|
||
#ifndef _FILTER_PARAMTERS_H_ | ||
#define _FILTER_PARAMTERS_H_ | ||
|
||
#include <Eigen/Eigen> | ||
#include <ros/ros.h> | ||
|
||
namespace teamsannio_med_control { | ||
|
||
static constexpr double DefaultDevX = 0.01; | ||
static constexpr double DefaultDevY = 0.01; | ||
static constexpr double DefaultDevZ = 0.01; | ||
|
||
static constexpr double DefaultDevVX = 0.01; | ||
static constexpr double DefaultDevVY = 0.01; | ||
static constexpr double DefaultDevVZ = 0.01; | ||
|
||
static constexpr double DefaultQpX = 1e-6; | ||
static constexpr double DefaultQpY = 1e-6; | ||
static constexpr double DefaultQpZ = 1e-6; | ||
|
||
static constexpr double DefaultQpVX = 1e-6; | ||
static constexpr double DefaultQpVY = 1e-6; | ||
static constexpr double DefaultQpVZ = 1e-6; | ||
|
||
class FilterParameters { | ||
public: | ||
EIGEN_MAKE_ALIGNED_OPERATOR_NEW | ||
FilterParameters() | ||
: dev_x_(DefaultDevX), | ||
dev_y_(DefaultDevY), | ||
dev_z_(DefaultDevZ), | ||
dev_vx_(DefaultDevVX), | ||
dev_vy_(DefaultDevVY), | ||
dev_vz_(DefaultDevVZ), | ||
Qp_x_(DefaultQpX), | ||
Qp_y_(DefaultQpY), | ||
Qp_z_(DefaultQpZ), | ||
Qp_vx_(DefaultQpVX), | ||
Qp_vy_(DefaultQpVY), | ||
Qp_vz_(DefaultQpVZ), | ||
Rp_(Eigen::MatrixXf::Zero(6,6)), | ||
Qp_(Eigen::MatrixXf::Identity(6,6)){ | ||
} | ||
|
||
Eigen::MatrixXf Rp_, Qp_; | ||
|
||
double dev_x_, Qp_x_; | ||
double dev_y_, Qp_y_; | ||
double dev_z_, Qp_z_; | ||
|
||
double dev_vx_, Qp_vx_; | ||
double dev_vy_, Qp_vy_; | ||
double dev_vz_, Qp_vz_; | ||
}; | ||
|
||
} | ||
|
||
#endif // _FILTER_PARAMTERS_H_ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
/* | ||
* Copyright 2018 Giuseppe Silano, University of Sannio in Benevento, Italy | ||
* Copyright 2018 Pasquale Oppido, University of Sannio in Benevento, Italy | ||
* Copyright 2018 Luigi Iannelli, University of Sannio in Benevento, Italy | ||
* | ||
* Licensed under the Apache License, Version 2.0 (the "License"); | ||
* you may not use this file except in compliance with the License. | ||
* You may obtain a copy of the License at | ||
* | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an "AS IS" BASIS, | ||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
* See the License for the specific language governing permissions and | ||
* limitations under the License. | ||
*/ | ||
|
||
#ifndef KALMAN_FILTER_DEFAULT_TOPICS_H_ | ||
#define KALMAN_FILTER_DEFAULT_TOPICS_H_ | ||
|
||
namespace teamsannio_msgs { | ||
namespace default_topics { | ||
|
||
static constexpr char FILTERED_OUTPUT[] = "filteredOutput"; | ||
static constexpr char STATE_ERRORS[] = "stateErrors"; | ||
|
||
static constexpr char ODOMETRY_GT[] = "odometry_gt"; | ||
|
||
|
||
} // end namespace default_topics | ||
} // end namespace teamsannio_msgs | ||
|
||
#endif /* KALMAN_FILTER_DEFAULT_TOPICS_H_ */ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
# Tuning matrix of the Extended Kalman Filter (min 1e-5) | ||
Qp: {aa: 0.00015, bb: 0.00015, cc: 0.00015, dd: 0.00015, ee: 0.00015, ff: 0.00015} | ||
# Standard deviation of noise on positions and linear velocities | ||
dev_x: 0.01 | ||
dev_y: 0.01 | ||
dev_z: 0.01 | ||
dev_vx: 0.01 | ||
dev_vy: 0.01 | ||
dev_vz: 0.01 | ||
|
Oops, something went wrong.