Template Function rtest::findPublisher(const std::string&, std::string)

Function Documentation

template<typename MessageT>
std::shared_ptr<PublisherMock<MessageT>> rtest::findPublisher(const std::string &fullyQualifiedNodeName, std::string topicName)

Convenience function for getting publisher object for given Node name and Topic name.

Template Parameters:

MessageT – Type of the ROS 2 message for the topic

Parameters:
  • fullyQualifiedNodeName – Fully-qualified node name

  • topicName – Topic name

Returns:

std::shared_ptr<rclcpp::Publisher<MessageT>>