-
Notifications
You must be signed in to change notification settings - Fork 264
Description
Hi,
In the same theme of ros-navigation/navigation2#949, RViz will produce alot of these dropped message warnings once everything is activated and just getting started. After startup, they go away, but it causes confusion for new users and generally seems like something that should be fixed.
From Michael:
In the obstacle layer there is a MessageFilter created when the plugin is initialized during onInitialize. All of the costmap_2d_ros plugins are initialized during costmap_2d_ros's on_configure method. When on_activate is invoked, the code is waiting for the transform to be available (base_link to map). However, the transform is not available yet because the user hasn't entered the initial_pose. So, the message filter's queue fills up and the error messages start when the message filter starts dropping messages. Once the user enters the initial pose, the on_activate method continues and the queue begins to drain.
Translating that to Rviz: the message filter is created, which automatically subscribes, and fills the queue before useful. I fix this in Navigation2 by unsubscribing once the topic is created and then subscribing when it actually starts being used. See ros-navigation/navigation2#1574