24 #include <std_msgs/String.h> 26 #include "../include/rh_p12_rn_gui/qnode.hpp" 81 std::cout <<
"Ros shutdown, proceeding to close the gui." << std::endl;
97 rh_p12_rn_base_module_msgs::GetItemValue _srv;
98 _srv.request.joint_name =
"gripper";
99 _srv.request.item_name = item_name;
102 return (uint32_t)_srv.response.value;
110 std::stringstream logging_model_msg;
115 logging_model_msg <<
"[DEBUG] [" <<
ros::Time::now() <<
"]: " << msg;
120 logging_model_msg <<
"[INFO] [" <<
ros::Time::now() <<
"]: " << msg;
125 logging_model_msg <<
"[INFO] [" <<
ros::Time::now() <<
"]: " << msg;
130 logging_model_msg <<
"[ERROR] [" <<
ros::Time::now() <<
"]: " << msg;
135 logging_model_msg <<
"[FATAL] [" <<
ros::Time::now() <<
"]: " << msg;
139 QVariant new_row(QString(logging_model_msg.str().c_str()));
ServiceClient serviceClient(const std::string &service_name, bool persistent=false, const M_string &header_values=M_string())
void refreshValue(int pos, int curr)
void publish(const boost::shared_ptr< M > &message) const
ROSCPP_DECL void init(int &argc, char **argv, const std::string &name, uint32_t options=0)
void setPosition(const robotis_controller_msgs::SyncWriteItem &msg)
bool call(MReq &req, MRes &res)
void log(const LogLevel &level, const std::string &msg)
ros::ServiceClient get_item_value_client_
QNode(int argc, char **argv)
QStringListModel logging_model
#define ROS_FATAL_STREAM(args)
ros::Publisher sync_write_position_pub_
ros::Publisher sync_write_item_pub_
uint32_t getItemValue(std::string item_name)
Publisher advertise(const std::string &topic, uint32_t queue_size, bool latch=false)
#define ROS_WARN_STREAM(args)
#define ROS_DEBUG_STREAM(args)
#define ROS_INFO_STREAM(args)
ROSCPP_DECL bool isStarted()
ROSCPP_DECL void shutdown()
#define ROS_ERROR_STREAM(args)
ROSCPP_DECL void spinOnce()
void setCtrlItem(const robotis_controller_msgs::SyncWriteItem &msg)
ROSCPP_DECL void waitForShutdown()