Skip to content

Commit

Permalink
Update scan_to_scan_filter_chain.cpp
Browse files Browse the repository at this point in the history
only publish result if filter succeeded
  • Loading branch information
asimay committed Feb 25, 2016
1 parent 9147cac commit 3fc99a4
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/scan_to_scan_filter_chain.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -126,8 +126,11 @@ class ScanToScanFilterChain
void callback(const sensor_msgs::LaserScan::ConstPtr& msg_in)
{
// Run the filter chain
if (filter_chain_.update(*msg_in, msg_));
if (filter_chain_.update(*msg_in, msg_))
{
//only publish result if filter succeeded
output_pub_.publish(msg_);
}
}
};

Expand Down

0 comments on commit 3fc99a4

Please sign in to comment.