21 #include <industrial_msgs/RobotStatus.h> 23 #include <ur_msgs/Analog.h> 24 #include <ur_msgs/Digital.h> 25 #include <ur_msgs/IOStates.h> 26 #include <ur_msgs/MasterboardDataMsg.h> 27 #include <ur_msgs/RobotModeDataMsg.h> 43 inline void appendDigital(std::vector<ur_msgs::Digital>& vec, std::bitset<N> bits)
45 for (
size_t i = 0; i < N; i++)
47 ur_msgs::Digital digi;
48 digi.pin =
static_cast<uint8_t
>(i);
49 digi.state = bits.test(i);
56 void publishRobotStatus(industrial_msgs::RobotStatus& status,
const SharedRobotModeData& data)
const;
61 void publishMasterboardData(ur_msgs::MasterboardDataMsg& msg,
const SharedMasterBoardData& data)
const;
66 void publishRobotModeData(ur_msgs::RobotModeDataMsg& msg,
const SharedRobotModeData& data)
const;
72 : io_pub_(nh_.advertise<ur_msgs::IOStates>(
"ur_driver/io_states", 1))
73 , status_pub_(nh_.advertise<industrial_msgs::RobotStatus>(
"ur_driver/robot_status", 1))
74 , masterboard_state_pub_(nh_.advertise<ur_msgs::MasterboardDataMsg>(
"ur_driver/masterboard_state", 1))
75 , robot_mode_state_pub_(nh_.advertise<ur_msgs::RobotModeDataMsg>(
"ur_driver/robot_mode_state", 1))
virtual void teardownConsumer()
virtual void setupConsumer()
Publisher masterboard_state_pub_
virtual void stopConsumer()
Publisher robot_mode_state_pub_
void appendDigital(std::vector< ur_msgs::Digital > &vec, std::bitset< N > bits)