Thanks to visit codestin.com
Credit goes to github.com

Skip to content

trigger() blocks forever - bug? #146

@CodeFinder2

Description

@CodeFinder2

Hi,

I am facing the problem that

    ROS_ERROR("FOO");
    visual_tools->trigger();
    ROS_ERROR("BAR");

does not return. Even when Rviz connects, nothing will happen. I don't know if this is related to my issue but note that neither visual_tools->loadMarkerPub(false, true); nor visual_tools->loadMarkerPub(true, true); is working. (I am requiring latched topics.)

Once I comment this block:

  // Check if connected to a subscriber
  if (!pub_rviz_markers_waited_ && !pub_rviz_markers_connected_)
  {
    ROS_DEBUG_STREAM_NAMED(LOGNAME, "Waiting for subscribers before publishing markers...");
    waitForSubscriber(pub_rviz_markers_);

    // Only wait for the publisher once, after that just ignore the lack of connection
    pub_rviz_markers_waited_ = true;
  }

in the implementation of RvizVisualTools::publishMarkers() (invoked by trigger()), it is working fine.

Is this a bug? IMHO, there should be the possibility to skip the waitForSubscriber().

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions