68 if (!queueSize) queueSize = 1;
69 if (!durability) durability = RMW_QOS_POLICY_DURABILITY_SYSTEM_DEFAULT;
70 if (!reliability) reliability = RMW_QOS_POLICY_RELIABILITY_SYSTEM_DEFAULT;
71 rclcpp::SensorDataQoS qos;
72 qos.keep_last(*queueSize);
73 qos.durability(*durability);
74 qos.reliability(*reliability);
77 getLogger(),
"[" << this->getName() <<
"] Publisher to topic: " << topicName_);
79 auto nh = this->getNode();
80 pub_ = nh->template create_publisher<T>(this->topicName_, qos);
82 this->initialized_ =
true;