how to load a map in rviz
hello, I loaded a map in gazebo but in rviz i dont have the same. So how can i load my map in rviz? i am working in ubuntu. thanks in advance for youre answers
ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange |
hello, I loaded a map in gazebo but in rviz i dont have the same. So how can i load my map in rviz? i am working in ubuntu. thanks in advance for youre answers
Old question but just for future reference I will reply as I perceive the question.
To add map in rviz you simply click the "Add" button on the left panel of rviz.
Then the easiest way is to choose "By topic" and scroll until you find the map topic you want to visualize. This will be either the /map
or /move_base/global_costmap/costmap
and /move_base/local_costmap/costmap
.
Asked: 2020-03-21 07:41:50 -0500
Seen: 7,053 times
Last updated: Jun 02 '21
Display pose in RViz with custom pose msg
Setting octomap resolution doesn't work
Wheels have no transform to base_link - Real robot
How to make laser data visible on all Fixed Frames in RVIZ?
rqt-image-view datatype mismatch
Stage and Rviz : Incompatibility
diff_drive_controller odometry issues
Integrate free space into octomap
Ground plain is not visible, while using block_laser GAZEBO plugin [closed]
Robot Rotating relative to odom in RViz when it is stationary
Gazebo is a simulator, rviz a visualization software. In rviz you only get the data the robot perceives (sensors) or has in its databse. You need to SLAM/map the gazebo world to make its robot perception equivalent available in rviz. So the robot needs to "scan" the gazebo world, translate it into some kind of map format, and publish it (via a map server in many cases). Most of the time this is done via SLAM, and after that, the generated map is used for navigation. There are also possibilities to SLAM and navigate at once, but that is more advanced.
thank you. I already have a generated map i just want to be shown in rviz
if it is a .yaml file format (which will also have .pgm beside it) u can go into the file directory folder and then do rosrun map_server map_server NAME_OF_FILE.yaml
ak3847 is correct. However, as with that setup your ready for navigation anyway, you might want to check out the different localization nodes, which include map_server functionality themselfs. ros_rtabmap for example is used for mapping, which you have already done, and can then be switched to localization mode. But even in slam mode it serves the building map to rviz and in localization mode as well. If you used gmapping to build the map, I think you could use amcl to provide the map via map_server and it will as well localize. Usually mapping is done to be able to use pathplanning and localization for navigation.