Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions ur_robot_driver/src/comm/tcp_socket.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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<size_t>(res);
return true;
Expand Down
3 changes: 3 additions & 0 deletions ur_robot_driver/src/ur/ur_driver.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
}
Expand All @@ -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;
}
Expand Down