mirror of
https://gitlab.com/obbart/universal_robots_ros_driver.git
synced 2026-04-12 11:00:47 +02:00
throw exception when tool communication is requested for CB3
This commit is contained in:
@@ -82,9 +82,16 @@ ur_driver::UrDriver::UrDriver(const std::string& robot_ip, const std::string& sc
|
||||
prog.replace(prog.find(SERVER_IP_REPLACE), SERVER_IP_REPLACE.length(), local_ip);
|
||||
prog.replace(prog.find(SERVER_PORT_REPLACE), SERVER_PORT_REPLACE.length(), std::to_string(reverse_port));
|
||||
|
||||
auto urcontrol_version = rtde_client_->getVersion();
|
||||
|
||||
std::stringstream begin_replace;
|
||||
if (tool_comm_setup != nullptr)
|
||||
{
|
||||
if (urcontrol_version.major < 5)
|
||||
{
|
||||
throw VersionMismatch("This robot version does not support using the tool communication interface.", 5,
|
||||
urcontrol_version.major);
|
||||
}
|
||||
begin_replace << "set_tool_voltage("
|
||||
<< static_cast<std::underlying_type<ToolVoltage>::type>(tool_comm_setup->getToolVoltage()) << ")\n";
|
||||
begin_replace << "set_tool_communication("
|
||||
|
||||
Reference in New Issue
Block a user