使用teb做局部路径规划
在运行到:
roslaunch teb_local_planner_tutorials dyn_obst_corridor_scenario.launch
的时候,持续出现如下报错:
Warning: Invalid argument “/robot_0/base_laser_link” passed to canTransform argument source_frame in tf2 frame_ids cannot start with a ‘/’ like:
at line 134 in /tmp/binarydeb/ros-melodic-tf2-0.6.5/src/buffer_core.cpp
[ERROR] [1612252812.105444878, 4.800000000]: TF Exception that should never happen for sensor frame: , cloud frame: /robot_0/base_laser_link, Invalid argument “/robot_0/base_laser_link” passed to lookupTransform argument source_frame in tf2 frame_ids cannot start with a ‘/’ like:
究其原因是navigation_stack在melodic更换了tf2,然而tf2在读取frame名字的时候,不能写成/name
,而是要写成name
但是这个问题出在了stage_ros这个仿真器里。这个仿真器的源码已经好多年没人维护了。
要想正常使用,我们只能clone下来,对源码进行更改。
link:
https://github.com/ros-simulation/stage_ros/pull/63/commits/52d894eb3d322e7d86b380db6d8c4432a69ab8ab
链接是修改的版本,clone下来替换原来的stage_ros即可。