mirror of
https://gitlab.com/obbart/universal_robots_ros_driver.git
synced 2026-04-10 01:50:46 +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;
|
running_ = false;
|
||||||
|
|
||||||
pThread_.join();
|
if (pThread_.joinable())
|
||||||
|
{
|
||||||
|
pThread_.join();
|
||||||
|
}
|
||||||
if (cThread_.joinable())
|
if (cThread_.joinable())
|
||||||
{
|
{
|
||||||
cThread_.join();
|
cThread_.join();
|
||||||
|
|||||||
@@ -24,6 +24,7 @@
|
|||||||
#include "ur_rtde_driver/comm/parser.h"
|
#include "ur_rtde_driver/comm/parser.h"
|
||||||
#include "ur_rtde_driver/comm/stream.h"
|
#include "ur_rtde_driver/comm/stream.h"
|
||||||
#include "ur_rtde_driver/comm/package.h"
|
#include "ur_rtde_driver/comm/package.h"
|
||||||
|
#include "ur_rtde_driver/exceptions.h"
|
||||||
|
|
||||||
namespace ur_driver
|
namespace ur_driver
|
||||||
{
|
{
|
||||||
@@ -48,7 +49,10 @@ public:
|
|||||||
tv.tv_sec = 1;
|
tv.tv_sec = 1;
|
||||||
tv.tv_usec = 0;
|
tv.tv_usec = 0;
|
||||||
stream_.setReceiveTimeout(tv);
|
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()
|
void teardownProducer()
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user