Skip to content

Commit

Permalink
added joints 1 and 2 instead of joint 0
Browse files Browse the repository at this point in the history
  • Loading branch information
VahidAminZ committed Aug 7, 2015
1 parent 8ee47ee commit 4c1fb4f
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 12 deletions.
11 changes: 6 additions & 5 deletions sr_utilities/scripts/sr_utilities/hand_finder.py
Original file line number Diff line number Diff line change
Expand Up @@ -60,8 +60,8 @@ def __init__(self, mapping):
ethercat_path = ros_pack.get_path('sr_ethercat_hand_config')
self.calibration_path = {}
for hand in mapping:
self.calibration_path[mapping[hand]] = ethercat_path + '/' + mapping[hand] \
+ '/' + "calibration.yaml"
self.calibration_path[mapping[hand]] = \
ethercat_path + '/' + mapping[hand] + '/' + "calibration.yaml"


class HandConfig(object):
Expand All @@ -78,9 +78,10 @@ def __init__(self, mapping):
"""
"""
joints = ['FFJ0', 'FFJ3', 'FFJ4', 'MFJ0', 'MFJ3', 'MFJ4', 'RFJ0',
'RFJ3', 'RFJ4', 'LFJ0', 'LFJ3', 'LFJ4', 'LFJ5', 'THJ1',
'THJ2', 'THJ3', 'THJ4', 'THJ5', 'WRJ1', 'WRJ2']
joints = ['FFJ1', 'FFJ2', 'FFJ3', 'FFJ4', 'MFJ1', 'MFJ2', 'MFJ3',
'MFJ4', 'RFJ1', 'RFJ2', 'RFJ3', 'RFJ4', 'LFJ1', 'LFJ2',
'LFJ3', 'LFJ4', 'LFJ5', 'THJ1', 'THJ2', 'THJ3', 'THJ4',
'THJ5', 'WRJ1', 'WRJ2']
self.joints = {}
hand_joints = []
for hand in mapping:
Expand Down
7 changes: 3 additions & 4 deletions sr_utilities/src/sr_hand_finder.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -33,10 +33,9 @@ using std::vector;
namespace shadow_robot
{
const size_t SrHandFinder::number_of_joints_ = 20;
const char* SrHandFinder::joint_names_[] = {"FFJ0", "FFJ3", "FFJ4", "MFJ0", "MFJ3", "MFJ4", "RFJ0",
"RFJ3", "RFJ4", "LFJ0", "LFJ3", "LFJ4", "LFJ5", "THJ1",
"THJ2", "THJ3", "THJ4", "THJ5", "WRJ1", "WRJ2"};

const char* SrHandFinder::joint_names_[] = {"FFJ1", "FFJ2", "FFJ3", "FFJ4", "MFJ1", "MFJ2", "MFJ3", "MFJ4",
"RFJ1", "RFJ2", "RFJ3", "RFJ4", "LFJ1", "LFJ2", "LFJ3", "LFJ4",
"LFJ5", "THJ1", "THJ2", "THJ3", "THJ4", "THJ5", "WRJ1", "WRJ2"};
SrHandFinder::SrHandFinder()
{
map<string, string> mapping_map;
Expand Down
6 changes: 3 additions & 3 deletions sr_utilities/test/test_hand_finder.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -34,9 +34,9 @@ TEST(SrHandFinder, hand_present_test)
ros::NodeHandle nh;
nh.setParam("hand/mapping/1", "rh");
nh.setParam("hand/joint_prefix/1", "rh_");
const string joint_names[] = {"FFJ0", "FFJ3", "FFJ4", "MFJ0", "MFJ3", "MFJ4", "RFJ0",
"RFJ3", "RFJ4", "LFJ0", "LFJ3", "LFJ4", "LFJ5", "THJ1",
"THJ2", "THJ3", "THJ4", "THJ5", "WRJ1", "WRJ2"};
const string joint_names[] = {"FFJ1", "FFJ2", "FFJ3", "FFJ4", "MFJ1", "MFJ2", "MFJ3", "MFJ4",
"RFJ1", "RFJ2", "RFJ3", "RFJ4", "LFJ1", "LFJ2", "LFJ3", "LFJ4", "LFJ5",
"THJ1", "THJ2", "THJ3", "THJ4", "THJ5", "WRJ1", "WRJ2"};
shadow_robot::SrHandFinder hand_finder;
map<string, vector<string> > hand_joints(hand_finder.get_joints());
for (map<string, vector<string> >::const_iterator iter = hand_joints.begin(); iter != hand_joints.end(); ++iter)
Expand Down

0 comments on commit 4c1fb4f

Please sign in to comment.