diff --git a/src/ur_communication.cpp b/src/ur_communication.cpp index e007392..52e9cff 100644 --- a/src/ur_communication.cpp +++ b/src/ur_communication.cpp @@ -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_); } diff --git a/src/ur_realtime_communication.cpp b/src/ur_realtime_communication.cpp index 9692b75..99b1348 100644 --- a/src/ur_realtime_communication.cpp +++ b/src/ur_realtime_communication.cpp @@ -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_); }