Skip to content

Commit

Permalink
Change ROSPlotting to use a SingleThreadedExecutor
Browse files Browse the repository at this point in the history
  • Loading branch information
rjoomen committed Jul 12, 2024
1 parent b9aa22c commit 8dd7d55
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion tesseract_rosutils/include/tesseract_rosutils/plotting.h
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@ class ROSPlotting : public tesseract_visualization::Visualization
std::string topic_namespace_; /**< Namespace used when publishing markers */
int marker_counter_{ 0 }; /**< Counter when plotting */
rclcpp::Node::SharedPtr internal_node_;
rclcpp::executors::MultiThreadedExecutor::SharedPtr internal_node_executor_;
rclcpp::executors::SingleThreadedExecutor::SharedPtr internal_node_executor_;
std::shared_ptr<std::thread> internal_node_spinner_;
rclcpp::Publisher<tesseract_msgs::msg::SceneGraph>::SharedPtr scene_pub_; /**< Scene publisher */
rclcpp::Publisher<tesseract_msgs::msg::Trajectory>::SharedPtr trajectory_pub_; /**< Trajectory publisher */
Expand Down
2 changes: 1 addition & 1 deletion tesseract_rosutils/src/plotting.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ ROSPlotting::ROSPlotting(std::string root_link, std::string topic_namespace)
"path",
1);

internal_node_executor_ = std::make_shared<rclcpp::executors::MultiThreadedExecutor>();
internal_node_executor_ = std::make_shared<rclcpp::executors::SingleThreadedExecutor>();
internal_node_spinner_ = std::make_shared<std::thread>([this]() {
internal_node_executor_->add_node(internal_node_);
internal_node_executor_->spin();
Expand Down

0 comments on commit 8dd7d55

Please sign in to comment.