Skip to content
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

Open
wants to merge 4 commits into
base: indigo-devel
Choose a base branch
from
Open
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 12 additions & 4 deletions ur_kinematics/src/ur_moveit_plugin.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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();

/*
Copy link
Member

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 ;).

Copy link
Author

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 :)

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");
Expand All @@ -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]);
Copy link

@Jmeyer1292 Jmeyer1292 Jul 12, 2016

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nm


Expand All @@ -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 */
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Dangling */?

Copy link
Author

Choose a reason for hiding this comment

The 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);
Expand Down