-
Notifications
You must be signed in to change notification settings - Fork 1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Removed prefix code which prevented the plugin from being used for mu… #248
Changes from 2 commits
0daaaac
692f4bc
ed5a834
4b8a17a
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -325,6 +325,11 @@ bool URKinematicsPlugin::initialize(const std::string &robot_description, | |
|
||
private_handle.param<std::string>("arm_prefix", arm_prefix_, ""); | ||
|
||
// Load the joint names from the group model | ||
ur_joint_names_ = joint_model_group->getJointModelNames(); | ||
ur_link_names_ = joint_model_group->getLinkModelNames(); | ||
|
||
/* | ||
ur_joint_names_.push_back(arm_prefix_ + "shoulder_pan_joint"); | ||
ur_joint_names_.push_back(arm_prefix_ + "shoulder_lift_joint"); | ||
ur_joint_names_.push_back(arm_prefix_ + "elbow_joint"); | ||
|
@@ -340,7 +345,7 @@ bool URKinematicsPlugin::initialize(const std::string &robot_description, | |
ur_link_names_.push_back(arm_prefix_ + "wrist_1_link"); // 5 | ||
ur_link_names_.push_back(arm_prefix_ + "wrist_2_link"); // 6 | ||
ur_link_names_.push_back(arm_prefix_ + "wrist_3_link"); // 7 | ||
ur_link_names_.push_back(arm_prefix_ + "ee_link"); // 8 | ||
ur_link_names_.push_back(arm_prefix_ + "ee_link"); // 8 */ | ||
|
||
ur_joint_inds_start_ = getJointIndex(ur_joint_names_[0]); | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Nm |
||
|
||
|
@@ -362,10 +367,13 @@ bool URKinematicsPlugin::initialize(const std::string &robot_description, | |
} | ||
last_ur_joint_ind = cur_ur_joint_ind; | ||
} | ||
// if successful, the kinematic chain includes a serial chain of the UR joints | ||
// if successful, the kinematic chain includes a serial chain of the UR joints */ | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Dangling There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. It should be unaffected since // is there, but I've removed it. |
||
|
||
kdl_tree.getChain(getBaseFrame(), ur_link_names_.front(), kdl_base_chain_); | ||
kdl_tree.getChain(ur_link_names_.back(), getTipFrame(), kdl_tip_chain_); | ||
// Change this to use the link names provided by model, not by hard coded naming. (base_frame provided as arg) | ||
ROS_INFO("Using base frame %s from model", base_frame.c_str()); | ||
ROS_INFO("Using tip frame %s from model", tip_frame.c_str()); | ||
kdl_tree.getChain(getBaseFrame(), base_frame, kdl_base_chain_); | ||
kdl_tree.getChain(tip_frame, getTipFrame(), kdl_tip_chain_); | ||
|
||
// weights for redundant solution selection | ||
ik_weights_.resize(6); | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can the commented out code be removed? FYI...I prefer
//
instead of/*
, since it makes the diff more representative of what was changed/commented out (even though I don't like commented out code ;).There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@shaun-edwards
I removed the code that is commented out :)