1
0
mirror of https://gitlab.com/obbart/universal_robots_ros_driver.git synced 2026-04-10 01:50:46 +02:00

Set speed on all joints to 0 before closing RT socket. Set short timeout on non-RT socket

This commit is contained in:
Thomas Timm Andersen
2015-09-15 17:12:52 +02:00
parent ad1ec0d9e9
commit 273236f7c1
2 changed files with 4 additions and 0 deletions

View File

@@ -104,6 +104,8 @@ void UrCommunication::run() {
command_string_lock_.unlock();
}
//wait for some traffic so the UR socket doesn't die in version 3.1.
std::this_thread::sleep_for(std::chrono::milliseconds(500));
close(sockfd_);
}

View File

@@ -99,6 +99,8 @@ void UrRealtimeCommunication::run() {
command_string_lock_.unlock();
}
setSpeed(0., 0., 0., 0., 0., 0.);
write(sockfd_, command_.c_str(), command_.length());
close(sockfd_);
}