18#ifndef STAUBLI_ROBOT_DRIVER__ROBOT_DRIVER_HELPERS_HPP_
19#define STAUBLI_ROBOT_DRIVER__ROBOT_DRIVER_HELPERS_HPP_
33 msg.command_reference.fill(0.0);
39 if (joint_positions.size() !=
msg.command_reference.size()) {
43 std::copy(joint_positions.begin(), joint_positions.end(),
msg.command_reference.begin());
49 if (joint_velocities.size() !=
msg.command_reference.size()) {
53 std::copy(joint_velocities.begin(), joint_velocities.end(),
msg.command_reference.begin());
60 msg.header.sequence_number =
state.header.sequence_number;
77 msg.digital_outputs.fill(
false);
78 msg.analog_outputs.fill(0.0);
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
bool set_command_joint_velocity(RobotCommandMessage &msg, std::vector< double > joint_velocities)
Definition robot_driver_helpers.hpp:47
bool prepare_robot_command_message(RobotCommandMessage &msg, RobotStateMessage &state)
Clear and prepare a RobotCommandMessage.
Definition robot_driver_helpers.hpp:70
bool set_command_joint_position(RobotCommandMessage &msg, std::vector< double > joint_positions)
Definition robot_driver_helpers.hpp:37
bool set_command_stop(RobotCommandMessage &msg)
Definition robot_driver_helpers.hpp:30
bool set_sequence_number(RobotCommandMessage &msg, RobotStateMessage &state)
Definition robot_driver_helpers.hpp:58