18#ifndef STAUBLI_ROBOT_DRIVER__MOCK_ROBOT_SERVER_HPP_
19#define STAUBLI_ROBOT_DRIVER__MOCK_ROBOT_SERVER_HPP_
24#include <condition_variable>
34#include "rclcpp/rclcpp.hpp"
116 rclcpp::Logger logger_;
120 std::shared_ptr<Socket> control_socket_;
121 std::shared_ptr<Socket> diagnostics_socket_;
Diagnostic data.
Definition messages.hpp:191
Mock robot server to simulate a Staubli robot for testing purposes.
Definition mock_robot_server.hpp:44
bool send_mock_diagnostic_data(const DiagnosticDataMessage &data)
Send a diagnostic data message from the mock robot server.
MockRobotServer()
Constructor.
bool is_ready() const
Check if mock robot server is initialized and ready.
bool init(const NetworkConfig &config)
Initialize the mock robot server with the given network configuration.
~MockRobotServer()
Destructor.
bool send_mock_robot_state(const RobotStateMessage &state)
Send a robot state message from the mock robot server.
bool disconnect()
Disconnect the mock robot server.
bool get_last_received_command(RobotCommandMessage &command, MessageStatus &status)
Receive a command message sent to the mock robot server.
Bilateral real-time socket interface for pub/sub communication.
Definition real_time_socket_interface.hpp:39
Robot command message.
Definition messages.hpp:139
Robot state message.
Definition messages.hpp:62
Definition messages.hpp:23
constexpr uint16_t DEFAULT_CONTROL_PORT
Default port for the control socket.
Definition protocol.hpp:45
constexpr uint16_t DEFAULT_DIAGNOSTICS_PORT
Default port for the diagnostics socket.
Definition protocol.hpp:50
Status struct to hold message status information.
Definition real_time_socket_subscriber.hpp:45
Configuration structure for the communication.
Definition mock_robot_server.hpp:47
uint16_t diagnostics_port
Port for diagnostics communication on the robot.
Definition mock_robot_server.hpp:55
uint16_t local_control_port
Port for control communication on ROS2 side.
Definition mock_robot_server.hpp:53
std::string robot_ip
IP address of the Staubli robot.
Definition mock_robot_server.hpp:49
uint16_t local_diagnostics_port
Port for diagnostics communication on ROS2 side.
Definition mock_robot_server.hpp:57
uint16_t control_port
Port for control communication on the robot.
Definition mock_robot_server.hpp:51