Skip to content
Snippets Groups Projects
Commit 6f7b682a authored by Fabian Reister's avatar Fabian Reister
Browse files

temporary fix: VirtualRobotReader::getRobotWaiting is currently not working in...

temporary fix: VirtualRobotReader::getRobotWaiting is currently not working in combination with Component::onConnectComponent. Changing back to previous behavior
parent 2b4b0e08
No related branches found
No related tags found
No related merge requests found
Pipeline #21114 failed
......@@ -90,20 +90,26 @@ namespace armarx::armem::robot_state
ARMARX_INFO << "Trying to get robot `" << name << "` ...";
VirtualRobot::RobotPtr robot = nullptr;
while (robot == nullptr)
// while (robot == nullptr)
{
// might be nullptr if query fails
robot = getRobot(name, timestamp, loadMode);
if (robot == nullptr)
{
ARMARX_INFO << deactivateSpam(1) << "Failed to query robot `" << name
<< "`. Will try again ...";
ARMARX_WARNING << deactivateSpam(1) << "Failed to query robot `" << name
<< "`. At the moment, a blocking behavior is not possible in onConnectComponent()."
<< "Therefore, a nullptr will be returned. This will likely cause problems downstream.";
// << "`. Will try again ...";
}
else
{
ARMARX_INFO << "Got robot `" << name << "`.";
}
Clock::WaitFor(Duration::MilliSeconds(200));
// Clock::WaitFor(Duration::MilliSeconds(200));
}
ARMARX_INFO << "Got robot `" << name << "`.";
return robot;
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment