From 0b9bf8b549af90f1ae302e6e53fac89d41f00091 Mon Sep 17 00:00:00 2001 From: Thomas Timm Andersen Date: Fri, 19 Feb 2016 14:16:49 +0100 Subject: [PATCH] Updated launch files to evaluate a 'prefix' argument and pass it to the driver and urdf file. Fixes #28 --- launch/ur10_bringup.launch | 3 ++- launch/ur10_bringup_joint_limited.launch | 4 +++- launch/ur3_bringup.launch | 3 ++- launch/ur3_bringup_joint_limited.launch | 4 +++- launch/ur5_bringup.launch | 4 +++- launch/ur5_bringup_joint_limited.launch | 6 ++++-- launch/ur_common.launch | 2 ++ test_move.py | 6 ++++++ 8 files changed, 25 insertions(+), 7 deletions(-) diff --git a/launch/ur10_bringup.launch b/launch/ur10_bringup.launch index 97d5584..8b09201 100644 --- a/launch/ur10_bringup.launch +++ b/launch/ur10_bringup.launch @@ -13,10 +13,11 @@ - + + diff --git a/launch/ur10_bringup_joint_limited.launch b/launch/ur10_bringup_joint_limited.launch index 1e07c20..6cc6ca6 100644 --- a/launch/ur10_bringup_joint_limited.launch +++ b/launch/ur10_bringup_joint_limited.launch @@ -11,12 +11,14 @@ - + + + diff --git a/launch/ur3_bringup.launch b/launch/ur3_bringup.launch index 1b28f72..c5d4a8f 100644 --- a/launch/ur3_bringup.launch +++ b/launch/ur3_bringup.launch @@ -13,10 +13,11 @@ - + + diff --git a/launch/ur3_bringup_joint_limited.launch b/launch/ur3_bringup_joint_limited.launch index 6d40005..e2c657e 100644 --- a/launch/ur3_bringup_joint_limited.launch +++ b/launch/ur3_bringup_joint_limited.launch @@ -11,12 +11,14 @@ - + + + diff --git a/launch/ur5_bringup.launch b/launch/ur5_bringup.launch index 212b8e6..a097d4e 100644 --- a/launch/ur5_bringup.launch +++ b/launch/ur5_bringup.launch @@ -13,14 +13,16 @@ - + + + diff --git a/launch/ur5_bringup_joint_limited.launch b/launch/ur5_bringup_joint_limited.launch index b8c3b10..643f5c4 100644 --- a/launch/ur5_bringup_joint_limited.launch +++ b/launch/ur5_bringup_joint_limited.launch @@ -11,12 +11,14 @@ - - + + + + diff --git a/launch/ur_common.launch b/launch/ur_common.launch index a9754a7..8b7836c 100644 --- a/launch/ur_common.launch +++ b/launch/ur_common.launch @@ -11,6 +11,7 @@ + @@ -23,6 +24,7 @@ + diff --git a/test_move.py b/test_move.py index 947d9d1..83292a2 100755 --- a/test_move.py +++ b/test_move.py @@ -111,6 +111,12 @@ def main(): client.wait_for_server() print "Connected to server" rospy.Subscriber("joint_states", JointState, joint_subscriber) + parameters = rospy.get_param(None) + index = str(parameters).find('prefix') + if (index > 0): + prefix = str(parameters)[index+len("prefix': '"):(index+len("prefix': '")+str(parameters)[index+len("prefix': '"):-1].find("'"))] + for i, name in enumerate(JOINT_NAMES): + JOINT_NAMES[i] = prefix + name print "This program makes the robot move between the following three poses:" print str([Q1[i]*180./pi for i in xrange(0,6)]) print str([Q2[i]*180./pi for i in xrange(0,6)])