Go to the documentation of this file.
29 #ifndef UR_CLIENT_LIBRARY_REVERSE_INTERFACE_H_INCLUDED
30 #define UR_CLIENT_LIBRARY_REVERSE_INTERFACE_H_INCLUDED
39 #include <condition_variable>
82 ReverseInterface(uint32_t port, std::function<
void(
bool)> handle_program_state,
83 std::chrono::milliseconds step_time = std::chrono::milliseconds(8));
140 [[deprecated(
"Set keepaliveCount is deprecated, instead use the robot receive timeout directly in the write "
141 "commands.")]]
virtual void
170 template <
typename T>
173 size_t s =
sizeof(T);
174 std::memcpy(buffer, &val, s);
190 #endif // UR_CLIENT_LIBRARY_REVERSE_INTERFACE_H_INCLUDED
ControlMode
Control modes as interpreted from the script runnning on the robot.
virtual void disconnectionCallback(const socket_t filedescriptor)
std::function< void(const int)> disconnection_callback_
virtual void setKeepaliveCount(const uint32_t count)
Set the Keepalive count. This will set the number of allowed timeout reads on the robot.
size_t append(uint8_t *buffer, T &val)
static const int32_t MULT_JOINTSTATE
The ReverseInterface class handles communication to the robot. It starts a server and waits for the r...
virtual bool write(const vector6d_t *positions, const comm::ControlMode control_mode=comm::ControlMode::MODE_IDLE, const RobotReceiveTimeout &robot_receive_timeout=RobotReceiveTimeout::millisec(20))
Writes needed information to the robot to be read by the URCaps program.
@ TRAJECTORY_NOOP
Represents no new control command.
uint32_t keepalive_count_
bool writeFreedriveControlMessage(const FreedriveControlMessage freedrive_action, const RobotReceiveTimeout &robot_receive_timeout=RobotReceiveTimeout::millisec(200))
Writes needed information to the robot to be read by the URScript program.
@ FREEDRIVE_START
Represents command to start freedrive mode.
void registerDisconnectionCallback(std::function< void(const int)> disconnection_fun)
std::array< double, 6 > vector6d_t
virtual void connectionCallback(const socket_t filedescriptor)
static RobotReceiveTimeout millisec(const unsigned int milliseconds=20)
Create a RobotReceiveTimeout object with a specific timeout given in milliseconds.
@ TRAJECTORY_CANCEL
Represents command to cancel currently active trajectory.
TrajectoryControlMessage
Control messages for forwarding and aborting trajectories.
@ MODE_IDLE
Set when no controller is currently active controlling the robot.
virtual void messageCallback(const socket_t filedescriptor, char *buffer, int nbytesrecv)
static const int MAX_MESSAGE_LENGTH
std::chrono::milliseconds step_time_
virtual ~ReverseInterface()=default
Disconnects possible clients so the reverse interface object can be safely destroyed.
Wrapper class for a TCP socket server.
@ FREEDRIVE_NOOP
Represents keep running in freedrive mode.
bool keep_alive_count_modified_deprecated_
std::function< void(bool)> handle_program_state_
@ FREEDRIVE_STOP
Represents command to stop freedrive mode.
bool writeTrajectoryControlMessage(const TrajectoryControlMessage trajectory_action, const int point_number=0, const RobotReceiveTimeout &robot_receive_timeout=RobotReceiveTimeout::millisec(200))
Writes needed information to the robot to be read by the URScript program.
@ TRAJECTORY_START
Represents command to start a new trajectory.
ReverseInterface()=delete
bool isConnected() const
Checks if the reverse interface is connected to the robot.
RobotReceiveTimeout class containing a timeout configuration.
FreedriveControlMessage
Control messages for starting and stopping freedrive mode.
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