ROS-melodic:源码安裝teb_local_planner算法、替换DWA算法

news2025/2/14 7:05:25

一.安裝teb_local_planner算法

源码下载地址:GitHub - rst-tu-dortmund/teb_local_planner: An optimal trajectory planner considering distinctive topologies for mobile robots based on Timed-Elastic-Bands (ROS Package)

 注意选择对应ROS版本的代码。

 放在navigation目录下(或者自己创建一个):

安装缺失依赖:

rosdep install teb_local_planner

 在src当前目录下运行:

	  rosdep install --from-paths src --ignore-src --rosdistro=<ros_version> -y

编译:

      catkin_make -DCATKIN_WHITELIST_PACKAGES="teb_local_planner"

在编译过程中会出现缺包,对应安装就好了。

查看是否安装成功:

rospack plugins --attrib=plugin nav_core

会出现以下相关信息:

teb_local_planner /home/catkin_navigation/src/navigation/teb_local_planner-melodic-devel/teb_local_planner_plugin.xml

测试:

roslaunch teb_local_planner test_optim_node.launch

 二.teb替代DWA算法

move_base.launch文件中添加teb配置内容:

<launch>
  <!-- Arguments -->
  <arg name="model" default="$(env TURTLEBOT3_MODEL)" doc="model type [burger, waffle, waffle_pi]"/>
  <arg name="cmd_vel_topic" default="/cmd_vel" />
  <arg name="odom_topic" default="odom" />
  <arg name="move_forward_only" default="false"/><!--true机器人只能向前运动-->

  <!-- move_base -->
  <node pkg="move_base" type="move_base" respawn="false" name="move_base" output="screen">
    <!--加载Dijkstra、A star算法-->
    <param name="base_global_planner" value="global_planner/GlobalPlanner"/>
    <param name="planner_frequency" value="1.0" />
    <param name="planner_patience" value="5.0" />
    <!--加载DWA算法
    <param name="base_local_planner" value="dwa_local_planner/DWAPlannerROS" />-->
    <!--加载TEB算法-->
    <param name="base_local_planner" value="teb_local_planner/TebLocalPlannerROS" />
    <!--配置文件-->
    <rosparam file="$(find turtlebot3_navigation)/param/costmap_common_params_$(arg model).yaml" command="load" ns="global_costmap" />
    <rosparam file="$(find turtlebot3_navigation)/param/costmap_common_params_$(arg model).yaml" command="load" ns="local_costmap" />
    <rosparam file="$(find turtlebot3_navigation)/param/local_costmap_params.yaml" command="load" />
    <rosparam file="$(find turtlebot3_navigation)/param/global_costmap_params.yaml" command="load" />
    <rosparam file="$(find turtlebot3_navigation)/param/move_base_params.yaml" command="load" />
    <!--DWA配置文件-->
    <rosparam file="$(find turtlebot3_navigation)/param/dwa_local_planner_params_$(arg model).yaml" command="load" />
    <!--TEB配置文件-->
    <rosparam file="$(find turtlebot3_navigation)/param/teb_local_planner_params.yaml" command="load" />
    <remap from="cmd_vel" to="$(arg cmd_vel_topic)"/>
    <remap from="odom" to="$(arg odom_topic)"/>
    <param name="DWAPlannerROS/min_vel_x" value="0.0" if="$(arg move_forward_only)" />
  </node>
</launch>

turtlebot3_navigation/param文件夹下创建teb_local_planner_params.yaml文件:

TebLocalPlannerROS:
  odom_topic: odom
  map_frame: map

  # Trajectory
  teb_autosize: True
  dt_ref: 0.5
  dt_hysteresis: 0.05
  min_samples: 3
  global_plan_overwrite_orientation: True
  global_plan_viapoint_sep: 0.1 # negative, do not use viapoints. positive, use them. the actual value does not matter
  max_global_plan_lookahead_dist: 1.5
  global_plan_prune_distance: 0.6
  force_reinit_new_goal_dist: 1.0
  feasibility_check_no_poses: 3
  publish_feedback: false
  allow_init_with_backwards_motion: true
  exact_arc_length: false
  shrink_horizon_backup: true
  shrink_horizon_min_duration: 10

  # Robot
  max_vel_x: 0.22
  max_vel_x_backwards: 0.5
  max_vel_theta: 2.75
  max_vel_y: 0.0
  acc_lim_y: 0.0
  acc_lim_x: 2.5
  acc_lim_theta: 3.2
  min_turning_radius: 0.0
  wheelbase: 0.0 # not used, is differential
  cmd_angle_instead_rotvel: false # not used, is differential
  footprint_model: # types: "point", "circular", "two_circles", "line", "polygon"
#    type: "circular"
#    radius: 0.5 # for type "circular"
#    type: "line"
#    line_start: [-0.0545, 0.0] # for type "line"
#    line_end: [0.0545, 0.0] # for type "line"
# front_offset: 0.2 # for type "two_circles"
# front_radius: 0.2 # for type "two_circles"
# rear_offset: 0.2 # for type "two_circles"
# rear_radius: 0.2 # for type "two_circles"
    type: "polygon"
    vertices: [[-0.105, -0.105], [-0.105, 0.105], [0.041, 0.105], [0.041, -0.105]] # for type "polygon"

  # GoalTolerance
  xy_goal_tolerance: 0.05
  yaw_goal_tolerance: 0.17
  free_goal_vel: False

  # Obstacles
  min_obstacle_dist: 0.1 # minimum distance to obstacle: it depends on the footprint_model
  inflation_dist: 0.0 # greater than min_obstacle_dist to take effect
  include_costmap_obstacles: True # use the local costmap
  costmap_obstacles_behind_robot_dist: 1.0 # distance at which obstacles behind the robot are taken into account
  legacy_obstacle_association: false
  obstacle_poses_affected: 30 # unused if legacy_obstacle_association is false
  obstacle_association_force_inclusion_factor: 10.0 # the obstacles that will be taken into account are those closer than min_obstacle_dist*factor, if legacy is false
  obstacle_association_cutoff_factor: 40.0 # the obstacles that are further than min_obstacle_dist * factor will not be taken into account, if legacy is false
#  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: 10

  # Optimization
  no_inner_iterations: 5
  no_outer_iterations: 4
  optimization_activate: True # optimize
  optimization_verbose: False
  penalty_epsilon: 0.1
  weight_max_vel_x: 2
  weight_max_vel_y: 1
  weight_max_vel_theta: 1
  weight_acc_lim_x: 1
  weight_acc_lim_y: 1
  weight_acc_lim_theta: 1
  weight_kinematics_nh: 1 # is a holonomic robot
  weight_kinematics_forward_drive: 10 # prefer forward driving, for differential
  weight_kinematics_turning_radius: 0 # prefer turns that respect the min_turning_radius, not used if differential (min_turning_radius = 0)
  weight_optimaltime: 1.0 # prefer trajectories with less transition time
  weight_obstacle: 50.0 # prefer trajectories that respect the min_obstacle_dist
  weight_inflation: 0.1 # prefer trajectories that respect the inflation of the obstacles
  #weight_dynamic_obstacle: 10 # not in use yet
  weight_viapoint: 1.0 # prefer trajectories that respect the viapoints in the global path
  weight_adapt_factor: 2 # factor to multiply some weights (currently only weight_obstacle) at each iteration (gives better results than a huge value for the weight)

  # Homotopy Class Planner
  enable_homotopy_class_planning: True # currently not used

效果展示:

参考:【ROS】Turtlebot3局部避障TEB算法配置_move_base三维导航_RockWang.的博客-CSDN博客

本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若转载,请注明出处:http://www.coloradmin.cn/o/645320.html

如若内容造成侵权/违法违规/事实不符,请联系多彩编程网进行投诉反馈,一经查实,立即删除!

相关文章

宝塔安装yapi

宝塔安装部署YApi图文教程&#xff0c;YApi旨在为开发、产品、测试人员提供更优雅的接口管理服务。可以帮助开发者轻松创建、发布、维护 API。 官方文档&#xff1a;https://hellosean1025.github.io/yapi/ 1.给宝塔安装PM2管理器同时安装node 下面看一下使用宝塔的PM2管理器…

掌握SQL注入利器:SQLMap使用入门教程及技巧分享

1、SQLMap安装与使用 SQLMap 是一个功能强大的自动化 SQL 注入工具&#xff0c;它可以用于检测和利用 SQL 注入漏洞。以下是 SQLMap 的使用教程的基本步骤&#xff1a; 1.安装 SQLMap&#xff1a; 首先&#xff0c;你需要从 SQLMap 的官方网站下载并安装 SQLMap 工具。根据你…

#2023开放原子全球开源峰会之旅

#2023我在开源峰会 2023开放原子全球开源峰会参会指南 嗨咯&#xff0c;大家好&#xff01; 6月11号&#xff0c;是一年一度的开放原子大会&#xff0c;有幸参加&#xff0c;很开心&#xff01; 文章目录 1、逛展区&#xff08;领周边&#xff09;环节1.1 CSDN展区1.2 阿里云 …

frp实现内网穿透(内网服务器到公网访问的方案)

目录 背景: 一、frp的简介 二、Frp Server的配置 三.Frp Client的配置 背景: 我使用python写了一个http后端&#xff0c;如代码所示&#xff0c;ip为10.1.136.73&#xff0c;port为8000&#xff0c;现在需要把http后端在公网可以被使用。一个较简单的方案是通过frp实现内网…

Centos7/Centos8安装Mysql8

​ 1.检测系统。 是否已经安装过mysql或其依赖&#xff0c;若已装过要先将其删除&#xff0c;否则第4步使用yum安装时会报错&#xff1a; # yum list installed | grep mysql若出现如下所示&#xff0c;则用第三行中的命令删掉mysql&#xff1a; # yum list installed | gr…

为什么超三成制造企业上市公司选择用友U9 cloud?

导读&#xff1a;30%制造企业上市公司和40%专精特新制造业上市公司都选择用友U9 cloud 当前&#xff0c;数智化转型已经成为中国制造重构竞争力、实现高质量发展的必经之路。《“十四五”智能制造发展规划》提出&#xff0c;到2025年&#xff0c;70%的规模以上制造业企业基本实…

命名管道:FIFO

至此&#xff0c;我们还只能在相关的程序之间传递数据&#xff0c;即这些程序是由一个共同的祖先进程启动的。但如果我们想在不相关的进程之间交换数据&#xff0c;这还不是很方便。 我们可以用FIFO文件来完成这项工作&#xff0c;它通常也被称为命名管道&#xff08;named pip…

一文看尽所有生成式模型:9大类别21个模型全回顾! DALL-E 2、Text-to-3D模型

DALL-E 2 由OpenAI开发的DALL-E 2能够从由文本描述组成的提示中生成原始、真实、逼真的图像和艺术&#xff0c;而且OpenAI已经对外提供了API来访问该模型。 DALL-E 2特别之处在于它能够将概念、属性和不同风格结合起来&#xff0c;其能力源于语言-图像预训练模型CLIP神经网络…

【SCI/EI录用案例】2区快刊1个月22天录用,新增5篇录用、1篇见刊、8篇检索

2023年6月3日-2023年6月9日 经核实&#xff0c;由我处Unionpub学术推荐的5篇论文已被期刊部录用、1篇见刊、8篇检索&#xff0c;以下是部分案例展示&#xff1a; 2区智能算法类SCI&EI 【期刊简介】IF:4.0-5.0&#xff0c;JCR2区&#xff0c;中科院3区 【检索情况】SCI&…

Win10底部任务栏无响应,跟着这3个方法做!

我的电脑型号是win10的&#xff0c;但最近我使用电脑时&#xff0c;出现了一件非常奇怪的事情&#xff0c;我点击桌面底部的任务栏&#xff0c;它不仅无响应&#xff0c;有时还会卡顿很久&#xff0c;不知道遇到win10底部任务栏无响应的情况应该怎么做呢&#xff1f;希望大家给…

AIGC繁花,绽放在精耕的算力土壤之上

2023年的春天&#xff0c;称得上一句AI之春。大模型成为技术力量新的爆发点&#xff0c;生成式AI&#xff08;AIGC&#xff09;应用风起云涌。 产业界争先恐后训大模型之际&#xff0c;广大用户最大的困惑是——发布了&#xff0c;但就是玩不到啊&#xff01; OpenAI有地域限制…

618有哪些数码好物值得入手?盘点几款618值得买的数码好物分享

距离618大促结束还有几天&#xff0c;还有谁没有入手几款数码好物的&#xff01;眼下618还没有彻底结束&#xff0c;现在上车还来得及。下面来给大家盘点几款数码好物&#xff0c;话不多说&#xff0c;一起来看看吧。 1.南卡OE不入耳蓝牙耳机 南卡OE不入耳蓝牙耳机采用了不入耳…

WDM波分复用技术:TFF(薄膜滤波) AWG(阵列波导光栅)介绍

WDM &#xff08;Wavelength Division Multiplexing&#xff09;技术是通过在光纤中传输多个不同波长的光信号来扩大光纤传输带宽并提高网络传输能力的一种技术&#xff0c;而TFF(薄膜滤波)和AWG&#xff08;阵列波导光栅&#xff09;则是两种常用的WDM技术。 TFF技术 TFF &a…

【统计模型】缺失数据处理方法

目录 一、缺失数据定义 二、缺失数据原因 三、缺失数据处理步骤 四、数据缺失机制 1.完全随机缺失&#xff08;MCAR&#xff09; 2.随机缺失&#xff08;MAR&#xff09; 3.非随机、不可忽略缺失&#xff08;NMAR&#xff09; 五、缺失数据处理方法 1.直接删除 2.缺失值…

耳朵小戴什么耳机合适,耳朵小佩戴都舒适的几款骨传导耳机分享

​骨传导耳机是通过骨骼震动来传递声音&#xff0c;不用经过外耳道和鼓膜&#xff0c;因此不会损伤听力&#xff0c;同时佩戴也更加舒适&#xff0c;不会影响对周围环境的感知。并且骨传导耳机的核心技术在于骨传导&#xff0c;它通过耳机后挂部分将声音直接传递到耳道&#xf…

skywalking-agent-java默认不支持spring cloud gateway问题

解决skywalking-agent-java不支持spring cloud gateway问题 开发环境&#xff1a;Windows10 、JDK17 下载解压Java Agent skywalking官网下载地址&#xff1a;https://skywalking.apache.org/downloads/ 解压目录为&#xff1a;D:\Programs\soft-Plugins\apache-skywalking…

CSS查缺补漏之常用文本属性、列表属性、表格属性、鼠标属性

文本属性 letter-spacing&#xff1a; 表示字母或汉字间距&#xff1b; word-spacing&#xff1a;表示单词之间或汉字之间空格的间距 <div>Loremip sumdolors itametconsecteturadipisicingelit.Voluptas.</div> <div>这是一首简单的小情歌 唱着我们心肠的曲…

探索小程序开发:2023年的全面指南

小程序是一种无需下载的应用程序&#xff0c;它可以在您的手机上打开&#xff0c;而无需在计算机上打开。小程序通过其快速&#xff0c;低成本&#xff0c;功能强大且易于使用的优势而成为更广泛的互联网趋势。 那么&#xff0c;您为什么探索小程序开发&#xff1f;开发过程可…

Unity Class深拷贝问题分析

Unity Class深拷贝问题分析 前言常用解决方案1.手动复制字段2.使用序列化工具3.使用Instantiate方法(只能用于MonoBehaviour)4.重写运算符赋值5.使用Visual Scripting中提供的拷贝函数&#xff08;推荐&#xff09; 前言 在Unity项目中&#xff0c;我们面临一个读取数据表并深…

3--Gradle入门 - 创建普通的Java工程

3--Gradle入门 - 创建普通的Java工程 前言 前面我们以及尝试过使用 Gradle 创建项目&#xff0c;下面我们使用 Idea 来创建普通的Java工程 创建普通的Java工程 1. 创建 Gradle 管理依赖的项目 语言设置 Java 依赖设置 Gradle DSL 使用 Groovy 2. 设置项目使用本地的 gradle …