Skip to content

Commit

Permalink
Add Client Thread for costmap_client_node (ros-navigation#3108)
Browse files Browse the repository at this point in the history
  • Loading branch information
DLu authored and hyunseok-yang committed Aug 24, 2022
1 parent 4f9d1f1 commit 6de42c2
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 0 deletions.
1 change: 1 addition & 0 deletions nav2_costmap_2d/include/nav2_costmap_2d/costmap_2d_ros.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -258,6 +258,7 @@ class Costmap2DROS : public nav2_util::LifecycleNode

protected:
rclcpp::Node::SharedPtr client_node_;
std::unique_ptr<nav2_util::NodeThread> client_thread_;

// Publishers and subscribers
rclcpp_lifecycle::LifecyclePublisher<geometry_msgs::msg::PolygonStamped>::SharedPtr
Expand Down
1 change: 1 addition & 0 deletions nav2_costmap_2d/src/costmap_2d_ros.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,7 @@ Costmap2DROS::Costmap2DROS(
auto options = rclcpp::NodeOptions().arguments(
{"--ros-args", "-r", std::string("__node:=") + get_name() + "_client", "--"});
client_node_ = std::make_shared<rclcpp::Node>("_", options);
client_thread_ = std::make_unique<nav2_util::NodeThread>(client_node_);

std::vector<std::string> clearable_layers{"obstacle_layer"};

Expand Down

0 comments on commit 6de42c2

Please sign in to comment.