Skip to content

Commit b659ec5

Browse files
committed
Fix matching pong in ping_pong app
1 parent 2cf06fb commit b659ec5

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

apps/ping_pong/app.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,8 +51,9 @@ void appMain(void *argument)
5151
rcl_publisher_t pong_publisher = rcl_get_zero_initialized_publisher();
5252
rcl_publisher_init(&pong_publisher, &node, ROSIDL_GET_MSG_TYPE_SUPPORT(std_msgs, msg, Header), "/microROS/pong", &pong_publisher_ops);
5353

54-
// Create a reliable pong subscriber
54+
// Create a best effort pong subscriber
5555
rcl_subscription_options_t pong_subscription_ops = rcl_subscription_get_default_options();
56+
pong_subscription_ops.qos.reliability = RMW_QOS_POLICY_RELIABILITY_BEST_EFFORT;
5657
rcl_subscription_t pong_subscription = rcl_get_zero_initialized_subscription();
5758
rcl_subscription_init(&pong_subscription, &node, ROSIDL_GET_MSG_TYPE_SUPPORT(std_msgs, msg, Header), "/microROS/pong", &pong_subscription_ops);
5859

0 commit comments

Comments
 (0)