From 2faa2e384ea45aaecb054d42283f93864643c903 Mon Sep 17 00:00:00 2001 From: ridhwanluthra Date: Wed, 11 Jul 2018 15:44:32 +0530 Subject: [PATCH 1/2] raising error and not using default joint names. ref-issue #180 --- industrial_utils/src/param_utils.cpp | 18 +++++++----------- 1 file changed, 7 insertions(+), 11 deletions(-) diff --git a/industrial_utils/src/param_utils.cpp b/industrial_utils/src/param_utils.cpp index 6e15546a..d0a5006b 100644 --- a/industrial_utils/src/param_utils.cpp +++ b/industrial_utils/src/param_utils.cpp @@ -119,17 +119,13 @@ bool getJointNames(const std::string joint_list_param, const std::string urdf_pa else ROS_WARN_STREAM("Unable to find URDF joint names in '" << urdf_param << "'"); - // 3) Use default joint-names - const int NUM_JOINTS = 6; //Most robots have 6 joints - for (int i=0; i &velocity_limits) From 9677605f57937e7d04561788dec1f107a3c31a65 Mon Sep 17 00:00:00 2001 From: "G.A. vd. Hoorn" Date: Tue, 31 Jul 2018 22:06:51 +0200 Subject: [PATCH 2/2] Reword error displayed when joints cannot be found. --- industrial_utils/src/param_utils.cpp | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/industrial_utils/src/param_utils.cpp b/industrial_utils/src/param_utils.cpp index d0a5006b..a8c131d3 100644 --- a/industrial_utils/src/param_utils.cpp +++ b/industrial_utils/src/param_utils.cpp @@ -121,10 +121,8 @@ bool getJointNames(const std::string joint_list_param, const std::string urdf_pa // 3) Raise an error ROS_ERROR_STREAM( - "Unable to find user-specified joint names in '" - << joint_list_param << "'. Also, unable to find URDF joint names in '" - << urdf_param - << "'. Must specify joint names."); + "Cannot find user-specified joint names. Tried ROS parameter '" << joint_list_param << "'" + << " and the URDF in '" << urdf_param << "'."); return false; }