@@ -70,9 +70,6 @@ void UrDriver::init(const UrDriverConfiguration& config)
7070 rtde_client_.reset (
7171 new rtde_interface::RTDEClient (robot_ip_, notifier_, config.output_recipe_file , config.input_recipe_file ));
7272
73- primary_stream_.reset (
74- new comm::URStream<primary_interface::PrimaryPackage>(robot_ip_, urcl::primary_interface::UR_PRIMARY_PORT));
75-
7673 primary_client_.reset (new urcl::primary_interface::PrimaryClient (robot_ip_, notifier_));
7774
7875 get_packet_timeout_ = non_blocking_read_ ? 0 : 100 ;
@@ -559,27 +556,7 @@ std::string UrDriver::readScriptFile(const std::string& filename)
559556
560557bool UrDriver::checkCalibration (const std::string& checksum)
561558{
562- if (primary_stream_ == nullptr )
563- {
564- throw std::runtime_error (" checkCalibration() called without a primary interface connection being established." );
565- }
566- primary_interface::PrimaryParser parser;
567- comm::URProducer<primary_interface::PrimaryPackage> prod (*primary_stream_, parser);
568- prod.setupProducer ();
569-
570- CalibrationChecker consumer (checksum);
571-
572- comm::INotifier notifier;
573-
574- comm::Pipeline<primary_interface::PrimaryPackage> pipeline (prod, &consumer, " Pipeline" , notifier);
575- pipeline.run ();
576-
577- while (!consumer.isChecked ())
578- {
579- std::this_thread::sleep_for (std::chrono::seconds (1 ));
580- }
581- URCL_LOG_DEBUG (" Got calibration information from robot." );
582- return consumer.checkSuccessful ();
559+ return primary_client_->checkCalibration (checksum);
583560}
584561
585562rtde_interface::RTDEWriter& UrDriver::getRTDEWriter ()
@@ -670,4 +647,4 @@ std::deque<urcl::primary_interface::ErrorCode> UrDriver::getErrorCodes()
670647{
671648 return primary_client_->getErrorCodes ();
672649}
673- } // namespace urcl
650+ } // namespace urcl
0 commit comments