Go to the documentation of this file.
36 #include <boost/thread/thread.hpp>
44 if ( driver == NULL )
return;
46 ROS_INFO(
"[KhiRobotCommandService] Start" );
55 bool KhiRobotClient::open(
const std::string& ip,
const double& period, KhiRobotData& data,
const bool in_simulation )
60 driver =
new KhiRobotKrnxDriver();
73 if (
driver == NULL ) {
return false; }
80 if (
driver == NULL ) {
return false; }
94 if (
driver == NULL ) {
return; }
102 if (
driver == NULL ) {
return; }
109 if (
driver == NULL ) {
return; }
130 if (
driver == NULL ) {
return false; }
137 if (
driver == NULL ) {
return; }
void startCommandService()
virtual bool open(const int &cont_no, const std::string &ip_address, KhiRobotData &data)=0
virtual bool initialize(const int &cont_no, const double &period, KhiRobotData &data, const bool in_simulation=false)=0
virtual bool activate(const int &cont_no, KhiRobotData &data)=0
virtual bool close(const int &cont_no)=0
virtual bool hold(const int &cont_no, const KhiRobotData &data)=0
void deactivate(const KhiRobotData &data)
virtual bool commandHandler(khi_robot_msgs::KhiRobotCmd::Request &req, khi_robot_msgs::KhiRobotCmd::Response &res)=0
virtual bool writeData(const int &cont_no, const KhiRobotData &data)=0
virtual bool deactivate(const int &cont_no, const KhiRobotData &data)=0
void read(KhiRobotData &data)
virtual bool getPeriodDiff(const int &cont_no, double &diff)=0
bool activate(KhiRobotData &data)
int getStateTrigger(const int &cont_no)
bool open(const std::string &ip, const double &period, KhiRobotData &data, const bool in_simulation=false)
bool hold(const KhiRobotData &data)
int updateState(const KhiRobotData &data)
void KhiCommandService(KhiRobotDriver *driver)
ROSCPP_DECL void waitForShutdown()
virtual bool readData(const int &cont_no, KhiRobotData &data)=0
void write(const KhiRobotData &data)
virtual bool updateState(const int &cont_no, const KhiRobotData &data)=0
bool getPeriodDiff(double &diff)