How can I call a ROS-service that was neither written nor published by me from within C++ code?
I see the service listed when using
rosservice list, which shows me
and I can call it easily by using
rosservice call /airsim_node/SimpleFlight1/takeoff for instance.
Now, what I want, is to work with this service from within a C++ file (send request, receive response).
The documentation explains how to do this but requires you to have access to the service's source such as its compiled source code or even its *srv-file.
But I want to call an arbitrary service that is out of my scope. I, as a user, am able to do this via
rosservice call, so I guess it should be simple to do the same via code?