Extract test constants

This commit is contained in:
Christophe Bedard 2019-06-19 15:46:44 +02:00
parent 39d2a9e2e7
commit bf4d589dcb
8 changed files with 48 additions and 20 deletions

View file

@ -17,14 +17,17 @@
#include "rclcpp/rclcpp.hpp"
#include "std_msgs/msg/string.hpp"
#define NODE_NAME "test_publisher"
#define TOPIC_NAME "the_topic"
class PubNode : public rclcpp::Node
{
public:
explicit PubNode(rclcpp::NodeOptions options)
: Node("test_publisher", options)
: Node(NODE_NAME, options)
{
pub_ = this->create_publisher<std_msgs::msg::String>(
"the_topic",
TOPIC_NAME,
rclcpp::QoS(10));
}