Class Listener

Inheritance Relationships

Base Type

  • public rclcpp::Node

Class Documentation

class Listener : public rclcpp::Node

Node class to listen to listen to incoming data from the Talker.

Public Functions

explicit Listener(const rclcpp::QoS &qos_profile, const std::string &topic_name = DEFAULT_TOPIC_NAME, bool defer_subscribe = false)

Standard Constructor.

Parameters:
  • qos_profile[in] QoS profile for Subscription.

  • topic_name[in] Topic to subscribe to.

  • defer_subscribe[in] (Optional) don’t create Subscription until user calls start_listening().

void initialize()

Initialize the publisher.

void start_listening()

Instantiates Subscription.

Does nothing if it has already been called.

inline rclcpp::SubscriptionOptions &get_options()

Get the subscription’s settings options.

void print_qos() const

Print the QoS settings of the subscriber.