From: Konstantinos Chatzilygeroudis Date: Tue, 7 Mar 2017 12:15:21 +0000 (+0100) Subject: New error messages X-Git-Tag: 0.1.0~12^2 X-Git-Url: http://git.ece.ufrgs.br/?a=commitdiff_plain;h=87cfc860e0ec147f88ef2334d7bf72db88cbe7dc;p=roboticsgroup_upatras_gazebo_plugins.git New error messages --- diff --git a/src/disable_link_plugin.cpp b/src/disable_link_plugin.cpp index 9e2831c..9a15838 100644 --- a/src/disable_link_plugin.cpp +++ b/src/disable_link_plugin.cpp @@ -12,7 +12,7 @@ Redistribution and use in source and binary forms, with or without modification, 3. Neither the name of the copyright holder nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS @@ -51,10 +51,13 @@ namespace gazebo { // Get pointers to joints link_ = model_->GetLink(link_name_); - if (link_) + if (link_) { link_->SetEnabled(false); + // Output some confirmation + ROS_INFO_STREAM("DisableLinkPlugin loaded! Link: \"" << link_name_); + } else - ROS_WARN("Link %s not found!", link_name_.c_str()); + ROS_ERROR_STREAM("Link" << link_name_ << " not found! DisableLinkPlugin could not be loaded."); } GZ_REGISTER_MODEL_PLUGIN(DisableLinkPlugin); diff --git a/src/mimic_joint_plugin.cpp b/src/mimic_joint_plugin.cpp index f272a8c..1050624 100644 --- a/src/mimic_joint_plugin.cpp +++ b/src/mimic_joint_plugin.cpp @@ -118,12 +118,12 @@ namespace gazebo { // Get pointers to joints joint_ = model_->GetJoint(joint_name_); if (!joint_) { - ROS_ERROR("No joint named %s. MimicJointPlugin could not be loaded.", joint_name_.c_str()); + ROS_ERROR_STREAM("No joint named \"" << joint_name_ << "\". MimicJointPlugin could not be loaded."); return; } mimic_joint_ = model_->GetJoint(mimic_joint_name_); if (!mimic_joint_) { - ROS_ERROR("No (mimic) joint named %s. MimicJointPlugin could not be loaded.", mimic_joint_name_.c_str()); + ROS_ERROR_STREAM("No (mimic) joint named \"" << mimic_joint_name_ << "\". MimicJointPlugin could not be loaded."); return; }