I have the following project, a 4 wheeled robot based on ROS2 official documentation and some additional Internet sources. The link points to a ZIP, simply unpacking it inside "src" of a ROS2 workspace should be sufficient.
Link: https://drive.google.com/file/d/1ZmeCwVyIyx-YxXgc8N7IfW2KdkjQGAxS/view?usp=sharing
In a zip, the lidar is commented out, just so it doesn't clog the picture. However, before that, I had it enabled, navigated the robot around and got a map (it is in a "maps" folder now).
The next step - one I failed - was to load the map into RViz. What I do:
Terminal 1: ros2 launch navigation_bot_05 main_simulation_launch.py world:=src/worlds/maze.sdf map:='src/maps/map.yaml' slam:=False
This brings up RViz and Gazebo, but RViz doesn't show the robot yet, as it is configured to show map, which is not there yet. To fix it:
Terminal 2: ros2 launch slam_toolbox online_async_launch.py
Now we have a robot and (if we enable lidar) it can drive around and scan.
... and I am getting "[global_costmap.global_costmap]: Can't update static costmap layer, no map received"
Could someone please tell me how to fix this package and what is wrong in it? Thank you.