From 28a4975bdc45f4a9b99f17b25264e4ca7f1007e9 Mon Sep 17 00:00:00 2001 From: Sebastian Jahr Date: Mon, 26 Aug 2024 10:56:03 +0200 Subject: [PATCH] Reduce log level to debug --- moveit_core/robot_model/src/robot_model.cpp | 5 ++++- moveit_core/robot_state/src/robot_state.cpp | 12 ++++++------ 2 files changed, 10 insertions(+), 7 deletions(-) diff --git a/moveit_core/robot_model/src/robot_model.cpp b/moveit_core/robot_model/src/robot_model.cpp index 22adc54a3c..4c7651cf87 100644 --- a/moveit_core/robot_model/src/robot_model.cpp +++ b/moveit_core/robot_model/src/robot_model.cpp @@ -1357,7 +1357,10 @@ LinkModel* RobotModel::getLinkModel(const std::string& name, bool* has_link) { *has_link = false; // Report failure via argument } - RCLCPP_ERROR(getLogger(), "Link '%s' not found in model '%s'", name.c_str(), model_name_.c_str()); + else + { // Otherwise print error + RCLCPP_ERROR(getLogger(), "Link '%s' not found in model '%s'", name.c_str(), model_name_.c_str()); + } return nullptr; } diff --git a/moveit_core/robot_state/src/robot_state.cpp b/moveit_core/robot_state/src/robot_state.cpp index 626385bc5b..7d0fdb7ace 100644 --- a/moveit_core/robot_state/src/robot_state.cpp +++ b/moveit_core/robot_state/src/robot_state.cpp @@ -519,7 +519,7 @@ const double* RobotState::getJointPositions(const JointModel* joint) const { if (joint->getVariableCount() == 0) { - RCLCPP_ERROR(getLogger(), "Cannot get joint positions for joint '%s' because it has no variables", + RCLCPP_DEBUG(getLogger(), "Cannot get joint positions for joint '%s' because it has no variables", joint->getName().c_str()); return nullptr; } @@ -530,7 +530,7 @@ const double* RobotState::getJointVelocities(const JointModel* joint) const { if (joint->getVariableCount() == 0) { - RCLCPP_ERROR(getLogger(), "Cannot get joint velocities for joint '%s' because it has no variables", + RCLCPP_DEBUG(getLogger(), "Cannot get joint velocities for joint '%s' because it has no variables", joint->getName().c_str()); return nullptr; } @@ -541,7 +541,7 @@ const double* RobotState::getJointAccelerations(const JointModel* joint) const { if (joint->getVariableCount() == 0) { - RCLCPP_ERROR(getLogger(), "Cannot get joint accelerations for joint '%s' because it has no variables", + RCLCPP_DEBUG(getLogger(), "Cannot get joint accelerations for joint '%s' because it has no variables", joint->getName().c_str()); return nullptr; } @@ -552,7 +552,7 @@ const double* RobotState::getJointEffort(const JointModel* joint) const { if (joint->getVariableCount() == 0) { - RCLCPP_ERROR(getLogger(), "Cannot get joint effort for joint '%s' because it has no variables", + RCLCPP_DEBUG(getLogger(), "Cannot get joint effort for joint '%s' because it has no variables", joint->getName().c_str()); return nullptr; } @@ -926,7 +926,7 @@ const LinkModel* RobotState::getRigidlyConnectedParentLinkModel(const std::strin std::string object{ frame.substr(0, idx) }; if (!hasAttachedBody(object)) { - RCLCPP_ERROR(getLogger(), + RCLCPP_DEBUG(getLogger(), "Cannot find rigidly connected parent link for frame '%s' because there is no attached body.", frame.c_str()); return nullptr; @@ -934,7 +934,7 @@ const LinkModel* RobotState::getRigidlyConnectedParentLinkModel(const std::strin auto body{ getAttachedBody(object) }; if (!body->hasSubframeTransform(frame)) { - RCLCPP_ERROR(getLogger(), + RCLCPP_DEBUG(getLogger(), "Cannot find rigidly connected parent link for frame '%s' because the transformation to the parent " "link is unknown.", frame.c_str());