Skip to content

Commit

Permalink
fix build by passing options (ros2#192)
Browse files Browse the repository at this point in the history
Signed-off-by: Dirk Thomas <dirk-thomas@users.noreply.github.com>
Signed-off-by: Dhananjay Sathe <dhananjay.sathe@rapyuta-robotics.com>
  • Loading branch information
dirk-thomas authored and dhananjaysathe committed Aug 22, 2019
1 parent 6fb379e commit 5e3b0b4
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/simple_bridge.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -89,8 +89,10 @@ int main(int argc, char * argv[])
"chatter", 10, ros1ChatterCallback);

// ROS 2 subscriber
rclcpp::SubscriptionOptions options;
options.ignore_local_publications = true;
auto ros2_sub = ros2_node->create_subscription<std_msgs::msg::String>(
"chatter", rclcpp::SensorDataQoS(), ros2ChatterCallback, nullptr, true);
"chatter", rclcpp::SensorDataQoS(), ros2ChatterCallback, options);

// ROS 1 asynchronous spinner
ros::AsyncSpinner async_spinner(1);
Expand Down

0 comments on commit 5e3b0b4

Please sign in to comment.