Skip to content

Commit

Permalink
feat: add latching ros1 pubs
Browse files Browse the repository at this point in the history
Signed-off-by: outrider-jhulas <[email protected]>
  • Loading branch information
outrider-jhulas committed Dec 9, 2024
1 parent 3d5328d commit 8b955d5
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/bridge.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@

#include "ros1_bridge/bridge.hpp"

#include "rmw/qos_profiles.h"

namespace ros1_bridge
{
Expand Down Expand Up @@ -105,7 +106,7 @@ create_bridge_from_2_to_1(
{
auto factory = get_factory(ros1_type_name, ros2_type_name);
auto ros1_pub = factory->create_ros1_publisher(
ros1_node, ros1_topic_name, publisher_queue_size);
ros1_node, ros1_topic_name, publisher_queue_size, (subscriber_qos.get_rmw_qos_profile().durability == RMW_QOS_POLICY_DURABILITY_TRANSIENT_LOCAL));

auto ros2_sub = factory->create_ros2_subscriber(
ros2_node, ros2_topic_name, subscriber_qos, ros1_pub, ros2_pub);
Expand Down Expand Up @@ -158,7 +159,7 @@ create_bidirectional_bridge(
ros1_type_name, topic_name, queue_size, ros2_type_name, topic_name, publisher_qos);
handles.bridge2to1 = create_bridge_from_2_to_1(
ros2_node, ros1_node,
ros2_type_name, topic_name, queue_size, ros1_type_name, topic_name, queue_size,
ros2_type_name, topic_name, publisher_qos, ros1_type_name, topic_name, queue_size,
handles.bridge1to2.ros2_publisher);
return handles;
}
Expand Down

0 comments on commit 8b955d5

Please sign in to comment.