Skip to content

Commit

Permalink
fixed a bug which could cause state estimator getting stuck in starte…
Browse files Browse the repository at this point in the history
…d state

when subestimators got into error state
  • Loading branch information
petrlmat committed Oct 3, 2023
1 parent 176b40b commit 00f50d4
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/estimators/state/state_generic.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -333,6 +333,10 @@ void StateGeneric::timerCheckHealth(const ros::TimerEvent &event) {

ROS_INFO_THROTTLE(1.0, "[%s]: %s for convergence of LKF", getPrintName().c_str(), Support::waiting_for_string.c_str());

if (est_lat_->isError() || est_alt_->isError() || est_hdg_->isError()) {
changeState(ERROR_STATE);
}

if (est_lat_->isRunning() && est_alt_->isRunning() && est_hdg_->isRunning()) {
ROS_INFO_THROTTLE(1.0, "[%s]: Subestimators converged", getPrintName().c_str());
changeState(RUNNING_STATE);
Expand Down

0 comments on commit 00f50d4

Please sign in to comment.