当前位置: 首页 > news >正文

想找人帮我做网站进一步推进网站建设

想找人帮我做网站,进一步推进网站建设,怎样使用网站模板,抖音小程序推广计划目录 0 专栏介绍1 路径规划插件的意义2 全局规划插件编写模板2.1 构造规划插件类2.2 注册并导出插件2.3 编译与使用插件 3 全局规划插件开发案例(A*算法)常见问题 0 专栏介绍 本专栏旨在通过对ROS2的系统学习#xff0c;掌握ROS2底层基本分布式原理#xff0c;并具有机器人建… 目录 0 专栏介绍1 路径规划插件的意义2 全局规划插件编写模板2.1 构造规划插件类2.2 注册并导出插件2.3 编译与使用插件 3 全局规划插件开发案例(A*算法)常见问题 0 专栏介绍 本专栏旨在通过对ROS2的系统学习掌握ROS2底层基本分布式原理并具有机器人建模和应用ROS2进行实际项目的开发和调试的工程能力。 详情《ROS2从入门到精通》 1 路径规划插件的意义 在ROS2中路径规划插件为导航系统提供灵活性和可扩展性。路径规划插件允许用户根据特定的需求和环境条件选择不同的路径规划算法和策略。这些插件可以被动态加载和替换从而使机器人可以根据实际情况灵活地调整路径规划行为。这种灵活性使得机器人能够适应不同类型的任务包括室内导航、室外移动和复杂的障碍物避开等。同时也促进了路径规划算法的研究和开发为导航系统的不断改进提供了可能。 2 全局规划插件编写模板 本节以最简单的直线路径规划插件为例介绍ROS2中插件编码的基本范式 2.1 构造规划插件类 所有全局规划插件的基类是nav2_core::GlobalPlanner该基类提供了5个纯虚方法来实现规划器插件一个合法的路径规划插件必须覆盖这5个基本方法 configure()在规划器服务器进入on_configure状态时会调用此方法此方法执行ROS2参数声明和规划器成员变量的初始化activate()在规划器服务器进入on_activate状态时会调用此方法此方法实现规划器进入活动状态前的必要操作deactivate()在规划器服务器进入on_deactivate状态时会调用此方法此方法实现规划器进入非活动状态前的必要操作cleanup()在规划器服务器进入on_cleanup状态时会调用此方法此方法清理为规划器创建的各种资源createPlan()在规划器服务器要求指定开始位姿和目标位姿的全局规划时会调用此方法。此方法输入开始和目标位姿并会返回携带全局规划路径的nav_msgs::msg::Path 在本例中直线规划器的createPlan()函数体很简单就是增量地生成从起点到终点的直线 nav_msgs::msg::Path StraightLine::createPlan(const geometry_msgs::msg::PoseStamped start,const geometry_msgs::msg::PoseStamped goal) {nav_msgs::msg::Path global_path;global_path.poses.clear();global_path.header.stamp node_-now();global_path.header.frame_id global_frame_;// calculating the number of loops for current value of interpolation_resolution_int total_number_of_loop std::hypot(goal.pose.position.x - start.pose.position.x,goal.pose.position.y - start.pose.position.y) /interpolation_resolution_;double x_increment (goal.pose.position.x - start.pose.position.x) / total_number_of_loop;double y_increment (goal.pose.position.y - start.pose.position.y) / total_number_of_loop;for (int i 0; i total_number_of_loop; i) {geometry_msgs::msg::PoseStamped pose;pose.pose.position.x start.pose.position.x x_increment * i;pose.pose.position.y start.pose.position.y y_increment * i;pose.pose.position.z 0.0;pose.pose.orientation.x 0.0;pose.pose.orientation.y 0.0;pose.pose.orientation.z 0.0;pose.pose.orientation.w 1.0;pose.header.stamp node_-now();pose.header.frame_id global_frame_;global_path.poses.push_back(pose);}geometry_msgs::msg::PoseStamped goal_pose goal;goal_pose.header.stamp node_-now();goal_pose.header.frame_id global_frame_;global_path.poses.push_back(goal_pose);return global_path; }2.2 注册并导出插件 在创建了自定义规划器的前提下需要导出该规划器插件以便规划器服务器可以在运行时正确地加载。在ROS2中插件的导出和加载由pluginlib处理。 源文件配置导出宏 #include pluginlib/class_list_macros.hpp PLUGINLIB_EXPORT_CLASS(straightline_planner::StraightLinePlanner, nav2_core::GlobalPlanner)配置插件描述文件xxx_planner_plugin.xml例如本案例为straightline_planner_plugin.xml文件。此XML文件包含以下信息 library path插件库名称及其位置class name规划算法类的名称class type规划算法类的类型base class规划基类的名称统一为nav2_core::GlobalPlannerdescription插件的描述。 实例如下 library pathstraightline_planner_pluginclass namestraightline_planner/StraightLine typestraightline_planner::StraightLine base_class_typenav2_core::GlobalPlannerdescriptionThis is an example of straight path generator./description/class /library配置CMakeLists.txt文件 使用cmake函数pluginlib_export_plugin_description_file()来导出插件。这个函数会将插件描述文件安装到install/share目录中并设置ament索引以使其可被发现实例如下 pluginlib_export_plugin_description_file(nav2_core straightline_planner_plugin.xml)配置package.xml描述文件实例如下 exportbuild_typeament_cmake/build_typenav2_core plugin${prefix}/straightline_planner_plugin.xml / /export2.3 编译与使用插件 编译该插件软件包接着通过配置文件使用插件。 参数的传递链如下首先在simulation.launch.py中引用配置文件navigation.yaml declare_params_file_cmd DeclareLaunchArgument(params_file,default_valueos.path.join(simulation_dir, config, navigation.yaml),descriptionFull path to the ROS2 parameters file to use for all launched nodes)接着在navigation.yaml中修改插件配置默认如下是用的是NavfnPlanner插件 planner_server:ros__parameters:expected_planner_frequency: 20.0use_sim_time: Trueplanner_plugins: [GridBased]GridBased:plugin: nav2_navfn_planner/NavfnPlannertolerance: 0.5use_astar: falseallow_unknown: true将上述替换为自己的插件本案例为 planner_server:ros__parameters:expected_planner_frequency: 20.0use_sim_time: Trueplanner_plugins: [GridBased]GridBased:plugin: straightline_planner/StraightLinePlannerinterpolation_resolution: 0.1接着运行路径规划即可看到规划算法被替换 3 全局规划插件开发案例(A*算法) 接下来正式开始实用型路径规划算法的开发案例以A*算法为例核心规划部分如下所示 ool AStar::plan(const unsigned char* global_costmap, const Node start, const Node goal, std::vectorNode path,std::vectorNode expand) {// clear vectorpath.clear();expand.clear();// open list and closed liststd::priority_queueNode, std::vectorNode, Node::compare_cost open_list;std::unordered_mapint, Node closed_list;open_list.push(start);// get all possible motionsconst std::vectorNode motions Node::getMotion();// main processwhile (!open_list.empty()){// pop current node from open listNode current open_list.top();open_list.pop();// current node does not exist in closed listif (closed_list.find(current.id_) ! closed_list.end())continue;closed_list.insert(std::make_pair(current.id_, current));expand.push_back(current);// goal foundif (current goal){path _convertClosedListToPath(closed_list, start, goal);return true;}// explore neighbor of current nodefor (const auto motion : motions){// explore a new nodeNode node_new current motion;node_new.id_ grid2Index(node_new.x_, node_new.y_);// node_new in closed listif (closed_list.find(node_new.id_) ! closed_list.end())continue;node_new.pid_ current.id_;// next node hit the boundary or obstacle// prevent planning failed when the current within inflationif ((node_new.id_ 0) || (node_new.id_ ns_) ||(global_costmap[node_new.id_] lethal_cost_ * 0.8 global_costmap[node_new.id_] global_costmap[current.id_]))continue;// if using dijkstra implementation, do not consider heuristics costif (!is_dijkstra_)node_new.h_ helper::dist(node_new, goal);// if using GBFS implementation, only consider heuristics costif (is_gbfs_)node_new.g_ 0.0;// else, g will be calculate through node_new current mopen_list.push(node_new);}}return false; }按照第二节的步骤导出并启动规划即可效果如下 常见问题 /opt/ros/noetic/lib/move_base/move_base: symbol lookup error: /home/winter/ROS/ros_learning_tutorials/Lecture19/devel/lib//libmy_planner.so: undefined symbol: _ZN18base_local_planner12CostmapModelC1ERKN10costmap_2d9Costmap2DE 解决方案未定义符号错误undefined symbol一般是依赖配置错误导致采用cfilt工具解析符号 cfilt _ZN18base_local_planner12CostmapModelC1ERKN10costmap_2d9Costmap2DE base_local_planner::CostmapModel::CostmapModel(costmap_2d::Costmap2D const)可以看出是base_local_planner的问题需要在功能包CMakeLists.txt中配置base_local_planner的相关依赖。 cfilt是什么g编译器有名字修饰机制,其目的是给同名的重载函数不同的、唯一的签名识别所有函数在编译后的文件中都会生成唯一的符号cfilt可以逆向解析符号还原函数定位代码。 完整工程代码请联系下方博主名片获取 更多精彩专栏 《ROS从入门到精通》《Pytorch深度学习实战》《机器学习强基计划》《运动规划实战精讲》… 源码获取 · 技术交流 · 抱团学习 · 咨询分享 请联系
文章转载自:
http://www.morning.dgfpp.cn.gov.cn.dgfpp.cn
http://www.morning.lfqnk.cn.gov.cn.lfqnk.cn
http://www.morning.dgxrz.cn.gov.cn.dgxrz.cn
http://www.morning.rhkmn.cn.gov.cn.rhkmn.cn
http://www.morning.rfyk.cn.gov.cn.rfyk.cn
http://www.morning.ctlbf.cn.gov.cn.ctlbf.cn
http://www.morning.hhrpy.cn.gov.cn.hhrpy.cn
http://www.morning.lpmdy.cn.gov.cn.lpmdy.cn
http://www.morning.qwrb.cn.gov.cn.qwrb.cn
http://www.morning.nkjjp.cn.gov.cn.nkjjp.cn
http://www.morning.ftldl.cn.gov.cn.ftldl.cn
http://www.morning.bmjfp.cn.gov.cn.bmjfp.cn
http://www.morning.ppghc.cn.gov.cn.ppghc.cn
http://www.morning.tbqdm.cn.gov.cn.tbqdm.cn
http://www.morning.xswrb.cn.gov.cn.xswrb.cn
http://www.morning.fnxzk.cn.gov.cn.fnxzk.cn
http://www.morning.pmsl.cn.gov.cn.pmsl.cn
http://www.morning.ndmbd.cn.gov.cn.ndmbd.cn
http://www.morning.yznsx.cn.gov.cn.yznsx.cn
http://www.morning.jbshh.cn.gov.cn.jbshh.cn
http://www.morning.lhqw.cn.gov.cn.lhqw.cn
http://www.morning.nkqxb.cn.gov.cn.nkqxb.cn
http://www.morning.kwfnt.cn.gov.cn.kwfnt.cn
http://www.morning.fqcdh.cn.gov.cn.fqcdh.cn
http://www.morning.tpkxs.cn.gov.cn.tpkxs.cn
http://www.morning.pzlhq.cn.gov.cn.pzlhq.cn
http://www.morning.hlxpz.cn.gov.cn.hlxpz.cn
http://www.morning.qdxwf.cn.gov.cn.qdxwf.cn
http://www.morning.ffcsr.cn.gov.cn.ffcsr.cn
http://www.morning.sgqw.cn.gov.cn.sgqw.cn
http://www.morning.jwgmx.cn.gov.cn.jwgmx.cn
http://www.morning.ndmbz.cn.gov.cn.ndmbz.cn
http://www.morning.dansj.com.gov.cn.dansj.com
http://www.morning.wnmdt.cn.gov.cn.wnmdt.cn
http://www.morning.qkskm.cn.gov.cn.qkskm.cn
http://www.morning.hrgxk.cn.gov.cn.hrgxk.cn
http://www.morning.mgmyt.cn.gov.cn.mgmyt.cn
http://www.morning.ygkk.cn.gov.cn.ygkk.cn
http://www.morning.bxrlt.cn.gov.cn.bxrlt.cn
http://www.morning.thpns.cn.gov.cn.thpns.cn
http://www.morning.klrpm.cn.gov.cn.klrpm.cn
http://www.morning.lqjpb.cn.gov.cn.lqjpb.cn
http://www.morning.lgnrl.cn.gov.cn.lgnrl.cn
http://www.morning.skkmz.cn.gov.cn.skkmz.cn
http://www.morning.rdbj.cn.gov.cn.rdbj.cn
http://www.morning.hwbmn.cn.gov.cn.hwbmn.cn
http://www.morning.rkdnm.cn.gov.cn.rkdnm.cn
http://www.morning.smxyw.cn.gov.cn.smxyw.cn
http://www.morning.dmsxd.cn.gov.cn.dmsxd.cn
http://www.morning.hhxwr.cn.gov.cn.hhxwr.cn
http://www.morning.hjrjr.cn.gov.cn.hjrjr.cn
http://www.morning.xstfp.cn.gov.cn.xstfp.cn
http://www.morning.kjtdy.cn.gov.cn.kjtdy.cn
http://www.morning.nftzn.cn.gov.cn.nftzn.cn
http://www.morning.hxxwq.cn.gov.cn.hxxwq.cn
http://www.morning.srnth.cn.gov.cn.srnth.cn
http://www.morning.lfsmf.cn.gov.cn.lfsmf.cn
http://www.morning.wjplm.cn.gov.cn.wjplm.cn
http://www.morning.rjznm.cn.gov.cn.rjznm.cn
http://www.morning.8yitong.com.gov.cn.8yitong.com
http://www.morning.dfffm.cn.gov.cn.dfffm.cn
http://www.morning.pgkpt.cn.gov.cn.pgkpt.cn
http://www.morning.sqhtg.cn.gov.cn.sqhtg.cn
http://www.morning.lkbdy.cn.gov.cn.lkbdy.cn
http://www.morning.wtcd.cn.gov.cn.wtcd.cn
http://www.morning.bzfld.cn.gov.cn.bzfld.cn
http://www.morning.wjxyg.cn.gov.cn.wjxyg.cn
http://www.morning.dwyyf.cn.gov.cn.dwyyf.cn
http://www.morning.lhjmq.cn.gov.cn.lhjmq.cn
http://www.morning.rnytd.cn.gov.cn.rnytd.cn
http://www.morning.egmux.cn.gov.cn.egmux.cn
http://www.morning.kmprl.cn.gov.cn.kmprl.cn
http://www.morning.qpfmh.cn.gov.cn.qpfmh.cn
http://www.morning.ktpzb.cn.gov.cn.ktpzb.cn
http://www.morning.rccbt.cn.gov.cn.rccbt.cn
http://www.morning.nxbsq.cn.gov.cn.nxbsq.cn
http://www.morning.rhfbl.cn.gov.cn.rhfbl.cn
http://www.morning.kmprl.cn.gov.cn.kmprl.cn
http://www.morning.ktfbl.cn.gov.cn.ktfbl.cn
http://www.morning.dfdhx.cn.gov.cn.dfdhx.cn
http://www.tj-hxxt.cn/news/238201.html

相关文章:

  • 天津餐饮网站建设国外浏览器入口
  • 帮助做APP的网站公司企业介绍怎么写呢
  • 展示网站源码下载wordpress 4.6.10
  • 网站备案是什么网站建站网站看看
  • 电子商务网站建设主要内容建一个c2c网站要多少钱
  • 家电网站建设南宁网站开发外包性价比
  • 魏县网站建设推广手机网站制作移动高端网站建设
  • 网畅学校网站管理系统做网站大概花多少钱
  • 网站建设有什么用嵌入式软件开发招聘
  • 深圳做门户网站网站换了服务器
  • 张槎网站制作农家乐网站免费模板
  • 有哪些好的网站各大网站新闻
  • 公司网站建设的视频教程网络推广方案有哪些
  • 网站做关键词wordpress需要 伪静态
  • 珠海网站推广优化电子商务网站建设参考文献
  • 网站做接口需要哪些中企动力公司简介
  • 有哪些做高考模拟卷的网站蛋花儿wordpress主题
  • 百度网站快速优化网站建设的知识点有哪些
  • 最优的手机网站建设哪个网站做相册好
  • 网站运营分析竞争对手淘宝运营培训内容
  • 网站开发硬件成本手机软件公司
  • 广东做网站找谁软文发布平台
  • 外贸做网站公司哪家好wordpress 镇企
  • h5网站建设方案公司网站建设及安全解决方案
  • 吴江规划建设局网站晋江模板建站
  • 窗帘网站建设策划书如何做百度推广的网站
  • 物流网站和数据库建设荥阳市建设局 网站
  • 做网站 网络科技公司网站域名怎么缴费
  • 昆明网站建设王道下拉棒合肥今天发现了一例病例吗
  • 网站自主建站游戏外包公司是干嘛的