From 3c47edd65bc0d8c52c03e0ad29f899fd3969229e Mon Sep 17 00:00:00 2001 From: Levi Armstrong Date: Tue, 28 Jan 2025 19:31:53 -0600 Subject: [PATCH] Fix thread safety issue with set active contact manager --- tesseract_environment/src/environment.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/tesseract_environment/src/environment.cpp b/tesseract_environment/src/environment.cpp index 352a83d09a2..b252d867049 100644 --- a/tesseract_environment/src/environment.cpp +++ b/tesseract_environment/src/environment.cpp @@ -2109,7 +2109,7 @@ bool Environment::Implementation::applyAddContactManagersPluginInfoCommand( bool Environment::Implementation::applySetActiveContinuousContactManagerCommand( const std::shared_ptr& cmd) { - setActiveContinuousContactManagerHelper(cmd->getName()); + setActiveContinuousContactManager(cmd->getName()); ++revision; commands.push_back(cmd); @@ -2120,7 +2120,7 @@ bool Environment::Implementation::applySetActiveContinuousContactManagerCommand( bool Environment::Implementation::applySetActiveDiscreteContactManagerCommand( const std::shared_ptr& cmd) { - setActiveDiscreteContactManagerHelper(cmd->getName()); + setActiveDiscreteContactManager(cmd->getName()); ++revision; commands.push_back(cmd); @@ -2691,7 +2691,7 @@ tesseract_common::ContactManagersPluginInfo Environment::getContactManagersPlugi bool Environment::setActiveDiscreteContactManager(const std::string& name) { std::unique_lock lock(mutex_); - return impl_->setActiveDiscreteContactManagerHelper(name); + return impl_->setActiveDiscreteContactManager(name); } std::unique_ptr @@ -2704,7 +2704,7 @@ Environment::getDiscreteContactManager(const std::string& name) const bool Environment::setActiveContinuousContactManager(const std::string& name) { std::unique_lock lock(mutex_); - return impl_->setActiveContinuousContactManagerHelper(name); + return impl_->setActiveContinuousContactManager(name); } std::unique_ptr