19 #ifndef ACTION_MOTION_MODULE_H_ 20 #define ACTION_MOTION_MODULE_H_ 22 #define _USE_MATH_DEFINES 28 #include <std_msgs/Int32.h> 29 #include <std_msgs/String.h> 30 #include <boost/thread.hpp> 32 #include "robotis_controller_msgs/StatusMsg.h" 33 #include "op3_action_module_msgs/IsRunning.h" 34 #include "op3_action_module_msgs/StartAction.h" 48 void process(std::map<std::string, robotis_framework::Dynamixel *> dxls, std::map<std::string, double> sensors);
53 bool loadFile(std::string file_name);
56 bool start(
int page_number);
57 bool start(std::string page_name);
64 bool isRunning(
int* playing_page_num,
int* playing_step_num);
70 void actionPlayProcess(std::map<std::string, robotis_framework::Dynamixel *> dxls);
90 op3_action_module_msgs::IsRunning::Response &res);
double convertw4095ToRad(int w4095)
ros::Publisher status_msg_pub_
bool loadFile(std::string file_name)
std::string convertIntToString(int n)
std::map< int, std::string > joint_id_to_name_
boost::thread queue_thread_
void resetPage(action_file_define::Page *page)
std::map< std::string, bool > action_joints_enable_
void actionPlayProcess(std::map< std::string, robotis_framework::Dynamixel * > dxls)
void setChecksum(action_file_define::Page *page)
bool createFile(std::string file_name)
void process(std::map< std::string, robotis_framework::Dynamixel * > dxls, std::map< std::string, double > sensors)
bool verifyChecksum(action_file_define::Page *page)
bool start(int page_number)
void publishStatusMsg(unsigned int type, std::string msg)
action_file_define::Page next_play_page_
void startActionCallback(const op3_action_module_msgs::StartAction::ConstPtr &msg)
void publishDoneMsg(std::string msg)
bool isRunningServiceCallback(op3_action_module_msgs::IsRunning::Request &req, op3_action_module_msgs::IsRunning::Response &res)
bool action_module_enabled_
int convertRadTow4095(double rad)
void initialize(const int control_cycle_msec, robotis_framework::Robot *robot)
bool loadPage(int page_number, action_file_define::Page *page)
action_file_define::Step current_step_
const int NONE_ZERO_FINISH
ros::Publisher done_msg_pub_
std::map< std::string, robotis_framework::DynamixelState * > action_result_
std::map< std::string, int > joint_name_to_id_
action_file_define::Page play_page_
void pageNumberCallback(const std_msgs::Int32::ConstPtr &msg)
bool first_driving_start_
bool savePage(int page_number, action_file_define::Page *page)