geometry_msgs::PoseStamped Start;
Start.header.seq = ;
Start.header.stamp = Time();
Start.header.frame_id = "map";
Start.pose.position.x = x1;
Start.pose.position.y = y1;
Start.pose.position.z = 0.0;
Start.pose.orientation.x = 0.0;
Start.pose.orientation.y = 0.0;
Start.pose.orientation.w = 1.0; geometry_msgs::PoseStamped Goal;
Goal.header.seq = ;
Goal.header.stamp = Time();
Goal.header.frame_id = "map";
Goal.pose.position.x = x2;
Goal.pose.position.y = y2;
Goal.pose.position.z = 0.0;
Goal.pose.orientation.x = 0.0;
Goal.pose.orientation.y = 0.0;
Goal.pose.orientation.w = 1.0; ServiceClient check_path = nh_.serviceClient<nav_msgs::GetPlan>("make_plan");
nav_msgs::GetPlan srv;
srv.request.start = Start;
srv.request.goal = Goal;
srv.request.tolerance = 1.5; ROS_INFO("Make plan: %d", (check_path.call(srv) ? : ));
ROS_INFO("Plan size: %d", srv.response.plan.poses.size()); move_base_msgs::MoveBaseGoal move_goal;
move_goal.target_pose.header.frame_id = "map";
move_goal.target_pose.header.stamp = Time(); move_goal.target_pose.pose.position.x = x;
move_goal.target_pose.pose.position.y = y;
move_goal.target_pose.pose.position.z = 0.0;
move_goal.target_pose.pose.orientation.x = 0.0;
move_goal.target_pose.pose.orientation.y = 0.0;
move_goal.target_pose.pose.orientation.w = 1.0; ROS_INFO("Sending goal");
ac_.sendGoal(move_goal,boost::bind(&ExploreAction::doneCb, this, _1, _2));

参考:

https://answers.ros.org/question/264369/move_base-make_plan-service-is-returning-an-empty-path/

最新文章

  1. jquery-validation 使用
  2. Android 进阶Android 中的 IOC 框架 【ViewInject】 (上)
  3. Jmeter--HTTP Cookie管理器
  4. 删除svn文件的批处理文件
  5. @Html.DropDownList 设置选中值无效
  6. Android adb 无线调试
  7. SHA-2 Certificate Signing Request
  8. 从ajax获取的数据无法通过Jquery选择器来调用事件
  9. DDoS-Deflate安装及配置
  10. JVM调优总结10-调优方法
  11. MongoDB的交互(mongodb/node-mongodb-native)、MongoDB入门
  12. “Cache-control”常见的取值有private、no-cache、max-age、must-revalidate等
  13. 团体程序设计天梯赛-练习集L1-010. 比较大小
  14. linux配置备忘
  15. ActiveMQ (二) 常用配置简介
  16. Oracle闪回恢复
  17. JavaScript中的高阶函数
  18. Git里有些费解的术语和设计
  19. java解决手机上传竖拍照片旋转90\180\270度问题
  20. 安装Thinkphp5

热门文章

  1. NoSql 使用小结
  2. C# mailKit 发邮件 简单代码
  3. H5之拖拽
  4. 开源项目hutool之zip_slip漏洞
  5. What is Verbose Garbage Collection (verbosegc) and How do I Enable it on WebLogic
  6. PL/SQL Developer_如何快速获得表名或全部列名的文本形式
  7. 开源框架---tensorflow c++ API 一个卡了很久的问题
  8. FRDM-KL43开发板驱动段式液晶SLCD的实现方法
  9. Redis未授权访问漏洞复现及修复方案
  10. YUSS Round 1