Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 6 additions & 4 deletions include/ur_client_library/ur/ur_driver.h
Original file line number Diff line number Diff line change
Expand Up @@ -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<std::string> output_recipe; //!< Vector with the output recipe fields.
std::vector<std::string> input_recipe; //!< Vector with the input recipe fields.

/*!
* \brief Function handle to a callback on program state changes.
Expand Down
7 changes: 5 additions & 2 deletions src/ur/ur_driver.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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_));

Expand Down
Loading