39 #include <actionlib/TwoIntsAction.h> 41 bool add(
const actionlib::TwoIntsGoal & req, actionlib::TwoIntsResult & res)
43 res.sum = req.a + req.b;
44 ROS_INFO_NAMED(
"actionlib",
"request: x=%ld, y=%ld", (int64_t)req.a, (int64_t)req.b);
45 ROS_INFO_NAMED(
"actionlib",
" sending back response: [%ld]", (int64_t)res.sum);
49 int main(
int argc,
char ** argv)
51 ros::init(argc, argv,
"add_two_ints_server");
56 boost::bind(
add, _1, _2));
#define ROS_INFO_NAMED(name,...)
ROSCPP_DECL void init(int &argc, char **argv, const std::string &name, uint32_t options=0)
bool add(const actionlib::TwoIntsGoal &req, actionlib::TwoIntsResult &res)
int main(int argc, char **argv)