Skip to content

Commit

Permalink
Update code for lifecycle_node
Browse files Browse the repository at this point in the history
Signed-off-by: Barry Xu <barry.xu@sony.com>
  • Loading branch information
Barry-Xu-2018 committed Apr 7, 2023
1 parent d278d1f commit 0ca98ec
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 12 deletions.
3 changes: 0 additions & 3 deletions rclcpp_lifecycle/include/rclcpp_lifecycle/lifecycle_node.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,6 @@
#include "rclcpp/macros.hpp"
#include "rclcpp/message_memory_strategy.hpp"
#include "rclcpp/node_options.hpp"
#include "rclcpp/node_builtin_executor.hpp"
#include "rclcpp/node_interfaces/node_base_interface.hpp"
#include "rclcpp/node_interfaces/node_clock_interface.hpp"
#include "rclcpp/node_interfaces/node_graph_interface.hpp"
Expand Down Expand Up @@ -1088,8 +1087,6 @@ class LifecycleNode : public node_interfaces::LifecycleNodeInterface,
rclcpp::node_interfaces::NodeTimeSourceInterface::SharedPtr node_time_source_;
rclcpp::node_interfaces::NodeWaitablesInterface::SharedPtr node_waitables_;

rclcpp::NodeBuiltinExecutor::UniquePtr node_builtin_executor_;

const rclcpp::NodeOptions node_options_;

class LifecycleNodeInterfaceImpl;
Expand Down
10 changes: 1 addition & 9 deletions rclcpp_lifecycle/src/lifecycle_node.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,6 @@
#include "rclcpp/graph_listener.hpp"
#include "rclcpp/logger.hpp"
#include "rclcpp/node.hpp"
#include "rclcpp/node_builtin_executor.hpp"
#include "rclcpp/node_interfaces/node_base.hpp"
#include "rclcpp/node_interfaces/node_clock.hpp"
#include "rclcpp/node_interfaces/node_graph.hpp"
Expand Down Expand Up @@ -77,7 +76,7 @@ LifecycleNode::LifecycleNode(
options.use_intra_process_comms(),
options.enable_topic_statistics())),
node_graph_(new rclcpp::node_interfaces::NodeGraph(node_base_.get())),
node_logging_(new rclcpp::node_interfaces::NodeLogging(node_base_.get())),
node_logging_(new rclcpp::node_interfaces::NodeLogging(node_base_)),
node_timers_(new rclcpp::node_interfaces::NodeTimers(node_base_.get())),
node_topics_(new rclcpp::node_interfaces::NodeTopics(node_base_.get(), node_timers_.get())),
node_services_(new rclcpp::node_interfaces::NodeServices(node_base_.get())),
Expand Down Expand Up @@ -115,12 +114,6 @@ LifecycleNode::LifecycleNode(
options.use_clock_thread()
)),
node_waitables_(new rclcpp::node_interfaces::NodeWaitables(node_base_.get())),
node_builtin_executor_(new rclcpp::NodeBuiltinExecutor(
node_base_,
node_topics_,
node_services_,
options
)),
node_options_(options),
impl_(new LifecycleNodeInterfaceImpl(node_base_, node_services_))
{
Expand Down Expand Up @@ -149,7 +142,6 @@ LifecycleNode::LifecycleNode(
LifecycleNode::~LifecycleNode()
{
// release sub-interfaces in an order that allows them to consult with node_base during tear-down
node_builtin_executor_.reset();
node_waitables_.reset();
node_time_source_.reset();
node_parameters_.reset();
Expand Down

0 comments on commit 0ca98ec

Please sign in to comment.