1 #include <ros/console.h>
3 #include <ros/node_handle.h>
4 #include <ros/service_client.h>
6 #include <ed_msgs/Configure.h>
23 int main(
int argc,
char **argv)
26 ros::removeROSArgs(argc, argv, myargv);
27 if (myargv.
size() != 2)
33 ros::init(argc, argv,
"ed_configure");
36 ros::ServiceClient
client = nh.serviceClient<ed_msgs::Configure>(
"ed/configure");
39 if (!config_file.exists())
41 ROS_ERROR_STREAM(
"Could not configure ED: config file '" << config_file.string() <<
"' does not exist");
46 resolve_config.
env =
true;
47 resolve_config.
file =
false;
48 resolve_config.
rospkg =
false;
52 ROS_ERROR_STREAM(
"Could not configure ED: Error during parsing of the config file '" << config_file.string() <<
"' "<<
std::endl <<
std::endl <<
config.
error());
56 ed_msgs::Configure srv;
65 ROS_ERROR_STREAM(
"Could not configure ED: Service call failed");
69 if (!srv.response.error_msg.empty())
71 ROS_ERROR_STREAM(
"Could not configure ED:\n\n" + srv.response.error_msg);