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

Closed
Changes from all 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
28 changes: 9 additions & 19 deletions ur_kinematics/src/ur_moveit_plugin.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -325,22 +325,9 @@ bool URKinematicsPlugin::initialize(const std::string &robot_description,

private_handle.param<std::string>("arm_prefix", arm_prefix_, "");

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");
ur_joint_names_.push_back(arm_prefix_ + "wrist_1_joint");
ur_joint_names_.push_back(arm_prefix_ + "wrist_2_joint");
ur_joint_names_.push_back(arm_prefix_ + "wrist_3_joint");

ur_link_names_.push_back(arm_prefix_ + "base_link"); // 0
ur_link_names_.push_back(arm_prefix_ + "ur_base_link"); // 1
ur_link_names_.push_back(arm_prefix_ + "shoulder_link"); // 2
ur_link_names_.push_back(arm_prefix_ + "upper_arm_link"); // 3
ur_link_names_.push_back(arm_prefix_ + "forearm_link"); // 4
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
// Load the joint names from the group model
ur_joint_names_ = joint_model_group->getJointModelNames();
ur_link_names_ = joint_model_group->getLinkModelNames();

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 +349,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

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