ROS navigation package map error

1. Laser not found error

When using the navigation function package of ROS, it is found that the robot does not always correspond to the map position.
There is an error that the laser topic cannot be found.

[ 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.

After checking the code, I found that map_server needs to subscribe to /scantopic, and the name of the topic I wrote is /robot/laser/scan.
Change the name of /robot/laser/scan to /scan.

2. odom coordinate conversion error

After starting the navigation function package, it prompts a coordinate transformation error

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

The total "/" in the global and local cost maps needs to be deleted
insert image description here
insert image description here
. After deletion:

insert image description here
insert image description here

At this time, the navigation function package is running normally.
insert image description here

Guess you like

Origin blog.csdn.net/yangcunbiao/article/details/128605188