Skip to content
Snippets Groups Projects
Commit 35922c6c authored by Steven Macenski's avatar Steven Macenski
Browse files

attempt to bringup localization in startup 2x before failing due to lack of response

parent 064eaf26
No related branches found
No related tags found
No related merge requests found
......@@ -156,15 +156,24 @@ public:
{
SystemStatus status_nav = SystemStatus::TIMEOUT;
SystemStatus status_loc = SystemStatus::TIMEOUT;
while (status_nav == SystemStatus::TIMEOUT || status_loc == SystemStatus::TIMEOUT) {
while (status_nav == SystemStatus::TIMEOUT) {
if (status_nav == SystemStatus::TIMEOUT) {
status_nav = client_nav_.is_active(std::chrono::seconds(1));
}
if (status_loc == SystemStatus::TIMEOUT) {
status_loc = client_loc_.is_active(std::chrono::seconds(1));
}
// try to communicate twice, might not actually be up if in SLAM mode
bool tried_loc_bringup_once = false;
while (status_loc == SystemStatus::TIMEOUT) {
status_loc = client_loc_.is_active(std::chrono::seconds(1));
if (tried_loc_bringup_once) {
break;
}
tried_loc_bringup_once = true;
}
if (status_nav == SystemStatus::ACTIVE && status_loc == SystemStatus::ACTIVE) {
if (status_nav == SystemStatus::ACTIVE) {
emit activeSystem();
} else {
emit inactiveSystem();
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment