ROS导航包map错误

1. 找不到激光错误

在使用ROS的导航功能包时,发现机器人人始终和地图位置不对应。
出现找不到激光topic错误。

[ WARN] [1673180313.860695432, 35.640000000]: No laser scan received (and thus no pose updates have 
been published) for 35.639000 seconds.  Verify that data is being published on the /scan topic.

检查代码后发现map_server需要订阅/scantopic,而自己写的topic的名字是/robot/laser/scan。
将/robot/laser/scan名字改为/scan即可。

2.odom坐标转换错误

启动导航功能包后,提示坐标转换错误

Warning: Invalid argument "/odom" passed to canTransform argument target_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

需要将全局和局部代价地图总的“/”删除
在这里插入图片描述
在这里插入图片描述
删除后:

在这里插入图片描述
在这里插入图片描述

此时导航功能包正常运行。
在这里插入图片描述

猜你喜欢

转载自blog.csdn.net/yangcunbiao/article/details/128605188
今日推荐