mirror of
https://github.com/6-robot/waterplus_map_tools.git
synced 2025-09-15 12:59:09 +08:00
update navi server
This commit is contained in:
parent
32842a4136
commit
3fa7302149
@ -68,20 +68,20 @@ int main(int argc, char** argv)
|
||||
MoveBaseClient ac("move_base", true);
|
||||
move_base_msgs::MoveBaseGoal goal;
|
||||
|
||||
//wait for the action server to come up
|
||||
while(!ac.waitForServer(ros::Duration(5.0)))
|
||||
{
|
||||
if(!ros::ok())
|
||||
break;
|
||||
ROS_INFO("Waiting for the move_base action server to come up");
|
||||
}
|
||||
|
||||
ros::Rate r(30);
|
||||
|
||||
while(ros::ok())
|
||||
{
|
||||
if(bNewCmd)
|
||||
{
|
||||
//wait for the action server to come up
|
||||
while(!ac.waitForServer(ros::Duration(5.0)))
|
||||
{
|
||||
if(!ros::ok())
|
||||
break;
|
||||
ROS_INFO("Waiting for the move_base action server to come up");
|
||||
}
|
||||
|
||||
goal.target_pose.header.frame_id = "map";
|
||||
goal.target_pose.header.stamp = ros::Time::now();
|
||||
goal.target_pose.pose = goal_pose;
|
||||
|
||||
@ -83,20 +83,20 @@ int main(int argc, char** argv)
|
||||
MoveBaseClient ac("move_base", true);
|
||||
move_base_msgs::MoveBaseGoal goal;
|
||||
|
||||
//wait for the action server to come up
|
||||
while(!ac.waitForServer(ros::Duration(5.0)))
|
||||
{
|
||||
if(!ros::ok())
|
||||
break;
|
||||
ROS_INFO("Waiting for the move_base action server to come up");
|
||||
}
|
||||
|
||||
ros::Rate r(30);
|
||||
|
||||
while(ros::ok())
|
||||
{
|
||||
if(bNewCmd)
|
||||
{
|
||||
//wait for the action server to come up
|
||||
while(!ac.waitForServer(ros::Duration(5.0)))
|
||||
{
|
||||
if(!ros::ok())
|
||||
break;
|
||||
ROS_INFO("Waiting for the move_base action server to come up");
|
||||
}
|
||||
|
||||
goal.target_pose.header.frame_id = "map";
|
||||
goal.target_pose.header.stamp = ros::Time::now();
|
||||
goal.target_pose.pose = wp_pose;
|
||||
|
||||
Loading…
Reference in New Issue
Block a user