Cannot change the prefix of URkinematics to a postfix

asked 2021-05-03 14:42:12 -0500

hopestartswithu gravatar image

updated 2022-05-23 09:11:41 -0500

lucasw gravatar image

ROS Melodic Ubuntu 18.04

Admittedly, I have 0 clue of c++, so I have 2 UR10 robots and I cannot load the URkinematics plugin because of "missing" joints. I changed the names of my joints from joint_name to joint_name_right/left. Well, back then I didn't know the joints were "hardcoded." How do I get this piece of code working though? Even changing the joint_names itself gives me this error, in fact, I get the same joint_name no matter where I change it. I have absolutely 0 clue where the plugin gets its joint names because changing them below doesnt do anything.

ERROR: Kin chain provided in model doesn't contain standard UR joint '_rightshoulder_lift_joint'.

  ur_joint_names_.push_back("shoulder_pan_joint" + arm_prefix_);
  ur_joint_names_.push_back("shoulder_lift_joint" + arm_prefix_);
  ur_joint_names_.push_back( "elbow_joint" + arm_prefix_);
  ur_joint_names_.push_back("wrist_1_joint" + arm_prefix_);
  ur_joint_names_.push_back("wrist_2_joint" + arm_prefix_);
  ur_joint_names_.push_back("wrist_3_joint" + arm_prefix_);

  ur_link_names_.push_back("base_link" + arm_prefix_);       // 0
  ur_link_names_.push_back("ur_base_link" + arm_prefix_);    // 1
  ur_link_names_.push_back("shoulder_link" + arm_prefix_);   // 2
  ur_link_names_.push_back("upper_arm_link" + arm_prefix_);  // 3
  ur_link_names_.push_back("forearm_link" + arm_prefix_);    // 4
  ur_link_names_.push_back("wrist_1_link" + arm_prefix_);    // 5
  ur_link_names_.push_back("wrist_2_link" + arm_prefix_);    // 6
  ur_link_names_.push_back("wrist_3_link" + arm_prefix_);    // 7
  ur_link_names_.push_back("ee_link" + arm_prefix_);         // 8

What I did was just swap the "joint_name" with arm_prefix_ (from source its: arm_prefix_ + "joint_name")

Do I really have to change all joint names??

edit retag flag offensive close merge delete