Closed marcomasa closed 3 years ago
Please ask on ROS answers / search through issue trackers for rviz / QoS. This is not a problem with nav2 but perhaps your setup if it is navigating correctly.
i have the same problem of "Rviz2 not showing the costmaps", @marcomasa do you find a way to solve this problem?
@myxiaojun you need to launch everything in one launchfile. Idk why, but starting everything seperately does NOT work for me.. You also need to check your QoS settings, but that does not help if you dont start everything at once (see turtle nav examples)
I use "ros2 launch turtlebot3_bringup robot.launch.py" to launch robot, use "ros2 launch turtlebot3_navigation2 navigation2.launch.py map:=$HOME/map.yaml" to launch nav2.. but the costmaps still not show. And my rviz qos is the same as the picture you posted...
I think u need to launch rviz with the nav stack in a single file. I dont fully understand the new launchfile backend, but i believe some values are not shared when launching from seperate files (this is also kinda the intention of the new system?)
Maybe its because of the Lifecycle Nodes and the autostart params. I guess the publishers do not recognize RVIZ as subscriber in your / our case.
I once start nav2 by "ros2 launch turtlebot3_navigation2 navigation2.launch.py use_sim_time:=True map:=/mnt/ros2/src/map.yaml". and I solved this problem by delete param "use_sim_time:=True".
Bug report
Required Info:
Operating System: Ubuntu 20.04
ROS2 Version: Galactic (apt-get)
Version or commit hash: ros-galactic-nav2-amcl 1.0.6-1focal.20210701.002235 ros-galactic-nav2-behavior-tree 1.0.6-1focal.20210701.002952 ros-galactic-nav2-bringup 1.0.6-1focal.20210701.015912 ros-galactic-nav2-bt-navigator 1.0.6-1focal.20210701.004934 ros-galactic-nav2-common 1.0.6-1focal.20210630.232638 ros-galactic-nav2-controller 1.0.6-1focal.20210701.004401 ros-galactic-nav2-core 1.0.6-1focal.20210701.004136 ros-galactic-nav2-costmap-2d 1.0.6-1focal.20210701.002823 ros-galactic-nav2-dwb-controller 1.0.6-1focal.20210701.005251 ros-galactic-nav2-lifecycle-manager 1.0.6-1focal.20210701.002253 ros-galactic-nav2-map-server 1.0.6-1focal.20210701.002229 ros-galactic-nav2-msgs 1.0.6-1focal.20210630.235639 ros-galactic-nav2-navfn-planner 1.0.6-1focal.20210701.004410 ros-galactic-nav2-planner 1.0.6-1focal.20210701.004411 ros-galactic-nav2-recoveries 1.0.6-1focal.20210701.004929 ros-galactic-nav2-regulated-pure-pursuit-controller 1.0.6-1focal.20210701.004418 ros-galactic-nav2-rviz-plugins 1.0.6-1focal.20210701.014516 ros-galactic-nav2-smac-planner 1.0.6-1focal.20210701.004430 ros-galactic-nav2-util 1.0.6-1focal.20210701.001550 ros-galactic-nav2-voxel-grid 1.0.6-1focal.20210701.002338 ros-galactic-nav2-waypoint-follower 1.0.6-1focal.20210701.004452
DDS implementation: default
Steps to reproduce issue
I am trying to get nav2 working with a custom simulation setup. I modified the launchfiles from the turtlebot example and used them in the waffle sim. Then i got my custom model loaded in gazebo & rviz2 and made a slam of my custom world.
After adjusting AMCL and the global planner plugin (SMAC), i cannot get the costmaps to show in rviz2. Weird thing about this is, it seems its just not published, bc sometimes i can still get the robot to navigate.
nav_params.yaml
Expected behavior
I would expect the costmap to be published and then subscribed/visualized by rviz2.
Actual behavior
Clean startup?
Rviz2 not showing the costmaps.
Additional information
I played around with rviz2 QoS settings as i had troubles with that earlier. Seems to not change anything regarding the costmap publishing..
So the QoS settings are matching i guess, but i try to find out the frequency nothing happens...