Foxy, RViz: Can't update static costmap layer
Hi, 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/1HiOjy_yukd2RJsHtdtc9ELe9hSBqXrhT/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 navigationbot04 launch_sim.launch world:=src/worlds/maze.sdf
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 slamtoolbox onlineasync_launch.py
Now we have a robot and (if we enable lidar) it can drive around and scan.
Now I want to load map.
Terminal 3: ros2 launch nav2bringup navigationlaunch.py
... and I am getting "[globalcostmap.globalcostmap]: Can't update static costmap layer, no map received"
Also, if you look in rsp.launch.py, you can see that I tried other ways of bringing up the map server. No luck.
Could someone please tell me how to fix this package and what is wrong in it? Thank you.
Asked by Fizpok on 2023-01-19 08:56:38 UTC
Comments
Don't post zip files. That can contain any random malware or be taken down later. Create a git repository and post the code there.
Asked by stevemacenski on 2023-01-19 16:16:44 UTC