Check queue_depth value in pub and sub tests
This commit is contained in:
parent
8917400c74
commit
b7fc66a881
4 changed files with 27 additions and 4 deletions
|
@ -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:
|
||||
|
|
|
@ -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));
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue