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, boost::placeholders::_1, boost::placeholders::_2));