File tree Expand file tree Collapse file tree 1 file changed +16
-0
lines changed Expand file tree Collapse file tree 1 file changed +16
-0
lines changed Original file line number Diff line number Diff line change 3333#include < ur_client_library/log.h>
3434#include < ur_client_library/ur/dashboard_client.h>
3535
36+ #include < iostream>
3637#include < memory>
38+ #include < sstream>
3739#include < thread>
40+ #include " ur_client_library/comm/pipeline.h"
41+ #include " ur_client_library/primary/primary_client.h"
3842
3943using namespace urcl ;
4044
@@ -55,6 +59,18 @@ int main(int argc, char* argv[])
5559 robot_ip = std::string (argv[1 ]);
5660 }
5761
62+ urcl::comm::INotifier notifier;
63+ urcl::primary_interface::PrimaryClient primary_client (robot_ip, notifier);
64+ primary_client.start ();
65+ auto version_information = primary_client.getRobotVersion ();
66+ if (version_information->major >= 10 )
67+ {
68+ std::stringstream ss;
69+ ss << " Robot has version " << *version_information << " . This example is not compatible with PolyScope X" ;
70+ URCL_LOG_ERROR (ss.str ().c_str ());
71+ return 0 ;
72+ }
73+
5874 // Connect to the robot Dashboard Server
5975 auto my_dashboard = std::make_unique<DashboardClient>(robot_ip);
6076 if (!my_dashboard->connect ())
You can’t perform that action at this time.
0 commit comments