<commit_before><?xml version="1.0"?>
<robot xmlns:sensor="http://playerstage.sourceforge.net/gazebo/xmlschema/#sensor"
       xmlns:controller="http://playerstage.sourceforge.net/gazebo/xmlschema/#controller"
       xmlns:interface="http://playerstage.sourceforge.net/gazebo/xmlschema/#interface"
       xmlns:xacro="http://www.ros.org/wiki/xacro">

  <!-- muscletrans is true for muscle transmission or false for motor transmission -->
  <!-- prefix can be anything but usually is "r_" or  "l_" for right and left hands distinction -->
  <!-- link_prefix prepends fingername to the link names -->
  <!-- joint_prefix prepends fingername to the joint names -->
  <xacro:macro name="middle_transmission" params="muscletrans prefix joint_prefix link_prefix" >

   <!-- muscle hand -->
    <xacro:if value="${muscletrans}">
      <transmission type="sr_mechanism_model/J0TransmissionForMuscle" name="${prefix}${link_prefix}middle_transmission">
      <actuator name="${prefix}${joint_prefix}J0" />
      <joint name="${prefix}${joint_prefix}J1" />
      <joint name="${prefix}${joint_prefix}J2" />
      <mechanicalReduction>1</mechanicalReduction>
      </transmission>
    </xacro:if>
    <!-- motor hand -->
    <xacro:unless value="${muscletrans}">
      <transmission name="${prefix}${link_prefix}middle_transmission">
        <type>sr_mechanism_model/J0Transmission</type>
        <actuator name="${prefix}${joint_prefix}J0">
          <mechanicalReduction>1</mechanicalReduction>
        </actuator>
        <joint name="${prefix}${joint_prefix}J1">
          <hardwareInterface>EffortJointInterface</hardwareInterface>
        </joint>
      </transmission>
    </xacro:unless><commit_msg>Added code to detect joints of the hand.<commit_after><?xml version="1.0"?>
<robot xmlns:sensor="http://playerstage.sourceforge.net/gazebo/xmlschema/#sensor"
       xmlns:controller="http://playerstage.sourceforge.net/gazebo/xmlschema/#controller"
       xmlns:interface="http://playerstage.sourceforge.net/gazebo/xmlschema/#interface"
       xmlns:xacro="http://www.ros.org/wiki/xacro">

  <!-- muscletrans is true for muscle transmission or false for motor transmission -->
  <!-- prefix can be anything but usually is "r_" or  "l_" for right and left hands distinction -->
  <!-- link_prefix prepends fingername to the link names -->
  <!-- joint_prefix prepends fingername to the joint names -->
  <xacro:macro name="middle_transmission" params="muscletrans prefix joint_prefix link_prefix" >

   <!-- muscle hand -->
    <xacro:if value="${muscletrans}">
      <transmission type="sr_mechanism_model/J0TransmissionForMuscle" name="${prefix}${link_prefix}middle_transmission">
      <actuator name="${prefix}${joint_prefix}J0" />
      <joint name="${prefix}${joint_prefix}J1" />
      <joint name="${prefix}${joint_prefix}J2" />
      <mechanicalReduction>1</mechanicalReduction>
      </transmission>
    </xacro:if>
    <!-- motor hand -->
    <xacro:unless value="${muscletrans}">
      <transmission name="${prefix}${link_prefix}middle_transmission">
        <type>sr_mechanism_model/J0Transmission</type>
        <actuator name="${prefix}${joint_prefix}J0">
          <mechanicalReduction>1</mechanicalReduction>
        </actuator>
        <joint name="${prefix}${joint_prefix}J1">
          <hardwareInterface>EffortJointInterface</hardwareInterface>
        </joint>
        <!--<joint name="${prefix}${joint_prefix}J2" />-->
      </transmission>
    </xacro:unless>
{'fraction_non_alphanumeric': 0.1560161197466897, 'fraction_numerical': 0.006620610247553253, 'mean_word_length': 4.0144300144300145, 'pattern_counts': {'":': 0, '<': 69, '<?xml version=': 2, '>': 69, 'https://': 0, 'lorem ipsum': 0, 'www.': 2, 'xml': 16}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '7583541', 'n_tokens_mistral': 1093, 'n_tokens_neox': 1065, 'n_words': 182}