Skip to content

Commit 3e0cd11

Browse files
urfeexurmahp
andcommitted
check for the calibration before sleeping
Co-authored-by: Mads Holm Peters <[email protected]>
1 parent 1975d6e commit 3e0cd11

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/primary/primary_client.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -149,11 +149,11 @@ bool PrimaryClient::reconnectStream()
149149

150150
bool PrimaryClient::checkCalibration(const std::string& checksum)
151151
{
152-
std::shared_ptr<primary_interface::KinematicsInfo> kin_info;
152+
std::shared_ptr<primary_interface::KinematicsInfo> kin_info = consumer_->getKinematicsInfo();
153153
while (kin_info == nullptr)
154154
{
155-
kin_info = consumer_->getKinematicsInfo();
156155
std::this_thread::sleep_for(std::chrono::seconds(1));
156+
kin_info = consumer_->getKinematicsInfo();
157157
}
158158
URCL_LOG_DEBUG("Got calibration information from robot.");
159159

0 commit comments

Comments
 (0)