43 const std::string
SCRIPT_FILE =
"resources/external_control.urscript";
44 const std::string
OUTPUT_RECIPE =
"examples/resources/rtde_output_recipe.txt";
45 const std::string
INPUT_RECIPE =
"examples/resources/rtde_input_recipe.txt";
56 std::cout <<
"\033[1;32mProgram running: " << std::boolalpha << program_running <<
"\033[0m\n" << std::endl;
59 int main(
int argc,
char* argv[])
67 robot_ip = std::string(argv[1]);
109 std::unique_ptr<ToolCommSetup> tool_comm_setup;
110 const bool HEADLESS =
true;
122 double increment = 0.01;
124 bool passed_slow_part =
false;
125 bool passed_fast_part =
false;
127 while (!(passed_slow_part && passed_fast_part))
133 std::unique_ptr<rtde_interface::DataPackage> data_pkg =
g_my_driver->getDataPackage();
140 std::string error_msg =
"Did not find 'actual_q' in data sent from robot. This should not happen!";
141 throw std::runtime_error(error_msg);
147 passed_fast_part = increment > 0.01 || passed_fast_part;
152 passed_slow_part = increment < 0.01 || passed_slow_part;
159 URCL_LOG_ERROR(
"Could not send joint command. Is the robot in remote control?");
166 URCL_LOG_WARN(
"Could not get fresh data package from robot");
#define URCL_LOG_ERROR(...)
This is the main class for interfacing the driver.
void handleRobotProgramState(bool program_running)
const std::string INPUT_RECIPE
const std::string OUTPUT_RECIPE
const std::string DEFAULT_ROBOT_IP
const std::string CALIBRATION_CHECKSUM
const std::string SCRIPT_FILE
int main(int argc, char *argv[])
Set when servoj control is active.
void setLogLevel(LogLevel level)
Set log level this will disable messages with lower log level.
vector6d_t g_joint_positions
#define URCL_LOG_DEBUG(...)
#define URCL_LOG_WARN(...)
std::unique_ptr< UrDriver > g_my_driver
This class is a wrapper around the dashboard server.
std::unique_ptr< DashboardClient > g_my_dashboard
std::array< double, 6 > vector6d_t
#define URCL_LOG_INFO(...)