8 :right_number_(0),left_number_(0)
10 ROS_INFO(
"hand_control_server start");
24 ROS_INFO(
"Initialized Handcontroller");
33 noid_ros_controller::HandControl::Response& _res)
36 uint16_t script_number;
42 else if(_req.position ==
"left") send_number =
left_number_;
44 ROS_ERROR(
"please input \"right\" or \"left\". ");
45 _res.result =
"service call failed";
52 else if(_req.script ==
"cancel") script_number =
SCRIPT_CANCEL;
54 ROS_ERROR(
"please input \"grasp\", \"ungrasp\" or \"cancel\".");
55 _res.result =
"service call failed";
59 ROS_INFO(
"motion: %s", _req.script.c_str());
bool HandControlCallback(noid_ros_controller::HandControl::Request &_req, noid_ros_controller::HandControl::Response &_res)
NoidHandController(const ros::NodeHandle &_nh, noid_robot_hardware::NoidRobotHW *_in_hw)
ServiceServer advertiseService(const std::string &service, bool(T::*srv_func)(MReq &, MRes &), T *obj)
ros::ServiceServer grasp_control_server_
const uint16_t SCRIPT_CANCEL
const uint16_t SCRIPT_GRASP
bool getParam(const std::string &key, std::string &s) const
void runHandScript(uint8_t _number, uint16_t _script, uint8_t _current)
bool hasParam(const std::string &key) const
noid_robot_hardware::NoidRobotHW * hw_
const uint16_t SCRIPT_UNGRASP