diff --git a/tesseract_monitoring/src/environment_monitor.cpp b/tesseract_monitoring/src/environment_monitor.cpp index afe0caa5..c1e4e038 100644 --- a/tesseract_monitoring/src/environment_monitor.cpp +++ b/tesseract_monitoring/src/environment_monitor.cpp @@ -82,10 +82,10 @@ ROSEnvironmentMonitor::ROSEnvironmentMonitor(rclcpp::Node::SharedPtr node, } internal_node_executor_ = std::make_shared(); - internal_node_spinner_ = std::make_shared(std::thread{ [this]() { + internal_node_spinner_ = std::make_shared([this]() { internal_node_executor_->add_node(internal_node_); internal_node_executor_->spin(); - } }); + }); } ROSEnvironmentMonitor::ROSEnvironmentMonitor(rclcpp::Node::SharedPtr node, @@ -102,10 +102,10 @@ ROSEnvironmentMonitor::ROSEnvironmentMonitor(rclcpp::Node::SharedPtr node, RCLCPP_WARN(logger_, "ENV passed to ros env monitor did not initialize"); } internal_node_executor_ = std::make_shared(); - internal_node_spinner_ = std::make_shared(std::thread{ [this]() { + internal_node_spinner_ = std::make_shared([this]() { internal_node_executor_->add_node(internal_node_); internal_node_executor_->spin(); - } }); + }); } ROSEnvironmentMonitor::~ROSEnvironmentMonitor() diff --git a/tesseract_rosutils/src/plotting.cpp b/tesseract_rosutils/src/plotting.cpp index 557a35dd..b8a44026 100644 --- a/tesseract_rosutils/src/plotting.cpp +++ b/tesseract_rosutils/src/plotting.cpp @@ -62,11 +62,11 @@ ROSPlotting::ROSPlotting(std::string root_link, std::string topic_namespace) node_->create_publisher(topic_namespace + "/display_tool_path", 1); internal_node_executor_ = std::make_shared(); - internal_node_spinner_ = std::make_shared(std::thread{ [this]() { + internal_node_spinner_ = std::make_shared([this]() { internal_node_executor_->add_node(node_); internal_node_executor_->spin(); internal_node_executor_->remove_node(node_); - } }); + }); } ROSPlotting::~ROSPlotting() diff --git a/tesseract_rviz/src/environment_monitor_properties.cpp b/tesseract_rviz/src/environment_monitor_properties.cpp index ede85408..79936e31 100644 --- a/tesseract_rviz/src/environment_monitor_properties.cpp +++ b/tesseract_rviz/src/environment_monitor_properties.cpp @@ -137,11 +137,11 @@ void EnvironmentMonitorProperties::onInitialize(Ogre::SceneManager* scene_manage data_->joint_state_topic_property->initialize(ros_node_abstraction); data_->internal_node_executor = std::make_shared(); - data_->internal_node_spinner = std::make_shared(std::thread{ [this]() { + data_->internal_node_spinner = std::make_shared([this]() { data_->internal_node_executor->add_node(data_->node); data_->internal_node_executor->spin(); data_->internal_node_executor->remove_node(data_->node); - } }); + }); data_->scene_manager = scene_manager; data_->scene_node = scene_node; diff --git a/tesseract_rviz/src/joint_trajectory_monitor_properties.cpp b/tesseract_rviz/src/joint_trajectory_monitor_properties.cpp index 809d102c..501af07d 100644 --- a/tesseract_rviz/src/joint_trajectory_monitor_properties.cpp +++ b/tesseract_rviz/src/joint_trajectory_monitor_properties.cpp @@ -179,11 +179,11 @@ void JointTrajectoryMonitorProperties::onInitialize(rviz_common::DisplayContext* data_->tesseract_joint_trajectory_topic_property->initialize(ros_node_abstraction); data_->internal_node_executor = std::make_shared(); - data_->internal_node_spinner = std::make_shared(std::thread{ [this]() { + data_->internal_node_spinner = std::make_shared([this]() { data_->internal_node_executor->add_node(data_->node); data_->internal_node_executor->spin(); data_->internal_node_executor->remove_node(data_->node); - } }); + }); onLegacyJointTrajectoryTopicConnect(); onTesseractJointTrajectoryTopicConnect();