Class ToolBaseNode

Inheritance Relationships

Base Type

  • public rclcpp::Node

Derived Types

Class Documentation

class ToolBaseNode : public rclcpp::Node

Subclassed by topic_tools::DelayNode, topic_tools::DropNode, topic_tools::MuxNode, topic_tools::RelayNode, topic_tools::ThrottleNode

Public Functions

TOPIC_TOOLS_PUBLIC ToolBaseNode(const std::string &node_name, const rclcpp::NodeOptions &options)

Protected Functions

virtual void process_message(std::shared_ptr<rclcpp::SerializedMessage> msg) = 0
std::optional<std::pair<std::string, rclcpp::QoS>> try_discover_source()

Returns an optional pair <topic type, QoS profile> of the first found source publishing on input_topic_ if at least one source is found

virtual void make_subscribe_unsubscribe_decisions()

Protected Attributes

std::chrono::duration<float> discovery_period_ = std::chrono::milliseconds{100}
std::optional<std::string> topic_type_
std::optional<rclcpp::QoS> qos_profile_
std::string input_topic_
std::string output_topic_
bool lazy_
rclcpp::TimerBase::SharedPtr discovery_timer_
rclcpp::GenericPublisher::SharedPtr pub_
rclcpp::GenericSubscription::SharedPtr sub_
std::mutex pub_mutex_