Skip to content

Commit

Permalink
Don't publish on topic with the same name token
Browse files Browse the repository at this point in the history
The different types cause connext to get mixed up, see ros2/rmw_connext#234
  • Loading branch information
dhood committed Jun 29, 2017
1 parent 709565a commit 3e14d66
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion topic_monitor/topic_monitor/scripts/topic_monitor.py
Original file line number Diff line number Diff line change
Expand Up @@ -143,8 +143,15 @@ def add_monitored_topic(
allowed_latency_timer.cancel()

# Create a publisher for the reception rate of the topic
reception_rate_topic_name = self.reception_rate_topic_name + topic_name

# TODO(dhood): remove this workaround
# once https://github.com/ros2/rmw_connext/issues/234 is resolved
reception_rate_topic_name += "_"

print('Publishing reception rate on topic: %s' % reception_rate_topic_name)
reception_rate_publisher = node.create_publisher(
Float32, self.reception_rate_topic_name + topic_name)
Float32, reception_rate_topic_name)

with self.monitored_topics_lock:
monitored_topic.expected_value_timer = expected_value_timer
Expand Down

0 comments on commit 3e14d66

Please sign in to comment.