A question about Service and Client
I followed the tutorials (http://wiki.ros.org/ROS/Tutorials/Wri...). I found that in my client cpp file there's a code line
beginner_tutorials::AddTwoInts srv
and
if (client.call(srv))
So I think the server function received data from client by “srv”.
But in my server cpp file, it says
ros::ServiceServer service = n.advertiseService("add_two_ints", add);
and
`bool add(beginner_tutorials::AddTwoInts::Request &req,
beginner_tutorials::AddTwoInts::Response &res)`{}
so it looks like server function received two variables(one for request one for response).
My question is that if I wrrite it
`bool add(beginner_tutorials::AddTwoInts srv)`{}
will it work?
Thank you.