From 30b9ee5330da3a76bfdd618ed2843801782fa395 Mon Sep 17 00:00:00 2001 From: Thomas Timm Andersen Date: Mon, 22 Feb 2016 17:08:40 +0100 Subject: [PATCH] Fixed 'No joint names published when not using a prefix'. Closes #34 --- src/ur_ros_wrapper.cpp | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/src/ur_ros_wrapper.cpp b/src/ur_ros_wrapper.cpp index 5dbb317..01d87d8 100644 --- a/src/ur_ros_wrapper.cpp +++ b/src/ur_ros_wrapper.cpp @@ -97,13 +97,13 @@ public: if (joint_prefix.length() > 0) { sprintf(buf, "Setting prefix to %s", joint_prefix.c_str()); print_info(buf); - } - joint_names.push_back(joint_prefix + "shoulder_pan_joint"); - joint_names.push_back(joint_prefix + "shoulder_lift_joint"); - joint_names.push_back(joint_prefix + "elbow_joint"); - joint_names.push_back(joint_prefix + "wrist_1_joint"); - joint_names.push_back(joint_prefix + "wrist_2_joint"); - joint_names.push_back(joint_prefix + "wrist_3_joint"); + } + joint_names.push_back(joint_prefix + "shoulder_pan_joint"); + joint_names.push_back(joint_prefix + "shoulder_lift_joint"); + joint_names.push_back(joint_prefix + "elbow_joint"); + joint_names.push_back(joint_prefix + "wrist_1_joint"); + joint_names.push_back(joint_prefix + "wrist_2_joint"); + joint_names.push_back(joint_prefix + "wrist_3_joint"); } robot_.setJointNames(joint_names);