void callback1(const std_msgs::Float64::ConstPtr& msg1)
{
ROS_INFO("I heard the angle: [%f]", msg1->data);
angel = msg1->data;
angel=angel+5;
if (0<=angel<=180)
angel2 = (angel/360)*3.1415926;
else
{ angel=angel-360;
angel2 = (angel/360)*3.1415926;}
MoveBaseClient ac1("move_base", true);
while(!ac1.waitForServer(ros::Duration(5.0))){
ROS_INFO("Waiting for the move_base action server to come up");
}
move_base_msgs::MoveBaseGoal goal1;
//在base_link坐标基础上旋转
goal1.target_pose.header.frame_id = "base_link";
//时间戳设置为now
goal1.target_pose.header.stamp = ros::Time::now();
//四元数,x,y取0,表示围绕z轴旋转
goal1.targe