Rviz marker disappears after re-selecting it

asked 2020-02-18 10:10:22 -0500

CodeFinder gravatar image

updated 2020-02-18 10:14:06 -0500

Hi all,

I am sending a single visualization_msgs::MarkerArray message from two nodes via a latched (global) topic to Rviz. The MarkerArray::markers msg contains 2 visualization_msgs::Marker elements whereby their namespace is unique.

Rviz receives and draws such messages correctly but the problem is that once I unclick the checkbox for that topic to hide the markers and then re-click it show them again, not all elements are redrawn / visible again. More specifically, the 1st element contains Marker::LINE_STRIP and the 2nd contains Marker::SPHERE_LIST. The line strips are always shown correctly but the spheres are just shown again for one namespace/id combination.

In my example, I have 2 nodes/robots publishing to the latched global topic /my_rviz_topic. They both publish one MarkerArraymsg containing 2 Marker msgs (LINE_STRIP and SPHERE_LIST respectively):

  • robot1: ns=robot1/something, id=0 (for the line strip) and id=1 (for the spheres),
  • and likewise for robot2: ns=robot2/something, id=0 and id=1.

Rviz correctly renders 2 line strips and the 2 sets of spheres. Once I uncheck and then immediately re-check the checkbox for the added MarkerArray topic (under "Displays"), only 1 set of spheres are rendered again (incl. the 2 line strips). Why?

There are no warnings or errors (neither in the console nor in Rviz UI).

Does anyone know what the problem is here? Thanks!

EDIT (background): I would like to be able to remove some visualization entities temporarily to more easily see what is happening if MANY elements are currently being rendered. This also helps to distinguish between such elements (hide/show cycles). But this requires me to reliably making unchecked/hidden elements visible again.

edit retag flag offensive close merge delete