blob: fe0c93293ffe13524137a64b15234ff1be445f37 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
|
diff --git a/include/nav2_util/lifecycle_node.hpp b/include/nav2_util/lifecycle_node.hpp
index 6da348c..449a9db 100644
--- a/include/nav2_util/lifecycle_node.hpp
+++ b/include/nav2_util/lifecycle_node.hpp
@@ -204,7 +204,7 @@ protected:
void runCleanups();
// Connection to tell that server is still up
- std::unique_ptr<bond::Bond> bond_{nullptr};
+ std::shared_ptr<bond::Bond> bond_{nullptr};
};
} // namespace nav2_util
diff --git a/src/lifecycle_node.cpp b/src/lifecycle_node.cpp
index e09ae54..ca9719d 100644
--- a/src/lifecycle_node.cpp
+++ b/src/lifecycle_node.cpp
@@ -57,7 +57,7 @@ void LifecycleNode::createBond()
{
RCLCPP_INFO(get_logger(), "Creating bond (%s) to lifecycle manager.", this->get_name());
- bond_ = std::make_unique<bond::Bond>(
+ bond_ = std::make_shared<bond::Bond>(
std::string("bond"),
this->get_name(),
shared_from_this());
|