23 #ifndef thormang3_demo_QNODE_HPP_ 24 #define thormang3_demo_QNODE_HPP_ 34 #include <QStringListModel> 37 #include <std_msgs/Bool.h> 38 #include <std_msgs/Int32.h> 39 #include <std_msgs/String.h> 40 #include <sensor_msgs/JointState.h> 41 #include <geometry_msgs/Pose2D.h> 42 #include <geometry_msgs/Pose.h> 43 #include <geometry_msgs/PointStamped.h> 44 #include <visualization_msgs/MarkerArray.h> 45 #include <visualization_msgs/InteractiveMarker.h> 48 #include <boost/thread.hpp> 49 #include <yaml-cpp/yaml.h> 50 #include <eigen3/Eigen/Eigen> 52 #include "humanoid_nav_msgs/PlanFootsteps.h" 54 #include "robotis_controller_msgs/JointCtrlModule.h" 55 #include "robotis_controller_msgs/GetJointModule.h" 56 #include "robotis_controller_msgs/StatusMsg.h" 58 #include "thormang3_feet_ft_module_msgs/BothWrench.h" 60 #include "thormang3_manipulation_module_msgs/JointPose.h" 61 #include "thormang3_manipulation_module_msgs/KinematicsPose.h" 62 #include "thormang3_manipulation_module_msgs/GetJointPose.h" 63 #include "thormang3_manipulation_module_msgs/GetKinematicsPose.h" 65 #include "thormang3_walking_module_msgs/SetBalanceParam.h" 66 #include "thormang3_walking_module_msgs/SetJointFeedBackGain.h" 68 #include "thormang3_foot_step_generator/FootStepCommand.h" 69 #include "thormang3_foot_step_generator/Step2DArray.h" 114 void log(
const LogLevel& level,
const std::string& msg, std::string sender =
"Demo");
136 void sendIkMsg(thormang3_manipulation_module_msgs::KinematicsPose msg);
142 void setWalkingBalanceParam(
const double& gyro_gain,
const double& ft_gain_ratio,
const double& imu_time_const,
143 const double& ft_time_const);
153 void playMotion(
int motion_index,
bool to_action_script =
true);
161 void kickDemo(
const std::string& kick_foot);
211 void initFTFootCallback(
const thormang3_feet_ft_module_msgs::BothWrench::ConstPtr& msg);
214 void poseCallback(
const geometry_msgs::Pose::ConstPtr& msg);
bool getIDJointNameFromIndex(const int &index, int &id, std::string &joint_name)
void statusMsgCallback(const robotis_controller_msgs::StatusMsg::ConstPtr &msg)
void sendInitPoseMsg(std_msgs::String msg)
void clearInteractiveMarker()
ros::Subscriber pose_sub_
void pointStampedCallback(const geometry_msgs::PointStamped::ConstPtr &msg)
ros::Publisher motion_page_pub_
ros::Publisher set_walking_footsteps_pub_
ros::Publisher marker_pub_
void parseMotionMapFromYaml(const std::string &path)
void poseCallback(const geometry_msgs::Pose::ConstPtr &msg)
void visualizePreviewFootsteps(bool clear)
ros::Publisher init_ft_pub_
void sendDestJointMsg(thormang3_manipulation_module_msgs::JointPose msg)
void setBalanceParameter()
ros::Subscriber current_module_control_sub_
ros::ServiceClient set_balance_param_client_
QNodeThor3(int argc, char **argv)
void setWalkingBalanceParam(const double &gyro_gain, const double &ft_gain_ratio, const double &imu_time_const, const double &ft_time_const)
ros::Publisher set_head_joint_angle_pub_
std::vector< int > preview_foot_types_
ros::Publisher module_control_pub_
bool isUsingModule(const std::string &module_name)
void getKinematicsPose(std::string group_name)
void setWalkingFootsteps()
void enableControlModule(const std::string &mode)
thormang3_walking_module_msgs::SetBalanceParam set_balance_param_srv_
void setWalkingBalance(bool on_command)
ros::Subscriber current_joint_states_sub_
ros::Subscriber init_ft_foot_sub_
void getJointControlModule()
bool loadBalanceParameterFromYaml()
void kickDemo(const std::string &kick_foot)
void playMotion(int motion_index, bool to_action_script=true)
void sendGripperPosition(sensor_msgs::JointState msg)
QStringListModel logging_model_
void refreshCurrentJointControlCallback(const robotis_controller_msgs::JointCtrlModule::ConstPtr &msg)
void updateCurrOri(double x, double y, double z, double w)
ros::Subscriber rviz_clicked_point_sub_
void updatePresentJointControlModules(std::vector< int > mode)
static const double RADIAN2DEGREE
ROSLIB_DECL std::string command(const std::string &cmd)
bool getJointNameFromID(const int &id, std::string &joint_name)
ros::ServiceClient get_module_control_client_
std::map< std::string, int > mode_index_table_
void interactiveMarkerFeedback(const visualization_msgs::InteractiveMarkerFeedbackConstPtr &feedback)
thormang3_walking_module_msgs::SetJointFeedBackGain set_joint_feedback_gain_srv_
void setCurrentControlUI(int mode)
static const double DEGREE2RADIAN
ros::Publisher motion_index_pub_
ros::Publisher send_des_joint_msg_pub_
ros::ServiceClient get_joint_pose_client_
void makeFootstepUsingPlanner()
ros::Publisher module_control_preset_pub_
void updateDemoPose(const geometry_msgs::Pose pose)
void parseJointNameFromYaml(const std::string &path)
std::vector< geometry_msgs::Pose2D > preview_foot_steps_
ros::Subscriber status_msg_sub_
std::map< int, std::string > index_mode_table_
geometry_msgs::Pose current_pose_
ros::Publisher send_gripper_pub_
ros::Subscriber kenematics_pose_sub_
boost::shared_ptr< interactive_markers::InteractiveMarkerServer > interactive_marker_server_
ros::ServiceClient get_kinematics_pose_client_
std::string package_name_
std::map< int, std::string > id_joint_table_
ros::ServiceClient humanoid_footstep_client_
ros::Publisher init_pose_pub_
void updateCurrPos(double x, double y, double z)
void log(const LogLevel &level, const std::string &msg, std::string sender="Demo")
void getJointPose(std::string joint_name)
void setWalkingCommand(thormang3_foot_step_generator::FootStepCommand msg)
std::map< std::string, bool > using_mode_table_
void getKinematicsPoseCallback(const geometry_msgs::Pose::ConstPtr &msg)
void initFTFootCallback(const thormang3_feet_ft_module_msgs::BothWrench::ConstPtr &msg)
geometry_msgs::Pose pose_from_ui_
void updateHeadJointStatesCallback(const sensor_msgs::JointState::ConstPtr &msg)
std::map< int, std::string > module_table_
void updateHeadJointsAngle(double pan, double tilt)
ros::Publisher send_ik_msg_pub_
std::string getModuleName(const int &index)
std::map< int, std::string > motion_table_
void manipulationDemo(const int &index)
void initFTCommand(std::string command)
void updateDemoPoint(const geometry_msgs::Point point)
ros::ServiceClient set_joint_feedback_gain_client_
ros::Publisher move_lidar_pub_
void sendIkMsg(thormang3_manipulation_module_msgs::KinematicsPose msg)
bool loadFeedbackGainFromYaml()
int getModuleIndex(const std::string &mode_name)
ros::Subscriber both_ft_foot_sub_
void makeInteractiveMarker(const geometry_msgs::Pose &marker_pose)
void getInteractiveMarkerPose()
QStringListModel * loggingModel()
ros::Publisher set_walking_balance_pub_
ros::Publisher set_walking_command_pub_
std::map< std::string, int > joint_id_table_
void updateInteractiveMarker(const geometry_msgs::Pose &pose)
ros::Publisher send_ini_pose_msg_pub_
void updateCurrJoint(double value)
bool getIDFromJointName(const std::string &joint_name, int &id)
void setHeadJoint(double pan, double tilt)