Skip to content

Commit

Permalink
logger: poll sensor_combined if estimator replay enabled
Browse files Browse the repository at this point in the history
  • Loading branch information
dagar committed Apr 22, 2020
1 parent d29344c commit f29b675
Showing 1 changed file with 15 additions and 1 deletion.
16 changes: 15 additions & 1 deletion src/modules/logger/logger.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -486,7 +486,21 @@ bool Logger::initialize_topics()
}
}

if (!logged_topics.initialize_logged_topics(sdlog_profile)) {
if (logged_topics.initialize_logged_topics(sdlog_profile)) {

// if no polling configured then use sensor_combined if Estimator Replay profile is enabled
if (_polling_topic_meta && (sdlog_profile & SDLogProfileMask::ESTIMATOR_REPLAY)) {
const auto &topics = orb_get_topics();

for (size_t i = 0; i < orb_topics_count(); i++) {
if (strcmp("sensor_combined", topics[i]->o_name) == 0) {
_polling_topic_meta = topics[i];
break;
}
}
}

} else {
return false;
}

Expand Down

0 comments on commit f29b675

Please sign in to comment.