ROS高效编程报错(chapter6)之tf error: canTransform: target_frame map does not exist...

WARN内容:

[ WARN] [1668997938.328142035, 54.946000000]: Timed out waiting for transform from base_footprint to map to become available before running costmap, tf error: canTransform: target_frame map does not exist.. canTransform returned after 0.1 timeout was 0.1.
[ WARN] [1668997939.661214357, 55.932000000]: No laser scan received (and thus no pose updates have been published) for 55.932000 seconds.  Verify that data is being published on the /scan topic.
RVIZ效果图:

ROS高效编程报错(chapter6)之tf error: canTransform: target_frame map does not exist..._第1张图片

查看当前tf树:

ROS高效编程报错(chapter6)之tf error: canTransform: target_frame map does not exist..._第2张图片

说明当前缺少到/map主题的tf转换关系。

解决方法:

手动添加静态转换关系。

在包含tf转换关系的.launch文件中添加以下两行:

<node pkg="tf" type="static_transform_publisher" name="fix_map" args="0 0 0 0 0 0 map odom 50" />
<node pkg="tf" type="static_transform_publisher" name="fix_odom" args="0 0 0 0 0 0 odom base_footprint 50" />

再次查看当前tf树:ROS高效编程报错(chapter6)之tf error: canTransform: target_frame map does not exist..._第3张图片

RVIZ效果图:

ROS高效编程报错(chapter6)之tf error: canTransform: target_frame map does not exist..._第4张图片

检查终端,不再产生上述WARN内容。

你可能感兴趣的:(c++)