Check queue_depth value in pub and sub tests

This commit is contained in:
Christophe Bedard 2019-06-21 09:58:33 +02:00
parent 8917400c74
commit b7fc66a881
4 changed files with 27 additions and 4 deletions

View file

@ -19,6 +19,7 @@
#define NODE_NAME "test_publisher"
#define TOPIC_NAME "the_topic"
#define QUEUE_DEPTH 10
class PubNode : public rclcpp::Node
{
@ -28,7 +29,7 @@ public:
{
pub_ = this->create_publisher<std_msgs::msg::String>(
TOPIC_NAME,
rclcpp::QoS(10));
rclcpp::QoS(QUEUE_DEPTH));
}
private:

View file

@ -19,6 +19,7 @@
#define NODE_NAME "test_subscription"
#define TOPIC_NAME "the_topic"
#define QUEUE_DEPTH 10
class SubNode : public rclcpp::Node
{
@ -28,7 +29,7 @@ public:
{
sub_ = this->create_subscription<std_msgs::msg::String>(
TOPIC_NAME,
rclcpp::QoS(10),
rclcpp::QoS(QUEUE_DEPTH),
std::bind(&SubNode::callback, this, std::placeholders::_1));
}