hi
this is my service client code
include "ros/ros.h"
include "scenario/scenario.h"
include
int main(int argc, char **argv) {
ros::init(argc, argv, "remote");
ros::NodeHandle n;
ros::ServiceClient client = n.serviceClientscenario::scenario("stringa");
ros::Rate loop_rate(0.5);
while (ros::ok()){
scenario::scenario srv;
srv.request.pc="hello word";
if (client.call(srv)){
if((unsigned)srv.response.rasp[0]!=255)
ROS_INFO("%s", srv.response.rasp);
} else
{
ROS_ERROR("Failed to call service scenario");
return 1;
}
ros::spinOnce();
loop_rate.sleep();
}
return 0;
}
but when i launch the program receive ERROR Failed to call service scenario, what is the problem?
P.S i create the service that is called scenario
Originally posted by mrpiccolo on ROS Answers with karma: 36 on 2013-02-11
Post score: 0