diff --git a/ur_robot_driver/src/comm/tcp_socket.cpp b/ur_robot_driver/src/comm/tcp_socket.cpp index a7c56fce3..b50e1c978 100644 --- a/ur_robot_driver/src/comm/tcp_socket.cpp +++ b/ur_robot_driver/src/comm/tcp_socket.cpp @@ -178,10 +178,14 @@ bool TCPSocket::read(uint8_t* buf, const size_t buf_len, size_t& read) if (res == 0) { state_ = SocketState::Disconnected; + LOG_ERROR("Received TCPSocket res=0"); return false; } else if (res < 0) + { + LOG_ERROR("Received TCPSocket res=%d", res); return false; + } read = static_cast(res); return true; diff --git a/ur_robot_driver/src/ur/ur_driver.cpp b/ur_robot_driver/src/ur/ur_driver.cpp index 216a0dd4c..36b30d3d5 100644 --- a/ur_robot_driver/src/ur/ur_driver.cpp +++ b/ur_robot_driver/src/ur/ur_driver.cpp @@ -218,6 +218,7 @@ void UrDriver::startWatchdog() if (keepalive == std::string("")) { + LOG_INFO("Received empty keepalive, marking reverse interface as inactive"); reverse_interface_active_ = false; } } @@ -229,7 +230,9 @@ void UrDriver::startWatchdog() // when trying to bind the socket. // TODO: It would probably make sense to keep the same instance alive for the complete runtime // instead of killing it all the time. + LOG_INFO("Destroying existing reverse interface connection"); reverse_interface_->~ReverseInterface(); + LOG_INFO("Creating new reverse interface connection"); reverse_interface_.reset(new comm::ReverseInterface(reverse_port_)); reverse_interface_active_ = true; }