calling service with ros::ServiceClient [closed]
I posted the code and the error that i see when i do rosmake. someone can halp me for detecting the error?
#include <ros/ros.h>
#include "gazebo_msgs/SetModelState.h"
...
ros::ServiceClient client = n.serviceClient<gazebo_msgs::SetModelState>("/gazebo/set_model_state");
gazebo_msgs::SetModelState setmodelstate;
gazebo_msgs::ModelState modelstate;
setmodelstate.request.model_state = modelstate;
if (client.call(setmodelstate))
{
ROS_INFO("BRILLIANT!!!");
}
else
{
ROS_ERROR("Failed to call service ");
}
I don't see your rosmake error. Can you post the _entire_ source file? We'll need to see everything to debug.
Also the console output of the compile error is useful.