Skip to content

Commit

Permalink
Restore "QuickFix ros-visualization#1372: remove pending callbacks"
Browse files Browse the repository at this point in the history
The release 0.6.6 of tf2 was reverted. The bug is still there.
  • Loading branch information
rhaschke committed May 3, 2020
1 parent f046707 commit c3bf691
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 0 deletions.
7 changes: 7 additions & 0 deletions src/rviz/image/image_display_base.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,10 @@ void ImageDisplayBase::reset()
{
Display::reset();
if (tf_filter_)
{
tf_filter_->clear();
update_nh_.getCallbackQueue()->removeByID((uint64_t)tf_filter_.get());
}

messages_received_ = 0;
setStatus(StatusProperty::Warn, "Image", "No Image received");
Expand Down Expand Up @@ -212,6 +215,10 @@ void ImageDisplayBase::subscribe()

void ImageDisplayBase::unsubscribe()
{
// Quick fix for #1372. Can be removed if https://github.com/ros/geometry2/pull/402 is released
if (tf_filter_)
update_nh_.getCallbackQueue()->removeByID((uint64_t)tf_filter_.get());

tf_filter_.reset();
sub_.reset();
}
Expand Down
3 changes: 3 additions & 0 deletions src/rviz/message_filter_display.h
Original file line number Diff line number Diff line change
Expand Up @@ -118,6 +118,9 @@ class MessageFilterDisplay: public _RosTopicDisplay
{
Display::reset();
tf_filter_->clear();
// Quick fix for #1372. Can be removed if https://github.com/ros/geometry2/pull/402 is released
if (tf_filter_)
update_nh_.getCallbackQueue()->removeByID((uint64_t)tf_filter_);
messages_received_ = 0;
}

Expand Down

0 comments on commit c3bf691

Please sign in to comment.