mirror of
https://gitlab.com/obbart/universal_robots_ros_driver.git
synced 2026-04-10 10:00:48 +02:00
implemented error when trying to start driver without connection to a robot
This commit is contained in:
committed by
Felix Mauch
parent
fd6a9ee365
commit
d0e995ff7c
@@ -184,7 +184,10 @@ public:
|
||||
|
||||
running_ = false;
|
||||
|
||||
pThread_.join();
|
||||
if (pThread_.joinable())
|
||||
{
|
||||
pThread_.join();
|
||||
}
|
||||
if (cThread_.joinable())
|
||||
{
|
||||
cThread_.join();
|
||||
|
||||
@@ -24,6 +24,7 @@
|
||||
#include "ur_rtde_driver/comm/parser.h"
|
||||
#include "ur_rtde_driver/comm/stream.h"
|
||||
#include "ur_rtde_driver/comm/package.h"
|
||||
#include "ur_rtde_driver/exceptions.h"
|
||||
|
||||
namespace ur_driver
|
||||
{
|
||||
@@ -48,7 +49,10 @@ public:
|
||||
tv.tv_sec = 1;
|
||||
tv.tv_usec = 0;
|
||||
stream_.setReceiveTimeout(tv);
|
||||
stream_.connect();
|
||||
if(!stream_.connect())
|
||||
{
|
||||
throw UrException("Failed to connect to robot. Please check if the robot is booted and connected.");
|
||||
}
|
||||
}
|
||||
void teardownProducer()
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user