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
需要将全局和局部代价地图总的“/”删除
删除后:
此时导航功能包正常运行。