38 const std::string
OUTPUT_RECIPE =
"examples/resources/rtde_output_recipe.txt";
39 const std::string
INPUT_RECIPE =
"examples/resources/rtde_input_recipe.txt";
42 int main(
int argc,
char* argv[])
50 double speed_slider_fraction = 1.0;
51 double speed_slider_increment = 0.01;
67 std::cout << data_pkg->toString() << std::endl;
71 std::cout <<
"Could not get fresh data package from robot" << std::endl;
78 std::cout <<
"\033[1;31mSending RTDE data failed." 85 if (speed_slider_increment > 0)
87 if (speed_slider_fraction + speed_slider_increment > 1.0)
89 speed_slider_increment *= -1;
92 else if (speed_slider_fraction + speed_slider_increment < 0.0)
94 speed_slider_increment *= -1;
96 speed_slider_fraction += speed_slider_increment;
const std::chrono::milliseconds READ_TIMEOUT
RTDEWriter & getWriter()
Getter for the RTDE writer, which is used to send data via the RTDE interface to the robot...
bool start()
Triggers the robot to start sending RTDE data packages in the negotiated format.
int main(int argc, char *argv[])
const std::string INPUT_RECIPE
const std::string ROBOT_IP
std::unique_ptr< rtde_interface::DataPackage > getDataPackage(std::chrono::milliseconds timeout)
Reads the pipeline to fetch the next data package.
Parent class for notifiers.
const std::string OUTPUT_RECIPE
The RTDEClient class manages communication over the RTDE interface. It contains the RTDE handshake an...
bool init()
Sets up RTDE communication with the robot. The handshake includes negotiation of the used protocol ve...
bool sendSpeedSlider(double speed_slider_fraction)
Creates a package to request setting a new value for the speed slider.