diff --git a/tesseract_environment/src/environment.cpp b/tesseract_environment/src/environment.cpp index 2935d140b69..09ef85ff0b6 100644 --- a/tesseract_environment/src/environment.cpp +++ b/tesseract_environment/src/environment.cpp @@ -838,7 +838,7 @@ Environment::Implementation::getKinematicGroup(const std::string& group_name, st kinematic_group_cache[key] = std::make_unique(*kg); -#ifndef NDEBUG +#if !defined(NDEBUG) && TESSERACT_ENABLE_TESTING if (!tesseract_kinematics::checkKinematics(*kg)) { CONSOLE_BRIDGE_logError("Check Kinematics failed. This means that inverse kinematics solution for a pose do not "