1
0
mirror of https://gitlab.com/obbart/universal_robots_ros_driver.git synced 2026-04-12 11:00:47 +02:00

explicitly throw special exception when tool_comm is not available

This way, we can catch it and give a better feedback to the user.
This commit is contained in:
Felix Mauch
2019-06-12 09:06:34 +02:00
parent 520cd4d860
commit 5f405b3996
4 changed files with 36 additions and 17 deletions

View File

@@ -89,8 +89,9 @@ ur_driver::UrDriver::UrDriver(const std::string& robot_ip, const std::string& sc
{
if (urcontrol_version.major < 5)
{
throw VersionMismatch("This robot version does not support using the tool communication interface.", 5,
urcontrol_version.major);
throw ToolCommNotAvailable("Tool communication setup requested, but this robot version does not support using "
"the tool communication interface. Please check your configuration.",
5, urcontrol_version.major);
}
begin_replace << "set_tool_voltage("
<< static_cast<std::underlying_type<ToolVoltage>::type>(tool_comm_setup->getToolVoltage()) << ")\n";