标签:io os ar on cti html as htm har
#include "ros/ros.h"
#include "std_msgs/Int16.h"
#include <move_base_msgs/MoveBaseAction.h>
#include <actionlib/client/simple_action_client.h>
#include "std_srvs/Empty.h"
#include <cstdlib>
int main(int argc, char **argv)
{
ros::init(argc, argv, "robot_global_localization");
ros::NodeHandle n;
ros::ServiceClient client = n.serviceClient<std_srvs::Empty>("global_localization");
std_srvs::Empty srv;
if (client.call(srv))//服务调用
{
ROS_INFO(" Successful call");
}
else
{
ROS_ERROR("Failed to call service global_location");
return 1;
}
return 0;
}
调用/global_localization服务,自主定位
标签:io os ar on cti html as htm har
原文地址:http://blog.csdn.net/dxuehui/article/details/40683887