Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix issue #31: parameter bridge echoing back #33

Merged
merged 1 commit into from
Aug 2, 2019
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
10 changes: 7 additions & 3 deletions ros1_ign_bridge/include/ros1_ign_bridge/factory.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -89,10 +89,14 @@ class Factory : public FactoryInterface
ros::Publisher ros1_pub)
{

std::function<void(const IGN_T&)> subCb =
[this, ros1_pub](const IGN_T &_msg)
std::function<void(const IGN_T&,
const ignition::transport::MessageInfo &)> subCb =
[this, ros1_pub](const IGN_T &_msg,
const ignition::transport::MessageInfo &_info)
{
this->ign_callback(_msg, ros1_pub);
// Ignore messages that are published from this bridge.
if (!_info.IntraProcess())
this->ign_callback(_msg, ros1_pub);
};

node->Subscribe(topic_name, subCb);
Expand Down