Go to the documentation of this file.
29 #ifndef UR_CLIENT_LIBRARY_RTDE_CLIENT_H_INCLUDED
30 #define UR_CLIENT_LIBRARY_RTDE_CLIENT_H_INCLUDED
52 namespace rtde_interface
110 const std::string& input_recipe_file,
double target_frequency = 0.0,
111 bool ignore_unavailable_outputs =
false);
126 const std::vector<std::string>& input_recipe,
double target_frequency = 0.0,
127 bool ignore_unavailable_outputs =
false);
144 bool init(
const size_t max_connection_attempts = 0,
146 const size_t max_initialization_attempts = 3,
147 const std::chrono::milliseconds initialization_timeout = std::chrono::seconds(1));
167 std::unique_ptr<rtde_interface::DataPackage>
getDataPackage(std::chrono::milliseconds timeout);
204 std::string
getIP()
const;
230 std::unique_ptr<comm::URProducer<RTDEPackage>>
prod_;
246 std::vector<std::string>
readRecipe(
const std::string& recipe_file)
const;
253 const std::chrono::milliseconds reconnection_time = std::chrono::seconds(10));
296 #endif // UR_CLIENT_LIBRARY_RTDE_CLIENT_H_INCLUDED
std::vector< std::string > readRecipe(const std::string &recipe_file) const
The RTDEWriter class offers an abstraction layer to send data to the robot via the RTDE interface....
bool negotiateProtocolVersion(const uint16_t protocol_version)
The stream is an abstraction of the TCPSocket that offers reading a full UR data package out of the s...
comm::INotifier notifier_
bool pause()
Pauses RTDE data package communication.
bool start()
Triggers the robot to start sending RTDE data packages in the negotiated format.
double getTargetFrequency() const
Getter for the target frequency that the robot will publish RTDE data packages with.
std::unique_ptr< comm::Pipeline< RTDEPackage > > pipeline_
The RTDE specific parser. Interprets a given byte stream as serialized RTDE packages and parses it ac...
bool ignore_unavailable_outputs_
std::vector< std::string > getOutputRecipe()
Getter for the RTDE output recipe.
std::unique_ptr< rtde_interface::DataPackage > getDataPackage(std::chrono::milliseconds timeout)
Reads the pipeline to fetch the next data package.
static const unsigned MAX_REQUEST_RETRIES
static constexpr std::chrono::milliseconds DEFAULT_RECONNECTION_TIME
bool init(const size_t max_connection_attempts=0, const std::chrono::milliseconds reconnection_timeout=comm::TCPSocket::DEFAULT_RECONNECTION_TIME, const size_t max_initialization_attempts=3, const std::chrono::milliseconds initialization_timeout=std::chrono::seconds(1))
Sets up RTDE communication with the robot. The handshake includes negotiation of the used protocol ve...
@ IS_STOPPED_DUE_TO_SAFETY
VersionInformation urcontrol_version_
Parent class for notifiers.
void resetOutputRecipe(const std::vector< std::string > new_recipe)
Updates the output recipe to the given one and recreates all the objects which depend on it....
bool isRobotBooted()
Checks whether the robot is booted, this is done by looking at the timestamp from the robot controlle...
static const uint16_t MAX_RTDE_PROTOCOL_VERSION
ClientState client_state_
@ IS_POWER_BUTTON_PRESSED
std::unique_ptr< comm::URProducer< RTDEPackage > > prod_
RTDEWriter & getWriter()
Getter for the RTDE writer, which is used to send data via the RTDE interface to the robot.
double getMaxFrequency() const
Getter for the maximum frequency the robot can publish RTDE data packages with.
void setupCommunication(const size_t max_num_tries=0, const std::chrono::milliseconds reconnection_time=std::chrono::seconds(10))
std::vector< std::string > output_recipe_
VersionInformation getVersion()
Getter for the UR control version received from the robot.
static const std::string PIPELINE_NAME
@ IS_SYSTEM_EMERGENCY_STOPPED
static const int UR_RTDE_PORT
@ IS_TEACH_BUTTON_PRESSED
std::string getIP() const
Returns the IP address (of the machine running this driver) used for the socket connection.
@ IS_ROBOT_EMERGENCY_STOPPED
void queryURControlVersion()
std::vector< std::string > splitVariableTypes(const std::string &variable_types) const
Splits a variable_types string as reported from the robot into single variable type strings.
std::vector< std::string > input_recipe_
void setupOutputs(const uint16_t protocol_version)
comm::URStream< RTDEPackage > stream_
constexpr static const double URE_MAX_FREQUENCY
The RTDEClient class manages communication over the RTDE interface. It contains the RTDE handshake an...
constexpr static const double CB3_MAX_FREQUENCY
std::vector< std::string > ensureTimestampIsPresent(const std::vector< std::string > &output_recipe) const
ur_client_library
Author(s): Thomas Timm Andersen, Simon Rasmussen, Felix Exner, Lea Steffen, Tristan Schnell
autogenerated on Mon May 26 2025 02:35:58