ROS Noetic更换最新版teb_local_planner功能包编译报错has no member named ‘feasibility_check_lookahead...解决方法

文章讲述了在使用Noetic版本的teb_local_planner时遇到编译错误,原因是代码尝试使用新版本添加的配置参数,但ROS默认路径下的旧版本包头文件中不存在这些参数。解决方法是删除旧版本头文件并重新编译。
摘要由CSDN通过智能技术生成

   今天将最新版Noetic版本的teb_local_planner功能包放到工作空间内进行编译时产生了以下报错:

在这里插入图片描述

/home/gly/catkin_ws/src/local_planner/teb_local_planner-noetic-devel/src/teb_config.cpp: In member function ‘void teb_local_planner::TebConfig::reconfigure(teb_local_planner::TebLocalPlannerReconfigureConfig&):
/home/gly/catkin_ws/src/local_planner/teb_local_planner-noetic-devel/src/teb_config.cpp:202:57: error:class teb_local_planner::TebLocalPlannerReconfigureConfighas no member namedfeasibility_check_lookahead_distance202 |   trajectory.feasibility_check_lookahead_distance = cfg.feasibility_check_lookahead_distance;
      |                                                         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/home/gly/catkin_ws/src/local_planner/teb_local_planner-noetic-devel/src/teb_config.cpp:204:45: error:class teb_local_planner::TebLocalPlannerReconfigureConfighas no member namedcontrol_look_ahead_poses204 |   trajectory.control_look_ahead_poses = cfg.control_look_ahead_poses;
      |                                             ^~~~~~~~~~~~~~~~~~~~~~~~
/home/gly/catkin_ws/src/local_planner/teb_local_planner-noetic-devel/src/teb_config.cpp:205:55: error:class teb_local_planner::TebLocalPlannerReconfigureConfighas no member namedprevent_look_ahead_poses_near_goal205 |   trajectory.prevent_look_ahead_poses_near_goal = cfg.prevent_look_ahead_poses_near_goal;
      |                                                       ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/home/gly/catkin_ws/src/local_planner/teb_local_planner-noetic-devel/src/teb_config.cpp:218:43: error:class teb_local_planner::TebLocalPlannerReconfigureConfighas no member nameduse_proportional_saturation218 |   robot.use_proportional_saturation = cfg.use_proportional_saturation;
      |                                           ^~~~~~~~~~~~~~~~~~~~~~~~~~~
/home/gly/catkin_ws/src/local_planner/teb_local_planner-noetic-devel/src/teb_config.cpp:219:11: error:class teb_local_planner::TebLocalPlannerReconfigureConfighas no member namedmax_vel_trans; did you mean ‘max_vel_theta’?
  219 |   if (cfg.max_vel_trans == 0.0)
      |           ^~~~~~~~~~~~~
      |           max_vel_theta
/home/gly/catkin_ws/src/local_planner/teb_local_planner-noetic-devel/src/teb_config.cpp:222:9: error:class teb_local_planner::TebLocalPlannerReconfigureConfighas no member namedmax_vel_trans; did you mean ‘max_vel_theta’?
  222 |     cfg.max_vel_trans = robot.max_vel_x;
      |         ^~~~~~~~~~~~~
      |         max_vel_theta
/home/gly/catkin_ws/src/local_planner/teb_local_planner-noetic-devel/src/teb_config.cpp:224:29: error:class teb_local_planner::TebLocalPlannerReconfigureConfighas no member namedmax_vel_trans; did you mean ‘max_vel_theta’?
  224 |   robot.max_vel_trans = cfg.max_vel_trans;
      |                             ^~~~~~~~~~~~~
      |                             max_vel_theta
/home/gly/catkin_ws/src/local_planner/teb_local_planner-noetic-devel/src/teb_config.cpp:230:42: error:class teb_local_planner::TebLocalPlannerReconfigureConfighas no member namedtrans_stopped_vel230 |   goal_tolerance.trans_stopped_vel = cfg.trans_stopped_vel;
      |                                          ^~~~~~~~~~~~~~~~~
/home/gly/catkin_ws/src/local_planner/teb_local_planner-noetic-devel/src/teb_config.cpp:231:42: error:class teb_local_planner::TebLocalPlannerReconfigureConfighas no member namedtheta_stopped_vel231 |   goal_tolerance.theta_stopped_vel = cfg.theta_stopped_vel;
      |                                          ^~~~~~~~~~~~~~~~~
/home/gly/catkin_ws/src/local_planner/teb_local_planner-noetic-devel/src/teb_config.cpp:244:52: error:class teb_local_planner::TebLocalPlannerReconfigureConfighas no member namedobstacle_proximity_ratio_max_vel244 |   obstacles.obstacle_proximity_ratio_max_vel = cfg.obstacle_proximity_ratio_max_vel;
      |                                                    ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/home/gly/catkin_ws/src/local_planner/teb_local_planner-noetic-devel/src/teb_config.cpp:245:50: error:class teb_local_planner::TebLocalPlannerReconfigureConfighas no member namedobstacle_proximity_lower_bound245 |   obstacles.obstacle_proximity_lower_bound = cfg.obstacle_proximity_lower_bound;
      |                                                  ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/home/gly/catkin_ws/src/local_planner/teb_local_planner-noetic-devel/src/teb_config.cpp:246:50: error:class teb_local_planner::TebLocalPlannerReconfigureConfighas no member namedobstacle_proximity_upper_bound246 |   obstacles.obstacle_proximity_upper_bound = cfg.obstacle_proximity_upper_bound;
      |                                                  ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/home/gly/catkin_ws/src/local_planner/teb_local_planner-noetic-devel/src/teb_config.cpp:269:46: error:class teb_local_planner::TebLocalPlannerReconfigureConfighas no member namedweight_velocity_obstacle_ratio269 |   optim.weight_velocity_obstacle_ratio = cfg.weight_velocity_obstacle_ratio;
      |                                              ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/home/gly/catkin_ws/src/local_planner/teb_local_planner-noetic-devel/src/teb_config.cpp:277:47: error:class teb_local_planner::TebLocalPlannerReconfigureConfighas no member namedmax_number_plans_in_current_class277 |   hcp.max_number_plans_in_current_class = cfg.max_number_plans_in_current_class;
      |                                               ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/home/gly/catkin_ws/src/local_planner/teb_local_planner-noetic-devel/src/teb_config.cpp:283:44: error:class teb_local_planner::TebLocalPlannerReconfigureConfighas no member namedselection_dropping_probability283 |   hcp.selection_dropping_probability = cfg.selection_dropping_probability;
      |                                            ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/home/gly/catkin_ws/src/local_planner/teb_local_planner-noetic-devel/src/teb_config.cpp:299:46: error:class teb_local_planner::TebLocalPlannerReconfigureConfighas no member nameddivergence_detection_enable299 |   recovery.divergence_detection_enable = cfg.divergence_detection_enable;
      |                                              ^~~~~~~~~~~~~~~~~~~~~~~~~~~
/home/gly/catkin_ws/src/local_planner/teb_local_planner-noetic-devel/src/teb_config.cpp:300:55: error:class teb_local_planner::TebLocalPlannerReconfigureConfighas no member nameddivergence_detection_max_chi_squared300 |   recovery.divergence_detection_max_chi_squared = cfg.divergence_detection_max_chi_squared;
      |                                                       ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
make[2]: *** [local_planner/teb_local_planner-noetic-devel/CMakeFiles/teb_local_planner.dir/build.make:128:local_planner/teb_local_planner-noetic-devel/CMakeFiles/teb_local_planner.dir/src/teb_config.cpp.o] 错误 1
make[1]: *** [CMakeFiles/Makefile2:726:local_planner/teb_local_planner-noetic-devel/CMakeFiles/teb_local_planner.dir/all] 错误 2
make: *** [Makefile:141:all] 错误 2
Invoking "make -j1 -l1" failed

   1、报错内容

   总结一下大致是 error: ‘class teb_local_planner::TebLocalPlannerReconfigureConfig’ has no member named ‘xxx’这一类的错误

   2、报错原因

   报错原因是之前采用了以下语句,在ROS默认路径下安装了旧版本的teb_local_palnner,使得在/opt/ros/noetic/include路径下存在着旧版本teb_local_palnner所对应的一系列头文件

sudo apt install ros-noetic-teb-local-planner

   新版本的teb_local_palnner添加了上述报错内容中的参数,然而这些参数在旧版本的TebLocalPlannerReconfigureConfig.h文件中编写的teb_local_planner::TebLocalPlannerReconfigureConfig类中是不存在的,因此,当我们在自己创建的工作空间下第一次进行新的teb_local_palnner包的编译时,由于之前没有编译过,自然也就没有生成这个新包对应的TebLocalPlannerReconfigureConfig.h文件,而在ROS的默认路径中却存在旧版本的这个文件,旧版本的这个文件中缺少新加入的参数,因此发送报错。

   3、报错内容解决方法

   (1)、打开一个新的终端,执行以下语句,进入存放该旧版头文件的目录下

cd /opt/ros/noetic/include

   (2)、执行以下语句删除旧版teb_local_palnner包的相关头文件

sudo rm -rf ./teb_local_planner/

   4、方法验证

   此时,在存放新的teb_lcoal_planner功能包的工作空间下进行编译,即可成功编译

在这里插入图片描述

   编译成功后在工作空间的devel/include/teb_local_planner文件夹下生成了新的TebLocalPlannerReconfigureConfig.h

在这里插入图片描述


### 回答1: 您好,很高兴为您服务。我可以为您介绍Teb Local Planner,它是一种强大的路径规划算法,可以帮助机人在复杂的外部环境中安全地执行任务。它可以帮助机人执行复杂的任务,如路径跟踪、自主导航、避障等。 ### 回答2: teb_local_planner是一个基于ROS(机人操作系统)的路径规划,用于无人机和机人的自主导航功能TebTimed Elastic Band)是一种时间弹性带路径优化方法,用来解决动态环境下全局路径规划与局部避障的问题。 teb_local_planner着眼于机人在未知环境中实时规划安全、高效的运动轨迹。它通过结合速度、加速度和时间的概念,将路径规划问题转化为动态控制问题,并考虑机人的动力学约束。 teb_local_planner的核心思想是使用弹性带(Elastic Band)来表示机人运动轨迹的一系列离散步骤。根据当前环境和目标,teb_local_planner会在弹性带上进行优化,得到机人要遵循的最佳路径。这样,机人可以实时根据传感数据和全局路径调整运动轨迹,避免障碍物和动态障碍物,实现高效的路径跟踪。 teb_local_planner的优势在于其快速、可扩展的性能。它可以在动态环境中处理高速移动的机人,并在短时间内对局部路径进行快速重规划,适应性强。此外,teb_local_planner的参数也可以通过ROS的参数服务进行调整,以满足不同机人和环境的需求。 总的来说,teb_local_planner是一种基于时间弹性带路径优化方法路径规划,能够在动态环境中实现自主导航,并通过实时调整运动轨迹来避开障碍物、跟踪全局路径,提供高效、安全的移动能力。 ### 回答3: teb_local_planner是一种基于时间空间弧线(timing elastic band)的本地路径规划。它在ROS(Robot Operating System)平台上广泛应用于移动机人的自主导航系统中。 teb_local_planner具有以下特点和功能: 1. 路径优化:它能够根据机人的动力学特性和局部环境导航信息,自动生成路径并对其进行优化。通过引入时间作为路径的第三维度,它能够在路径规划中考虑到速度和加速度的限制,从而生成非常平滑的路径。 2. 避障能力:teb_local_planner能够根据传感提供的信息,如激光雷达或RGB-D摄像头数据,实时感知并避免检测到的障碍物。它通过障碍物的代价函数来评估路径的质量,并根据规划的设置,能够灵活地调整路径以避免障碍物。 3. 快速规划:这个本地路径规划的设计目标是快速生成可行的路径,以满足实时运动控制的需求。它使用了高效的数据结构和算法,能够在较短的时间内生成可行的路径。 4. 高度定制化:teb_local_planner具有很高的可配置性,允许用户根据具体应用的需求来调整规划的参数。例如,用户可以设置机人的动力学约束、障碍物的感知范围和权重等,以满足不同场景下的导航需求。 总结而言,teb_local_planner是一种基于时间空间弧线的本地路径规划,具有路径优化、避障能力、快速规划和高度定制化等功能。它在移动机人的自主导航系统中发挥着重要作用,能够帮助机人安全、高效地规划和执行路径。
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

慕羽★

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值