/kb/events/*#

Caution

This documentation page has been auto-generated.

It may be missing some details.

/kb/events/* Quick Facts

Category

💡 Knowledge and reasoning

Direction

➡️ you normally subscribe to this topic.

Event notifications for previously subscribed events. See /kb/events for details.

Quick snippets#

Check the publication rate#
$ ros2 topic hz /kb/events/*
Display the data published on the topic#
$ ros2 topic echo /kb/events/*

How to use in your code#

Subscribe to the topic using Python#
 1#!/usr/bin/env python
 2
 3import rclpy
 4from rclpy.node import Node
 5
 6from .msg import
 7
 8
 9class Subscriber(Node):
10
11    def __init__(self):
12        super().__init__('kb_events_subscriber')
13        self.subscription = self.create_subscription(
14            ,
15            '/kb/events/*',
16            self.listener_callback,
17            10)
18
19    def listener_callback(self, msg):
20        self.get_logger().info('I heard: "%s"' % msg.data)
21
22
23if __name__ == '__main__':
24    rclpy.init(args=args)
25
26    subscriber = *Subscriber()
27
28    rclpy.spin(subscriber)
29
30    rclpy.shutdown()