Skip to content

Commit

Permalink
hopefully fixed uninitialized innovation
Browse files Browse the repository at this point in the history
  • Loading branch information
petrlmat committed Jan 26, 2024
1 parent 9f89a4e commit 8797ea6
Show file tree
Hide file tree
Showing 5 changed files with 18 additions and 0 deletions.
3 changes: 3 additions & 0 deletions include/mrs_uav_state_estimators/estimators/correction.h
Original file line number Diff line number Diff line change
Expand Up @@ -1193,6 +1193,8 @@ void Correction<n_measurements>::callbackVector(const geometry_msgs::Vector3Stam
auto res = getCorrectionFromVector(msg);
if (res) {
applyCorrection(res.value(), msg->header.stamp);
} else {
ROS_WARN_THROTTLE(1.0, "[%s]: Could not obtain correction from Vector3Stamped msg", getPrintName().c_str());
}
}
/*//}*/
Expand Down Expand Up @@ -1241,6 +1243,7 @@ std::optional<typename Correction<n_measurements>::measurement_t> Correction<n_m
measurement = res.value();
return measurement;
} else {
ROS_WARN_THROTTLE(1.0, "[%s]: Could not obtain untilted Z velocity", getPrintName().c_str());
return {};
}
break;
Expand Down
3 changes: 3 additions & 0 deletions src/estimators/altitude/alt_generic.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,9 @@ void AltGeneric::initialize(ros::NodeHandle &nh, const std::shared_ptr<CommonHan
H_ <<
1, 0, 0;

innovation_ <<
0, 0, 0;

// clang-format on

// | --------------- initialize parameter loader -------------- |
Expand Down
4 changes: 4 additions & 0 deletions src/estimators/heading/hdg_generic.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,10 @@ void HdgGeneric::initialize(ros::NodeHandle &nh, const std::shared_ptr<CommonHan
H_ <<
1, 0;

innovation_ <<
0, 0;


// clang-format on

// | --------------- initialize parameter loader -------------- |
Expand Down
4 changes: 4 additions & 0 deletions src/estimators/heading/hdg_passthrough.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,10 @@ void HdgPassthrough::initialize(ros::NodeHandle &nh, const std::shared_ptr<Commo
hdg_state_ = states_t::Zero();
hdg_covariance_ = covariance_t::Zero();

innovation_ <<
0, 0;


// | --------------- param loader initialization --------------- |

if (is_core_plugin_) {
Expand Down
4 changes: 4 additions & 0 deletions src/estimators/lateral/lat_generic.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,10 @@ void LatGeneric::initialize(ros::NodeHandle &nh, const std::shared_ptr<CommonHan
1, 0, 0, 0, 0, 0,
0, 1, 0, 0, 0, 0;

innovation_ <<
0, 0, 0, 0, 0, 0;


// clang-format on

// | --------------- initialize parameter loader -------------- |
Expand Down

0 comments on commit 8797ea6

Please sign in to comment.