Skip to content

Commit be8503c

Browse files
committed
Migrate nodes in tests
1 parent 0c3e724 commit be8503c

File tree

2 files changed

+8
-8
lines changed

2 files changed

+8
-8
lines changed

opennav_coverage_bt/test/test_cancel_complete_coverage.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -49,15 +49,15 @@ class CancelCoverageActionTestFixture : public ::testing::Test
4949
public:
5050
static void SetUpTestCase()
5151
{
52-
node_ = std::make_shared<rclcpp::Node>("cancel_compute_coverage_path_test_fixture");
52+
node_ = std::make_shared<nav2::LifecycleNode>("cancel_compute_coverage_path_test_fixture");
5353
factory_ = std::make_shared<BT::BehaviorTreeFactory>();
5454

5555
config_ = new BT::NodeConfiguration();
5656

5757
// Create the blackboard that will be shared by all of the nodes in the tree
5858
config_->blackboard = BT::Blackboard::create();
5959
// Put items on the blackboard
60-
config_->blackboard->set<rclcpp::Node::SharedPtr>(
60+
config_->blackboard->set<nav2::LifecycleNode::SharedPtr>(
6161
"node",
6262
node_);
6363
config_->blackboard->set<std::chrono::milliseconds>(
@@ -104,13 +104,13 @@ class CancelCoverageActionTestFixture : public ::testing::Test
104104
rclcpp_action::Client<opennav_coverage_msgs::action::ComputeCoveragePath>> client_;
105105

106106
protected:
107-
static rclcpp::Node::SharedPtr node_;
107+
static nav2::LifecycleNode::SharedPtr node_;
108108
static BT::NodeConfiguration * config_;
109109
static std::shared_ptr<BT::BehaviorTreeFactory> factory_;
110110
static std::shared_ptr<BT::Tree> tree_;
111111
};
112112

113-
rclcpp::Node::SharedPtr CancelCoverageActionTestFixture::node_ = nullptr;
113+
nav2::LifecycleNode::SharedPtr CancelCoverageActionTestFixture::node_ = nullptr;
114114
std::shared_ptr<CancelCoverageServer>
115115
CancelCoverageActionTestFixture::action_server_ = nullptr;
116116
std::shared_ptr<rclcpp_action::Client<opennav_coverage_msgs::action::ComputeCoveragePath>>

opennav_coverage_bt/test/test_compute_coverage_path.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -55,15 +55,15 @@ class ComputeCoveragePathActionTestFixture : public ::testing::Test
5555
public:
5656
static void SetUpTestCase()
5757
{
58-
node_ = std::make_shared<rclcpp::Node>("compute_coverage_path_action_test_fixture");
58+
node_ = std::make_shared<nav2::LifecycleNode>("compute_coverage_path_action_test_fixture");
5959
factory_ = std::make_shared<BT::BehaviorTreeFactory>();
6060

6161
config_ = new BT::NodeConfiguration();
6262

6363
// Create the blackboard that will be shared by all of the nodes in the tree
6464
config_->blackboard = BT::Blackboard::create();
6565
// Put items on the blackboard
66-
config_->blackboard->set<rclcpp::Node::SharedPtr>(
66+
config_->blackboard->set<nav2::LifecycleNode::SharedPtr>(
6767
"node",
6868
node_);
6969
config_->blackboard->set<std::chrono::milliseconds>(
@@ -105,13 +105,13 @@ class ComputeCoveragePathActionTestFixture : public ::testing::Test
105105
static std::shared_ptr<ComputeCompleteCoveragePathActionServer> action_server_;
106106

107107
protected:
108-
static rclcpp::Node::SharedPtr node_;
108+
static nav2::LifecycleNode::SharedPtr node_;
109109
static BT::NodeConfiguration * config_;
110110
static std::shared_ptr<BT::BehaviorTreeFactory> factory_;
111111
static std::shared_ptr<BT::Tree> tree_;
112112
};
113113

114-
rclcpp::Node::SharedPtr ComputeCoveragePathActionTestFixture::node_ = nullptr;
114+
nav2::LifecycleNode::SharedPtr ComputeCoveragePathActionTestFixture::node_ = nullptr;
115115
std::shared_ptr<ComputeCompleteCoveragePathActionServer>
116116
ComputeCoveragePathActionTestFixture::action_server_ = nullptr;
117117
BT::NodeConfiguration * ComputeCoveragePathActionTestFixture::config_ = nullptr;

0 commit comments

Comments
 (0)