90 std::cout <<
"Ros shutdown, proceeding to close the gui." << std::endl;
97 log((
LogLevel) msg->type, msg->status_msg, msg->module_name);
103 std::stringstream logging_model_msg;
105 std::stringstream _sender;
106 _sender <<
"[" << sender <<
"] ";
111 logging_model_msg <<
"[DEBUG] [" <<
ros::Time::now() <<
"]: " << _sender.str() << msg;
116 logging_model_msg <<
"[INFO] [" <<
ros::Time::now() <<
"]: " << _sender.str() << msg;
121 logging_model_msg <<
"[WARN] [" <<
ros::Time::now() <<
"]: " << _sender.str() <<msg;
126 logging_model_msg <<
"<ERROR> [" <<
ros::Time::now() <<
"]: " << _sender.str() <<msg;
131 logging_model_msg <<
"[FATAL] [" <<
ros::Time::now() <<
"]: " << _sender.str() <<msg;
135 QVariant new_row(QString(logging_model_msg.str().c_str()));
144 log(
Info ,
"Send Joint Pose Msg" );
151 log(
Info ,
"Send Kinematics Pose Msg" );
158 log(
Info ,
"Go to Manipulator Initial Pose" );
165 log(
Info ,
"Set BaseModule" );
170 log(
Info ,
"Get Current Joint Pose" );
172 manipulator_h_base_module_msgs::GetJointPose _get_joint_pose;
175 for (
int _id = 0; _id < joint_name.size(); _id++ )
176 _get_joint_pose.request.joint_name.push_back( joint_name[ _id ] );
181 manipulator_h_base_module_msgs::JointPose _joint_pose;
183 for (
int _id = 0; _id < _get_joint_pose.response.joint_name.size(); _id++ )
185 _joint_pose.name.push_back( _get_joint_pose.response.joint_name[ _id ] );
186 _joint_pose.value.push_back( _get_joint_pose.response.joint_value[ _id ]);
192 log(
Error,
"fail to get joint pose.");
197 log(
Info ,
"Get Current Kinematics Pose" );
199 manipulator_h_base_module_msgs::GetKinematicsPose _get_kinematics_pose;
202 _get_kinematics_pose.request.group_name = group_name;
207 manipulator_h_base_module_msgs::KinematicsPose _kinematcis_pose;
209 _kinematcis_pose.name = _get_kinematics_pose.request.group_name;
210 _kinematcis_pose.pose = _get_kinematics_pose.response.group_pose;
215 log(
Error,
"fail to get kinematcis pose.");
ServiceClient serviceClient(const std::string &service_name, bool persistent=false, const M_string &header_values=M_string())
void sendSetModeMsg(std_msgs::String msg)
void publish(const boost::shared_ptr< M > &message) const
Subscriber subscribe(const std::string &topic, uint32_t queue_size, void(T::*fp)(M), T *obj, const TransportHints &transport_hints=TransportHints())
void sendJointPoseMsg(manipulator_h_base_module_msgs::JointPose msg)
ROSCPP_DECL void init(int &argc, char **argv, const std::string &name, uint32_t options=0)
bool call(MReq &req, MRes &res)
ros::Publisher set_mode_msg_pub_
void getKinematicsPose(std::string group_name)
void getJointPose(std::vector< std::string > joint_name)
QStringListModel logging_model_
void sendKinematicsPoseMsg(manipulator_h_base_module_msgs::KinematicsPose msg)
ros::Subscriber status_msg_sub_
ros::Publisher ini_pose_msg_pub_
#define ROS_FATAL_STREAM(args)
QNode(int argc, char **argv)
void statusMsgCallback(const robotis_controller_msgs::StatusMsg::ConstPtr &msg)
void updateCurrentKinematicsPose(manipulator_h_base_module_msgs::KinematicsPose)
ros::Publisher kinematics_pose_msg_pub_
ros::Publisher joint_pose_msg_pub_
ros::ServiceClient get_kinematics_pose_client_
Publisher advertise(const std::string &topic, uint32_t queue_size, bool latch=false)
void log(const LogLevel &level, const std::string &msg, std::string sender="GUI")
#define ROS_WARN_STREAM(args)
#define ROS_DEBUG_STREAM(args)
ros::ServiceClient get_joint_pose_client_
#define ROS_INFO_STREAM(args)
ROSCPP_DECL bool isStarted()
ROSCPP_DECL void shutdown()
#define ROS_ERROR_STREAM(args)
ROSCPP_DECL void spinOnce()
ROSCPP_DECL void waitForShutdown()
void sendIniPoseMsg(std_msgs::String msg)
void updateCurrentJointPose(manipulator_h_base_module_msgs::JointPose)