diff --git a/include/ur_client_library/ur/ur_driver.h b/include/ur_client_library/ur/ur_driver.h index 15a4fd25..a78b196c 100644 --- a/include/ur_client_library/ur/ur_driver.h +++ b/include/ur_client_library/ur/ur_driver.h @@ -52,10 +52,12 @@ namespace urcl */ struct UrDriverConfiguration { - std::string robot_ip; //!< IP-address under which the robot is reachable. - std::string script_file; //!< URScript file that should be sent to the robot. - std::string output_recipe_file; //!< Filename where the output recipe is stored in. - std::string input_recipe_file; //!< Filename where the input recipe is stored in. + std::string robot_ip; //!< IP-address under which the robot is reachable. + std::string script_file; //!< URScript file that should be sent to the robot. + std::string output_recipe_file; //!< Filename where the output recipe is stored in. + std::string input_recipe_file; //!< Filename where the input recipe is stored in. + std::vector output_recipe; //!< Vector with the output recipe fields. + std::vector input_recipe; //!< Vector with the input recipe fields. /*! * \brief Function handle to a callback on program state changes. diff --git a/src/ur/ur_driver.cpp b/src/ur/ur_driver.cpp index e860722e..9fc63601 100644 --- a/src/ur/ur_driver.cpp +++ b/src/ur/ur_driver.cpp @@ -76,8 +76,11 @@ void UrDriver::init(const UrDriverConfiguration& config) URCL_LOG_DEBUG("Initializing urdriver"); URCL_LOG_DEBUG("Initializing RTDE client"); - rtde_client_.reset( - new rtde_interface::RTDEClient(robot_ip_, notifier_, config.output_recipe_file, config.input_recipe_file)); + if (config.output_recipe_file.empty() && config.input_recipe_file.empty()) + rtde_client_.reset(new rtde_interface::RTDEClient(robot_ip_, notifier_, config.output_recipe, config.input_recipe)); + else + rtde_client_.reset( + new rtde_interface::RTDEClient(robot_ip_, notifier_, config.output_recipe_file, config.input_recipe_file)); primary_client_.reset(new urcl::primary_interface::PrimaryClient(robot_ip_, notifier_));