You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
While doing some debugging I was troubled by the fact that after disabling/re-enabling a marker (marker namespace) in Rviz, the marker would not show up again.
It seems that by design the trigger clears the cached markers. Thus calling trigger in a while loop is pointless unless the markers are fed again. I circumvent this the following manner :
boolRvizVisualTools::trigger(constbool keep_cache) // keep_cache is false by default
{
...
if (!keep_cache)
markers_.markers.clear(); // remove all cached markersreturn result;
}
/* in main */while (ros::ok())
{
// Don't forget to trigger the publisher! And save the cache!
visual_tools_->trigger(true);
ros::spinOnce();
rate.sleep();
}
I'd be happy to open a PR, just wanted to check first with you if that was an appropriate design.
Maybe you'd prefer more explicit functions calls like :
visual_tools_->keepCache(true);
// Don't forget to trigger the publisher!
visual_tools_->trigger();
// with helpersbool cache_keeped = visual_tools_->isKeepingCache();
visual_tools_->clearCache();
Cheers.
The text was updated successfully, but these errors were encountered:
Hi, first of thanks for the great tool !
While doing some debugging I was troubled by the fact that after disabling/re-enabling a marker (marker namespace) in Rviz, the marker would not show up again.
It seems that by design the
trigger
clears the cached markers. Thus callingtrigger
in a while loop is pointless unless the markers are fed again. I circumvent this the following manner :I'd be happy to open a PR, just wanted to check first with you if that was an appropriate design.
Maybe you'd prefer more explicit functions calls like :
Cheers.
The text was updated successfully, but these errors were encountered: