teb教程6
代价地图的转换
简介:本部分关于怎样把代价地图转换插件应用到转换占据栅格costmap2d到几何形状来优化(测试阶段)
teb_local_planner包支持costmap_converter插件,这些插件将占据栅格costmap_2d转换为几何形状的障碍物。
默认情况下,占据栅格为点装的障碍物。如果地图分辨率很高,则就需要大量的计算,这可能会在计算拓扑结构中系统不稳定性(取决于障碍物的数量)。另一方面,障碍的转换也需要花费时间。然而,转换时间非常依赖于选择的算法,可以在分开的线程执行。就目前而言,代价地图的转换是实验阶段,就有效性和导航质量的最好配置而言在将来决定。
通过设置参数costmap_converter_plugin插件来激活,可以通过下面代码查看可用的插件:
rospack plugins --attrib=plugin costmap_converter
也可以指定参数costmap_converter_spin_thread以及costmap_converter_rate。
必须在启动代码之前加载插件。障碍物的可视化使用teb_markers。
1.例子参数文件
以下文件costmap_converter_params.yaml描述了怎样设置参数根据机器人导航配置里面;

TebLocalPlannerROS: ## Costmap converter plugin costmap_converter_plugin: "costmap_converter::CostmapToPolygonsDBSMCCH" #costmap_converter_plugin: "costmap_converter::CostmapToLinesDBSRANSAC" #costmap_converter_plugin: "costmap_converter::CostmapToLinesDBSMCCH" #costmap_converter_plugin: "costmap_converter::CostmapToPolygonsDBSConcaveHull" #costmap_converter_plugin: "" # deactivate plugin costmap_converter_spin_thread: True costmap_converter_rate: 5 ## Configure plugins (namespace move_base/TebLocalPlannerROS/PLUGINNAME) ## The parameters must be added for each plugin separately costmap_converter/CostmapToLinesDBSRANSAC: cluster_max_distance: 0.4 cluster_min_pts: 2 ransac_inlier_distance: 0.15 ransac_min_inliers: 10 ransac_no_iterations: 2000 ransac_remainig_outliers: 3 ransac_convert_outlier_pts: True ransac_filter_remaining_outlier_pts: False convex_hull_min_pt_separation: 0.1
现在可以把参数加载到move base空间。将上面文件加载到导航launch文件里面
<node pkg="move_base" type="move_base" respawn="false" name="move_base" output="screen"> <!-- Load all costmap_2d and planner parameters here --> <param name="base_local_planner" value="teb_local_planner/TebLocalPlannerROS" /> <!-- LOAD COSTMAP_CONVERTER PARAMETERS HERE --> <rosparam file="$(find my_robot_name_2dnav)/costmap_converter_params.yaml" command="load" /> </node>
2.完整例子

You can find an example setup with the stage simulator in the teb_local_planner_tutorials package. Install the teb_local_planner_tutorials package Inspect the parameter/config files Launch the diff_drive setup: roslaunch teb_local_planner_tutorials robot_diff_drive_in_stage_costmap_conversion.launch Modify parameters using rosrun rqt_reconfigure rqt_reconfigure or by adapting the files. Switch different costmap conversion algorithms in costmap_converter_params.yaml
【推荐】国内首个AI IDE,深度理解中文开发场景,立即下载体验Trae
【推荐】编程新体验,更懂你的AI,立即体验豆包MarsCode编程助手
【推荐】抖音旗下AI助手豆包,你的智能百科全书,全免费不限次数
【推荐】轻量又高性能的 SSH 工具 IShell:AI 加持,快人一步
· 如何编写易于单元测试的代码
· 10年+ .NET Coder 心语,封装的思维:从隐藏、稳定开始理解其本质意义
· .NET Core 中如何实现缓存的预热?
· 从 HTTP 原因短语缺失研究 HTTP/2 和 HTTP/3 的设计差异
· AI与.NET技术实操系列:向量存储与相似性搜索在 .NET 中的实现
· 地球OL攻略 —— 某应届生求职总结
· 周边上新:园子的第一款马克杯温暖上架
· Open-Sora 2.0 重磅开源!
· 提示词工程——AI应用必不可少的技术
· .NET周刊【3月第1期 2025-03-02】
2016-05-20 1、wei-d-s嵌入式与PC区别,LED等的点亮以及调用C函数
2016-05-20 NAND FLASH和LCD电路图