24 #ifndef THORMANG3_ONLINE_WALKING_MODULE_ONLINE_WALKING_MODULE_H_ 25 #define THORMANG3_ONLINE_WALKING_MODULE_ONLINE_WALKING_MODULE_H_ 29 #include <std_msgs/String.h> 30 #include <sensor_msgs/Imu.h> 31 #include <geometry_msgs/PoseStamped.h> 32 #include <boost/thread.hpp> 33 #include <eigen3/Eigen/Eigen> 37 #include "robotis_controller_msgs/StatusMsg.h" 38 #include "thormang3_walking_module_msgs/RobotPose.h" 39 #include "thormang3_walking_module_msgs/GetReferenceStepData.h" 40 #include "thormang3_walking_module_msgs/AddStepDataArray.h" 41 #include "thormang3_walking_module_msgs/StartWalking.h" 42 #include "thormang3_walking_module_msgs/IsRunning.h" 43 #include "thormang3_walking_module_msgs/RemoveExistingStepData.h" 44 #include "thormang3_walking_module_msgs/SetBalanceParam.h" 45 #include "thormang3_walking_module_msgs/SetJointFeedBackGain.h" 51 #include "thormang3_walking_module_msgs/WalkingJointStatesStamped.h" 64 void process(std::map<std::string, robotis_framework::Dynamixel *> dxls, std::map<std::string, double> sensors);
92 thormang3_walking_module_msgs::SetBalanceParam::Response &res);
95 thormang3_walking_module_msgs::SetJointFeedBackGain::Response &res);
98 thormang3_walking_module_msgs::GetReferenceStepData::Response &res);
100 thormang3_walking_module_msgs::AddStepDataArray::Response &res);
102 thormang3_walking_module_msgs::StartWalking::Response &res);
104 thormang3_walking_module_msgs::IsRunning::Response &res);
106 thormang3_walking_module_msgs::RemoveExistingStepData::Response &res);
111 void setBalanceParam(thormang3_walking_module_msgs::BalanceParam& balance_param_msg);
void updateJointFeedBackGain()
ros::Publisher walking_joint_states_pub_
void setBalanceParam(thormang3_walking_module_msgs::BalanceParam &balance_param_msg)
double balance_update_sys_time_
void process(std::map< std::string, robotis_framework::Dynamixel * > dxls, std::map< std::string, double > sensors)
boost::mutex process_mutex_
boost::thread queue_thread_
virtual ~OnlineWalkingModule()
bool addStepDataServiceCallback(thormang3_walking_module_msgs::AddStepDataArray::Request &req, thormang3_walking_module_msgs::AddStepDataArray::Response &res)
thormang3_walking_module_msgs::BalanceParam current_balance_param_
double balance_update_duration_
Eigen::MatrixXd rot_z_pi_3d_
thormang3_walking_module_msgs::BalanceParam desired_balance_param_
void initialize(const int control_cycle_msec, robotis_framework::Robot *robot)
thormang3_walking_module_msgs::JointFeedBackGain desired_joint_feedback_gain_
thormang3_walking_module_msgs::BalanceParam previous_balance_param_
void setJointFeedBackGain(thormang3_walking_module_msgs::JointFeedBackGain &msg)
int convertStepDataToStepDataMsg(robotis_framework::StepData &src, thormang3_walking_module_msgs::StepData &des)
ros::Publisher done_msg_pub_
thormang3_walking_module_msgs::JointFeedBackGain current_joint_feedback_gain_
thormang3_walking_module_msgs::WalkingJointStatesStamped walking_joint_states_msg_
void publishStatusMsg(unsigned int type, std::string msg)
ros::Publisher robot_pose_pub_
double orientation_pitch_
void publishRobotPose(void)
int r_foot_ft_publish_checker_
double joint_feedback_update_duration_
bool startWalkingServiceCallback(thormang3_walking_module_msgs::StartWalking::Request &req, thormang3_walking_module_msgs::StartWalking::Response &res)
bool removeExistingStepDataServiceCallback(thormang3_walking_module_msgs::RemoveExistingStepData::Request &req, thormang3_walking_module_msgs::RemoveExistingStepData::Response &res)
void updateBalanceParam()
std::map< std::string, int > joint_name_to_index_
ros::Publisher imu_orientation_states_pub_
bool getReferenceStepDataServiceCallback(thormang3_walking_module_msgs::GetReferenceStepData::Request &req, thormang3_walking_module_msgs::GetReferenceStepData::Response &res)
Eigen::MatrixXd balance_update_polynomial_coeff_
thormang3_walking_module_msgs::JointFeedBackGain previous_joint_feedback_gain_
void publishWalkingTuningData()
Eigen::MatrixXd desired_matrix_g_to_rfoot_
bool balance_update_with_loop_
ros::Publisher pelvis_base_msg_pub_
bool setBalanceParamServiceCallback(thormang3_walking_module_msgs::SetBalanceParam::Request &req, thormang3_walking_module_msgs::SetBalanceParam::Response &res)
int convertStepDataMsgToStepData(thormang3_walking_module_msgs::StepData &src, robotis_framework::StepData &des)
bool joint_feedback_update_with_loop_
void publishDoneMsg(std::string msg)
double joint_feedback_update_sys_time_
bool IsRunningServiceCallback(thormang3_walking_module_msgs::IsRunning::Request &req, thormang3_walking_module_msgs::IsRunning::Response &res)
Eigen::MatrixXd desired_matrix_g_to_cob_
thormang3_walking_module_msgs::RobotPose robot_pose_msg_
Eigen::MatrixXd rot_x_pi_3d_
void imuDataOutputCallback(const sensor_msgs::Imu::ConstPtr &msg)
int l_foot_ft_publish_checker_
Eigen::MatrixXd joint_feedback_update_polynomial_coeff_
ros::Publisher status_msg_pub_
bool setJointFeedBackGainServiceCallback(thormang3_walking_module_msgs::SetJointFeedBackGain::Request &req, thormang3_walking_module_msgs::SetJointFeedBackGain::Response &res)
ros::Publisher ft_states_pub_
Eigen::MatrixXd desired_matrix_g_to_lfoot_