Skip to content

Commit

Permalink
fixed non-positive timestamp error before first rtk message arrives
Browse files Browse the repository at this point in the history
  • Loading branch information
petrlmat committed Apr 20, 2024
1 parent 4742c73 commit 1cea367
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions include/mrs_uav_state_estimators/estimators/correction.h
Original file line number Diff line number Diff line change
Expand Up @@ -1736,6 +1736,10 @@ bool Correction<n_measurements>::isTimestampOk() {
template <int n_measurements>
bool Correction<n_measurements>::isMsgComing() {

if (first_timestamp_) {
return true;
}

const ros::Time msg_time = mrs_lib::get_mutexed(mtx_msg_time_, msg_time_);
const double delta = ros::Time::now().toSec() - msg_time.toSec();

Expand Down

0 comments on commit 1cea367

Please sign in to comment.