Service call
Hi
I am trying to call a ros service via your library from a not ROS computer, but I face some problems in getting the feedback from ROS.
I can see that the Socket TCP connection receives the data, but I cannot register a callback function to readout the data.
` I call the service in the following way;
ROSService srv(ros,"/database/get_data","/database/get_data"); bson_t b; bson_init (&b); bson_t *ms = BCON_NEW("", ""); FunVrROSServiceResponseMsg fun = std::bind(&Ros::callback, this,std::placeholders::_1); srv.CallService(ms, fun);`
And I have implemented the callback like this:
void Ros::callback(ROSBridgeServiceResponseMsg &msg){ bson_t bson; msg.FromBSON(bson); }
Do you have any sample code that show how to use the library?
Thanks /Thomas
Hi!
Do you get this output: https://github.com/Sanic/rosbridge2cpp/blob/master/src/ros_bridge.cpp#L119 ? Can you check if https://github.com/Sanic/rosbridge2cpp/blob/master/src/ros_bridge.cpp#L113 is even called when your response is send?