34 virtual bool consume(std::shared_ptr<urcl::primary_interface::PrimaryPackage> product)
37 if (kin_info !=
nullptr)
40 calibrated_ = kin_info->calibration_status_;
41 have_received_data =
true;
48 const uint32_t LINEARIZED = 2;
49 return calibrated_ == LINEARIZED;
54 return have_received_data;
66 int main(
int argc,
char* argv[])
75 robot_ip = std::string(argv[1]);
103 std::this_thread::sleep_for(std::chrono::seconds(1));
108 printf(
"The robot on IP: %s is calibrated\n", robot_ip.c_str());
112 printf(
"The robot controller on IP: %s do not have a valid calibration\n", robot_ip.c_str());
113 printf(
"Remeber to turn on the robot to get calibration stored on the robot!\n");
void setupProducer() override
Triggers the stream to connect to the robot.
void run()
Starts the producer and, if existing, the consumer in new threads.
bool isCalibrated() const
The stream is an abstraction of the TCPSocket that offers reading a full UR data package out of the s...
The primary specific parser. Interprets a given byte stream as serialized primary packages and parses...
bool calibrationStatusReceived()
Parent class for for arbitrary consumers.
void setLogLevel(LogLevel level)
Set log level this will disable messages with lower log level.
This messages contains information about the robot's calibration. The DH parameters are a combination...
Parent class for notifiers.
int main(int argc, char *argv[])
The Pipepline manages the production and optionally consumption of packages. Cyclically the producer ...
#define URCL_LOG_INFO(...)
A general producer for URPackages. Implements funcionality to produce packages by reading and parsing...
const std::string DEFAULT_ROBOT_IP
static const int UR_PRIMARY_PORT
virtual bool consume(std::shared_ptr< urcl::primary_interface::PrimaryPackage > product)
Consumes a product, utilizing it's contents.