Cannot ouput string service via ROS_INFO
I have a service of type string, my server simply responds with a string. I am trying to implement my client to simply call the service and ROS_INFO out the response. However, when I try to compile I get an error on the line where I am doing the ROS_INFO output. The error is:
error: cannot pass objects of non-trivially-copyable type ‘struct std::basic_string<char>’ through ‘...’
Here is my code:
parallax_eddie_robot::get_version srv;
if(get_version_client_.call(srv))
{
ROS_INFO("%s",srv.response.version);
}
I don't know why it thinks my service is returning a struct because my service file (myservice.srv) is only for a string. It looks like this:
string version