node handle.serviceClient -- for a python connection??

asked 2014-05-01 10:30:49 -0500

blakeh gravatar image

updated 2014-05-01 10:31:25 -0500

How do I set up the service in cpp code template which references a python service? The example for cpp client requires a .h file for the service:

2        #include "beginner_tutorials/AddTwoInts.h" 
...
15       ros::ServiceClient client = n.serviceClient<beginner_tutorials::addtwoints>("add_two_ints"); 

But even by looking at the github sources for node_handle, I'm not able to figure out the way to call this when the service is python based. The examples / tutorials further illustrate that cpp client can talk to a python service (and the other way around), but this is based on building both client and service in their respective worlds.

edit retag flag offensive close merge delete

Comments

The key to this turned out to be finding "AddTwoInts.h". despite triple checking my CMakelists.txt and package.xml files I could not get catkin to "autogenerate" this file. Instead I found it in the hydro examples and used it as is. This then worked. Not a satisfactory solution! (there is an earlier question from 2011 with this same issue which was never answered!)

blakeh gravatar image blakeh  ( 2014-05-02 06:20:27 -0500 )edit