因时夹爪urdf文件改写为xacro并搭配aubo_i5机械臂

news2024/11/23 8:49:13

因时夹爪urdf文件改写为xacro并搭配aubo_i5机械臂

    • 一、因时夹爪内容
    • 二、改写为xacro模式
    • 三、aubo i5搭配因时夹爪

一、因时夹爪内容

因时夹爪型号:EG2-4C
夹爪的urdf文件内容:

<robot
  name="jawasm1">
  <link
    name="base_link">
    <inertial>
      <origin
        xyz="0.00339303654278191 -2.1205433560656E-05 -0.0099185365078758"
        rpy="0 0 0" />
      <mass
        value="0.105853592307918" />
      <inertia
        ixx="3.93795927851199E-05"
        ixy="-8.7395226509728E-08"
        ixz="5.91928672040786E-07"
        iyy="0.000106376720416166"
        iyz="-1.82858764303774E-10"
        izz="0.000125852616063213" />
    </inertial>
    <visual>
      <origin
        xyz="0 0 0"
        rpy="0 0 0" />
      <geometry>
        <mesh
          filename="package://jawasm1/meshes/base_link.STL" />
      </geometry>
      <material
        name="">
        <color
          rgba="0.894117647058823 0.913725490196078 0.929411764705882 1" />
      </material>
    </visual>
    <collision>
      <origin
        xyz="0 0 0"
        rpy="0 0 0" />
      <geometry>
        <mesh
          filename="package://jawasm1/meshes/base_link.STL" />
      </geometry>
    </collision>
  </link>
  <link
    name="Link1">
    <inertial>
      <origin
        xyz="0.0164149658242926 9.75754915755189E-09 0.00898193900447147"
        rpy="0 0 0" />
      <mass
        value="0.00647716099397792" />
      <inertia
        ixx="2.95068972140683E-07"
        ixy="8.63208170411155E-13"
        ixz="-1.92008628754607E-09"
        iyy="1.69979619476872E-06"
        iyz="-1.99232397395103E-13"
        izz="1.45016449434989E-06" />
    </inertial>
    <visual>
      <origin
        xyz="0 0 0"
        rpy="0 0 0" />
      <geometry>
        <mesh
          filename="package://jawasm1/meshes/Link1.STL" />
      </geometry>
      <material
        name="">
        <color
          rgba="0.894117647058823 0.913725490196078 0.929411764705882 1" />
      </material>
    </visual>
    <collision>
      <origin
        xyz="0 0 0"
        rpy="0 0 0" />
      <geometry>
        <mesh
          filename="package://jawasm1/meshes/Link1.STL" />
      </geometry>
    </collision>
  </link>
  <joint
    name="Link1"
    type="revolute">
    <origin
      xyz="0.036 -0.04 -0.019"
      rpy="-3.0158E-16 -7.1586E-16 -0.30719" />
    <parent
      link="base_link" />
    <child
      link="Link1" />
    <axis
      xyz="0 0 1" />
    <limit
      lower="0"
      upper="1"
      effort="1"
      velocity="1" />
  </joint>
  <link
    name="Link11">
    <inertial>
      <origin
        xyz="0.011366555972498 0.0118642725662323 0.0060000073930068"
        rpy="0 0 0" />
      <mass
        value="0.0127543420299361" />
      <inertia
        ixx="5.68538478020233E-07"
        ixy="-2.68012262729007E-07"
        ixz="9.34125984931838E-13"
        iyy="1.45145776457487E-06"
        iyz="9.34355360561326E-13"
        izz="1.50564598220449E-06" />
    </inertial>
    <visual>
      <origin
        xyz="0 0 0"
        rpy="0 0 0" />
      <geometry>
        <mesh
          filename="package://jawasm1/meshes/Link11.STL" />
      </geometry>
      <material
        name="">
        <color
          rgba="0.894117647058823 0.913725490196078 0.929411764705882 1" />
      </material>
    </visual>
    <collision>
      <origin
        xyz="0 0 0"
        rpy="0 0 0" />
      <geometry>
        <mesh
          filename="package://jawasm1/meshes/Link11.STL" />
      </geometry>
    </collision>
  </link>
  <joint
    name="Link11"
    type="revolute">
    <origin
      xyz="0.042 0 0.003"
      rpy="5.0393E-16 5.6225E-16 0.30719" />
    <parent
      link="Link1" />
    <child
      link="Link11" />
    <axis
      xyz="0 0 1" />
    <limit
      lower="-1"
      upper="0"
      effort="1"
      velocity="1" />
  </joint>
  <link
    name="Link2">
    <inertial>
      <origin
        xyz="0.0164149658242926 9.75754915755189E-09 0.00898193900447147"
        rpy="0 0 0" />
      <mass
        value="0.00647716099397793" />
      <inertia
        ixx="2.95068972140683E-07"
        ixy="8.63208169650113E-13"
        ixz="-1.92008628755341E-09"
        iyy="1.69979619476872E-06"
        iyz="-1.99232397320157E-13"
        izz="1.45016449434989E-06" />
    </inertial>
    <visual>
      <origin
        xyz="0 0 0"
        rpy="0 0 0" />
      <geometry>
        <mesh
          filename="package://jawasm1/meshes/Link2.STL" />
      </geometry>
      <material
        name="">
        <color
          rgba="0.894117647058823 0.913725490196078 0.929411764705882 1" />
      </material>
    </visual>
    <collision>
      <origin
        xyz="0 0 0"
        rpy="0 0 0" />
      <geometry>
        <mesh
          filename="package://jawasm1/meshes/Link2.STL" />
      </geometry>
    </collision>
  </link>
  <joint
    name="Link2"
    type="revolute">
    <origin
      xyz="0.036 0.04 -0.019"
      rpy="-2.6397E-16 3.7199E-16 0.30719" />
    <parent
      link="base_link" />
    <child
      link="Link2" />
    <axis
      xyz="0 0 1" />
    <limit
      lower="-1"
      upper="0"
      effort="1"
      velocity="1" />
  </joint>
  <link
    name="Link22">
    <inertial>
      <origin
        xyz="-0.011366555972498 0.0118642725662323 -0.0060000073930068"
        rpy="0 0 0" />
      <mass
        value="0.0127543420299362" />
      <inertia
        ixx="5.68538478020238E-07"
        ixy="2.6801226272901E-07"
        ixz="9.34125986250171E-13"
        iyy="1.45145776457489E-06"
        iyz="-9.34355361631596E-13"
        izz="1.5056459822045E-06" />
    </inertial>
    <visual>
      <origin
        xyz="0 0 0"
        rpy="0 0 0" />
      <geometry>
        <mesh
          filename="package://jawasm1/meshes/Link22.STL" />
      </geometry>
      <material
        name="">
        <color
          rgba="0.894117647058823 0.913725490196078 0.929411764705882 1" />
      </material>
    </visual>
    <collision>
      <origin
        xyz="0 0 0"
        rpy="0 0 0" />
      <geometry>
        <mesh
          filename="package://jawasm1/meshes/Link22.STL" />
      </geometry>
    </collision>
  </link>
  <joint
    name="Link22"
    type="revolute">
    <origin
      xyz="0.042 0 0.015"
      rpy="-3.641E-16 2.4584E-16 2.8344" />
    <parent
      link="Link2" />
    <child
      link="Link22" />
    <axis
      xyz="0 0 1" />
    <limit
      lower="0"
      upper="1"
      effort="1"
      velocity="1" />
  </joint>
</robot>

二、改写为xacro模式

1.首先,在urdf文件夹下创建 .xacro文件,使用命令 touch .xacro
2.xacro抬头改为

<?xml version="1.0" ?> 3.urdf中的其他的link和joint配置从 .urdf 复制到 .xacro文件模型中。
<?xml version="1.0" ?>
<robot name="jawasm1" xmlns:xacro="http://www.ros.org/wiki/xacro">
    <link
        name="base_link">
        <inertial>
        <origin
            xyz="0.00339303654278191 -2.1205433560656E-05 -0.0099185365078758"
            rpy="0 0 0" />
        <mass
            value="0.105853592307918" />
        <inertia
            ixx="3.93795927851199E-05"
            ixy="-8.7395226509728E-08"
            ixz="5.91928672040786E-07"
            iyy="0.000106376720416166"
            iyz="-1.82858764303774E-10"
            izz="0.000125852616063213" />
        </inertial>
        <visual>
        <origin
            xyz="0 0 0"
            rpy="0 0 0" />
        <geometry>
            <mesh
            filename="package://jawasm1/meshes/base_link.STL" />
        </geometry>
        <material
            name="">
            <color
            rgba="0.894117647058823 0.913725490196078 0.929411764705882 1" />
        </material>
        </visual>
        <collision>
        <origin
            xyz="0 0 0"
            rpy="0 0 0" />
        <geometry>
            <mesh
            filename="package://jawasm1/meshes/base_link.STL" />
        </geometry>
        </collision>
    </link>
    <link
        name="Link1">
        <inertial>
        <origin
            xyz="0.0164149658242926 9.75754915755189E-09 0.00898193900447147"
            rpy="0 0 0" />
        <mass
            value="0.00647716099397792" />
        <inertia
            ixx="2.95068972140683E-07"
            ixy="8.63208170411155E-13"
            ixz="-1.92008628754607E-09"
            iyy="1.69979619476872E-06"
            iyz="-1.99232397395103E-13"
            izz="1.45016449434989E-06" />
        </inertial>
        <visual>
        <origin
            xyz="0 0 0"
            rpy="0 0 0" />
        <geometry>
            <mesh
            filename="package://jawasm1/meshes/Link1.STL" />
        </geometry>
        <material
            name="">
            <color
            rgba="0.894117647058823 0.913725490196078 0.929411764705882 1" />
        </material>
        </visual>
        <collision>
        <origin
            xyz="0 0 0"
            rpy="0 0 0" />
        <geometry>
            <mesh
            filename="package://jawasm1/meshes/Link1.STL" />
        </geometry>
        </collision>
    </link>
    <joint
        name="Link1"
        type="revolute">
        <origin
        xyz="0.036 -0.04 -0.019"
        rpy="-3.0158E-16 -7.1586E-16 -0.30719" />
        <parent
        link="base_link" />
        <child
        link="Link1" />
        <axis
        xyz="0 0 1" />
        <limit
        lower="0"
        upper="1"
        effort="1"
        velocity="1" />
    </joint>
    <link
        name="Link11">
        <inertial>
        <origin
            xyz="0.011366555972498 0.0118642725662323 0.0060000073930068"
            rpy="0 0 0" />
        <mass
            value="0.0127543420299361" />
        <inertia
            ixx="5.68538478020233E-07"
            ixy="-2.68012262729007E-07"
            ixz="9.34125984931838E-13"
            iyy="1.45145776457487E-06"
            iyz="9.34355360561326E-13"
            izz="1.50564598220449E-06" />
        </inertial>
        <visual>
        <origin
            xyz="0 0 0"
            rpy="0 0 0" />
        <geometry>
            <mesh
            filename="package://jawasm1/meshes/Link11.STL" />
        </geometry>
        <material
            name="">
            <color
            rgba="0.894117647058823 0.913725490196078 0.929411764705882 1" />
        </material>
        </visual>
        <collision>
        <origin
            xyz="0 0 0"
            rpy="0 0 0" />
        <geometry>
            <mesh
            filename="package://jawasm1/meshes/Link11.STL" />
        </geometry>
        </collision>
    </link>
    <joint
        name="Link11"
        type="revolute">
        <origin
        xyz="0.042 0 0.003"
        rpy="5.0393E-16 5.6225E-16 0.30719" />
        <parent
        link="Link1" />
        <child
        link="Link11" />
        <axis
        xyz="0 0 1" />
        <limit
        lower="-1"
        upper="0"
        effort="1"
        velocity="1" />
    </joint>
    <link
        name="Link2">
        <inertial>
        <origin
            xyz="0.0164149658242926 9.75754915755189E-09 0.00898193900447147"
            rpy="0 0 0" />
        <mass
            value="0.00647716099397793" />
        <inertia
            ixx="2.95068972140683E-07"
            ixy="8.63208169650113E-13"
            ixz="-1.92008628755341E-09"
            iyy="1.69979619476872E-06"
            iyz="-1.99232397320157E-13"
            izz="1.45016449434989E-06" />
        </inertial>
        <visual>
        <origin
            xyz="0 0 0"
            rpy="0 0 0" />
        <geometry>
            <mesh
            filename="package://jawasm1/meshes/Link2.STL" />
        </geometry>
        <material
            name="">
            <color
            rgba="0.894117647058823 0.913725490196078 0.929411764705882 1" />
        </material>
        </visual>
        <collision>
        <origin
            xyz="0 0 0"
            rpy="0 0 0" />
        <geometry>
            <mesh
            filename="package://jawasm1/meshes/Link2.STL" />
        </geometry>
        </collision>
    </link>
    <joint
        name="Link2"
        type="revolute">
        <origin
        xyz="0.036 0.04 -0.019"
        rpy="-2.6397E-16 3.7199E-16 0.30719" />
        <parent
        link="base_link" />
        <child
        link="Link2" />
        <axis
        xyz="0 0 1" />
        <limit
        lower="-1"
        upper="0"
        effort="1"
        velocity="1" />
    </joint>
    <link
        name="Link22">
        <inertial>
        <origin
            xyz="-0.011366555972498 0.0118642725662323 -0.0060000073930068"
            rpy="0 0 0" />
        <mass
            value="0.0127543420299362" />
        <inertia
            ixx="5.68538478020238E-07"
            ixy="2.6801226272901E-07"
            ixz="9.34125986250171E-13"
            iyy="1.45145776457489E-06"
            iyz="-9.34355361631596E-13"
            izz="1.5056459822045E-06" />
        </inertial>
        <visual>
        <origin
            xyz="0 0 0"
            rpy="0 0 0" />
        <geometry>
            <mesh
            filename="package://jawasm1/meshes/Link22.STL" />
        </geometry>
        <material
            name="">
            <color
            rgba="0.894117647058823 0.913725490196078 0.929411764705882 1" />
        </material>
        </visual>
        <collision>
        <origin
            xyz="0 0 0"
            rpy="0 0 0" />
        <geometry>
            <mesh
            filename="package://jawasm1/meshes/Link22.STL" />
        </geometry>
        </collision>
    </link>
    <joint
        name="Link22"
        type="revolute">
        <origin
        xyz="0.042 0 0.015"
        rpy="-3.641E-16 2.4584E-16 2.8344" />
        <parent
        link="Link2" />
        <child
        link="Link22" />
        <axis
        xyz="0 0 1" />
        <limit
        lower="0"
        upper="1"
        effort="1"
        velocity="1" />
    </joint>
</robot>

简言之,可以把xacro看成是一个计算机语言。
然后编译以下,查看是否通过rviz能显示出完整夹爪
编译之前,先到夹爪的launch文件夹,修改里面的display.launch文件
第一处修改是textfile对应路径下将原先的jawasm1.urdf改为我们新添加的jawasm1.xacro文件(一会验证这个改写的xacro文件是不是有效)
第二处修改是node下的type参数,将原先的state_publisher改为robot_state_publisher
修改后如下:

<launch>
  <arg
    name="model" />
  <arg
    name="gui"
    default="True" />
  <param
    name="robot_description"
    textfile="$(find jawasm1)/robots/jawasm1.xacro" />
  <param
    name="use_gui"
    value="$(arg gui)" />
  <node
    name="joint_state_publisher"
    pkg="joint_state_publisher"
    type="joint_state_publisher" />
  <node
    name="robot_state_publisher"
    pkg="robot_state_publisher"
    type="robot_state_publisher" />
  <node
    name="rviz"
    pkg="rviz"
    type="rviz"
    args="-d $(find jawasm1)/urdf.rviz" />
</launch>

编译步骤:
打开终端:
catkin_make
source devel/setup.bash
roslaunch jawasm1 display.launch
在这里插入图片描述

得到的rviz显示如下:
先选择Fixed Frame里选项base_link
再点击左下角的Add按钮选择Robot Model
在这里插入图片描述然后即可出现夹爪模型:

在这里插入图片描述

三、aubo i5搭配因时夹爪

参考aubo i5搭配其他夹爪的案例(链接: https://github.com/hai-h-nguyen/aubo-i5-full),我们把这款因时夹爪搭配aubo i5机械臂
在aubo_description文件夹下新建一个文件,命名为aubo_i5_gripper.urdf,将aubo_description文件夹下的aubo_i5.urdf文件内容复制过来,再在对应位置添加上夹爪的内容信息,主要是机械臂末端link和夹爪的gripper_base_link通过joint(这里我在代码里命名为hand_joint)连接起来,以及连接夹爪和机械臂末端的hand_joint的 x、y、 z设置问题,防止夹爪添加到机械臂末端属于嵌入太深的情况,具体可以调节hand_joint里的y值、z值来理解我说的这种情况。
具体更新后的内容如下:

<?xml version="1.0"?>
<robot  name="aubo_i5">

  <link name="base_link">
    <inertial>
      <origin xyz="-1.4795E-13 0.0015384 0.020951" rpy="0 0 0" />
      <mass value="0.83419" />
      <inertia ixx="0.0014414" ixy="7.8809E-15" ixz="8.5328E-16" iyy="0.0013542" iyz="-1.4364E-05" izz="0.0024659" />
    </inertial>
    <visual>
      <origin xyz="0 0 0" rpy="0 0 0" />
      <geometry>
        <mesh filename="package://aubo_description/meshes/aubo_i5/visual/base_link.DAE" />
      </geometry>
      <material name="">
        <color rgba="1 1 1 1" />
      </material>
    </visual>
    <collision>
      <origin xyz="0 0 0" rpy="0 0 0" />
      <geometry>
        <mesh filename="package://aubo_description/meshes/aubo_i5/collision/base_link.STL" />
      </geometry>
    </collision>
  </link>

  <link name="shoulder_Link">
    <inertial>
      <origin xyz="3.2508868974735E-07 0.00534955349296065 -0.00883689325611056" rpy="0 0 0" />
      <mass value="1.57658348693929" />
      <inertia ixx="0.0040640448663128" ixy="0" ixz="0" iyy="0.00392863238466817" iyz="-0.000160151642851425" izz="0.0030869857349184" />
    </inertial>
    <visual>
      <origin xyz="0 0 0" rpy="0 0 0" />
      <geometry>
        <mesh filename="package://aubo_description/meshes/aubo_i5/visual/shoulder_Link.DAE" />
      </geometry>
      <material name="">
        <color rgba="1 1 1 1" />
      </material>
    </visual>
    <collision>
      <origin xyz="0 0 0" rpy="0 0 0" />
      <geometry>
        <mesh filename="package://aubo_description/meshes/aubo_i5/collision/shoulder_Link.STL" />
      </geometry>
    </collision>
  </link>

  <joint name="shoulder_joint" type="revolute">
    <origin xyz="0 0 0.122" rpy="0 0 3.1416" />
    <parent link="base_link" />
    <child link="shoulder_Link" />
    <axis xyz="0 0 1" />
    <limit lower="-3.04" upper="3.04" effort="0" velocity="0" />
  </joint>

  <link name="upperArm_Link">
    <inertial>
      <origin xyz="0.203996646979614 2.01304585036544E-10 0.0127641545395984" rpy="0 0 0" />
      <mass value="4.04175782265494" />
      <inertia ixx="0.00965399211106204" ixy="0" ixz="0" iyy="0.144993869035655" iyz="0" izz="0.142607184038966" />
    </inertial>
    <visual>
      <origin xyz="0 0 0" rpy="0 0 0" />
      <geometry>
        <mesh filename="package://aubo_description/meshes/aubo_i5/visual/upperArm_Link.DAE" />
      </geometry>
      <material name="">
        <color rgba="1 1 1 1" />
      </material>
    </visual>
    <collision>
      <origin xyz="0 0 0" rpy="0 0 0" />
      <geometry>
        <mesh filename="package://aubo_description/meshes/aubo_i5/collision/upperArm_Link.STL" />
      </geometry>
    </collision>
  </link>

  <joint name="upperArm_joint" type="revolute">
    <origin xyz="0 0.1215 0" rpy="-1.5708 -1.5708 0" />
    <parent link="shoulder_Link" />
    <child link="upperArm_Link" />
    <axis xyz="0 0 1" />
    <limit lower="-3.04" upper="3.04" effort="0" velocity="0" />
  </joint>

  <link name="foreArm_Link">
    <inertial>
      <origin xyz="0.188922115560337 6.78882434739072E-07 0.0981026740461557" rpy="0 0 0" />
      <mass  value="2.27145669098343" />
      <inertia ixx="0.00214322284946289" ixy="0" ixz="-0.00073120631553383" iyy="0.0443926090878205" iyz="0" izz="0.0441273797128365" />
    </inertial>
    <visual>
      <origin xyz="0 0 0" rpy="0 0 0" />
      <geometry>
        <mesh filename="package://aubo_description/meshes/aubo_i5/visual/foreArm_Link.DAE" />
      </geometry>
      <material name="">
        <color rgba="1 1 1 1" />
      </material>
    </visual>
    <collision>
      <origin xyz="0 0 0" rpy="0 0 0" />
      <geometry>
        <mesh filename="package://aubo_description/meshes/aubo_i5/collision/foreArm_Link.STL" />
      </geometry>
    </collision>
  </link>

  <joint name="foreArm_joint" type="revolute">
    <origin xyz="0.408 0 0" rpy="-3.1416 -5.1632E-18 -5.459E-16" />
    <parent link="upperArm_Link" />
    <child link="foreArm_Link" />
    <axis xyz="0 0 1" />
    <limit lower="-3.04" upper="3.04" effort="0" velocity="0" />
  </joint>

  <link name="wrist1_Link">
    <inertial>
      <origin xyz="7.54205137428592E-07 0.0062481254331257 -0.00392367464072373" rpy="0 0 0" />
      <mass value="0.500477539188764" />
      <inertia ixx="0.00071194605962081" ixy="0" ixz="0" iyy="0.00040588242872958" iyz="-2.30808694377512E-05" izz="0.000685574004861334" />
    </inertial>
    <visual>
      <origin xyz="0 0 0" rpy="0 0 0" />
      <geometry>
        <mesh filename="package://aubo_description/meshes/aubo_i5/visual/wrist1_Link.DAE" />
      </geometry>
      <material name="">
        <color rgba="1 1 1 1" />
      </material>
    </visual>
    <collision>
      <origin xyz="0 0 0" rpy="0 0 0" />
      <geometry>
        <mesh filename="package://aubo_description/meshes/aubo_i5/collision/wrist1_Link.STL" />
      </geometry>
    </collision>
  </link>

  <joint name="wrist1_joint" type="revolute">
    <origin xyz="0.376 0 0" rpy="3.1416 -1.8323E-15 1.5708" />
    <parent link="foreArm_Link" />
    <child link="wrist1_Link" />
    <axis xyz="0 0 1" />
    <limit lower="-3.04" upper="3.04" effort="0" velocity="0" />
  </joint>

  <link name="wrist2_Link">
    <inertial>
      <origin xyz="-7.54207620578635E-07 -0.00624812542617262 -0.00392367464115684" rpy="0 0 0" />
      <mass value="0.500477539245988" />
      <inertia ixx="0.00071194605981829" ixy="0" ixz="0" iyy="0.000405882428755442" iyz="2.30808694515886E-05" izz="0.000685574005112107" />
    </inertial>
    <visual>
      <origin xyz="0 0 0" rpy="0 0 0" />
      <geometry>
        <mesh filename="package://aubo_description/meshes/aubo_i5/visual/wrist2_Link.DAE" />
      </geometry>
      <material name="">
        <color rgba="1 1 1 1" />
      </material>
    </visual>
    <collision>
      <origin xyz="0 0 0" rpy="0 0 0" />
      <geometry>
        <mesh filename="package://aubo_description/meshes/aubo_i5/collision/wrist2_Link.STL" />
      </geometry>
    </collision>
  </link>

  <joint name="wrist2_joint" type="revolute">
    <origin xyz="0 0.1025 0" rpy="-1.5708 -1.8709E-15 -1.6653E-16" />
    <parent link="wrist1_Link" />
    <child link="wrist2_Link" />
    <axis xyz="0 0 1" />
    <limit lower="-3.04" upper="3.04" effort="0" velocity="0" />
  </joint>

  <link name="wrist3_Link">
    <inertial>
      <origin xyz="3.92048778449938E-10 0.000175788057281467 -0.0213294490706684" rpy="0 0 0" />
      <mass value="0.158309554874285" />
      <inertia ixx="7.31376196034769E-05" ixy="0" ixz="0" iyy="7.19528188876563E-05" iyz="0" izz="0.000108772439051422" />
    </inertial>
    <visual>
      <origin xyz="0 0 0" rpy="0 0 0" />
      <geometry>
        <mesh filename="package://aubo_description/meshes/aubo_i5/visual/wrist3_Link.DAE" />
      </geometry>
      <material name="">
        <color rgba="1 1 1 1" />
      </material>
    </visual>
    <collision>
      <origin xyz="0 0 0" rpy="0 0 0" />
      <geometry>
        <mesh filename="package://aubo_description/meshes/aubo_i5/collision/wrist3_Link.STL" />
      </geometry>
    </collision>
  </link>

  <joint name="wrist3_joint" type="revolute">
    <origin xyz="0 -0.094 0" rpy="1.5708 0 1.7907E-15" />
    <parent link="wrist2_Link" />
    <child link="wrist3_Link" />
    <axis xyz="0 0 1" />
    <limit lower="-3.04" upper="3.04" effort="0" velocity="0" />
  </joint>

  <link
    name="gripper_base_link">
    <inertial>
      <origin
        xyz="0.00339303654278191 -2.1205433560656E-05 -0.0099185365078758"
        rpy="0 0 0" />
      <mass
        value="0.105853592307918" />
      <inertia
        ixx="3.93795927851199E-05"
        ixy="-8.7395226509728E-08"
        ixz="5.91928672040786E-07"
        iyy="0.000106376720416166"
        iyz="-1.82858764303774E-10"
        izz="0.000125852616063213" />
    </inertial>
    <visual>
      <origin
        xyz="0 0 0"
        rpy="0 0 0" />
      <geometry>
        <mesh
          filename="package://jawasm1/meshes/base_link.STL" />
      </geometry>
      <material
        name="">
        <color
          rgba="0.894117647058823 0.913725490196078 0.929411764705882 1" />
      </material>
    </visual>
    <collision>
      <origin
        xyz="0 0 0"
        rpy="0 0 0" />
      <geometry>
        <mesh
          filename="package://jawasm1/meshes/base_link.STL" />
      </geometry>
    </collision>
  </link>

  <joint name="hand_joint" type="fixed">
    <origin xyz="0 0 0.0125" rpy="0 -1.57079632679 1.57079632679" />
    <parent link="wrist3_Link" />
    <child link="gripper_base_link" />
    <axis xyz="0 0 0" />
  </joint>

  <link
    name="Link1">
    <inertial>
      <origin
        xyz="0.0164149658242926 9.75754915755189E-09 0.00898193900447147"
        rpy="0 0 0" />
      <mass
        value="0.00647716099397792" />
      <inertia
        ixx="2.95068972140683E-07"
        ixy="8.63208170411155E-13"
        ixz="-1.92008628754607E-09"
        iyy="1.69979619476872E-06"
        iyz="-1.99232397395103E-13"
        izz="1.45016449434989E-06" />
    </inertial>
    <visual>
      <origin
        xyz="0 0 0"
        rpy="0 0 0" />
      <geometry>
        <mesh
          filename="package://jawasm1/meshes/Link1.STL" />
      </geometry>
      <material
        name="">
        <color
          rgba="0.894117647058823 0.913725490196078 0.929411764705882 1" />
      </material>
    </visual>
    <collision>
      <origin
        xyz="0 0 0"
        rpy="0 0 0" />
      <geometry>
        <mesh
          filename="package://jawasm1/meshes/Link1.STL" />
      </geometry>
    </collision>
  </link>
  <joint
    name="Link1"
    type="revolute">
    <origin
      xyz="0.036 -0.04 -0.019"
      rpy="-3.0158E-16 -7.1586E-16 -0.30719" />
    <parent
      link="gripper_base_link" />
    <child
      link="Link1" />
    <axis
      xyz="0 0 1" />
    <limit
      lower="0"
      upper="1"
      effort="1"
      velocity="1" />
  </joint>
  <link
    name="Link11">
    <inertial>
      <origin
        xyz="0.011366555972498 0.0118642725662323 0.0060000073930068"
        rpy="0 0 0" />
      <mass
        value="0.0127543420299361" />
      <inertia
        ixx="5.68538478020233E-07"
        ixy="-2.68012262729007E-07"
        ixz="9.34125984931838E-13"
        iyy="1.45145776457487E-06"
        iyz="9.34355360561326E-13"
        izz="1.50564598220449E-06" />
    </inertial>
    <visual>
      <origin
        xyz="0 0 0"
        rpy="0 0 0" />
      <geometry>
        <mesh
          filename="package://jawasm1/meshes/Link11.STL" />
      </geometry>
      <material
        name="">
        <color
          rgba="0.894117647058823 0.913725490196078 0.929411764705882 1" />
      </material>
    </visual>
    <collision>
      <origin
        xyz="0 0 0"
        rpy="0 0 0" />
      <geometry>
        <mesh
          filename="package://jawasm1/meshes/Link11.STL" />
      </geometry>
    </collision>
  </link>
  <joint
    name="Link11"
    type="revolute">
    <origin
      xyz="0.042 0 0.003"
      rpy="5.0393E-16 5.6225E-16 0.30719" />
    <parent
      link="Link1" />
    <child
      link="Link11" />
    <axis
      xyz="0 0 1" />
    <limit
      lower="-1"
      upper="0"
      effort="1"
      velocity="1" />
  </joint>
  <link
        name="Link2">
        <inertial>
        <origin
            xyz="0.0164149658242926 9.75754915755189E-09 0.00898193900447147"
            rpy="0 0 0" />
        <mass
            value="0.00647716099397793" />
        <inertia
            ixx="2.95068972140683E-07"
            ixy="8.63208169650113E-13"
            ixz="-1.92008628755341E-09"
            iyy="1.69979619476872E-06"
            iyz="-1.99232397320157E-13"
            izz="1.45016449434989E-06" />
        </inertial>
        <visual>
        <origin
            xyz="0 0 0"
            rpy="0 0 0" />
        <geometry>
            <mesh
            filename="package://jawasm1/meshes/Link2.STL" />
        </geometry>
        <material
            name="">
            <color
            rgba="0.894117647058823 0.913725490196078 0.929411764705882 1" />
        </material>
        </visual>
        <collision>
        <origin
            xyz="0 0 0"
            rpy="0 0 0" />
        <geometry>
            <mesh
            filename="package://jawasm1/meshes/Link2.STL" />
        </geometry>
        </collision>
    </link>
    <joint
        name="Link2"
        type="revolute">
        <origin
        xyz="0.036 0.04 -0.019"
        rpy="-2.6397E-16 3.7199E-16 0.30719" />
        <parent
        link="gripper_base_link" />
        <child
        link="Link2" />
        <axis
        xyz="0 0 1" />
        <limit
        lower="-1"
        upper="0"
        effort="1"
        velocity="1" />
    </joint>
    <link
        name="Link22">
        <inertial>
        <origin
            xyz="-0.011366555972498 0.0118642725662323 -0.0060000073930068"
            rpy="0 0 0" />
        <mass
            value="0.0127543420299362" />
        <inertia
            ixx="5.68538478020238E-07"
            ixy="2.6801226272901E-07"
            ixz="9.34125986250171E-13"
            iyy="1.45145776457489E-06"
            iyz="-9.34355361631596E-13"
            izz="1.5056459822045E-06" />
        </inertial>
        <visual>
        <origin
            xyz="0 0 0"
            rpy="0 0 0" />
        <geometry>
            <mesh
            filename="package://jawasm1/meshes/Link22.STL" />
        </geometry>
        <material
            name="">
            <color
            rgba="0.894117647058823 0.913725490196078 0.929411764705882 1" />
        </material>
        </visual>
        <collision>
        <origin
            xyz="0 0 0"
            rpy="0 0 0" />
        <geometry>
            <mesh
            filename="package://jawasm1/meshes/Link22.STL" />
        </geometry>
        </collision>
    </link>
    <joint
        name="Link22"
        type="revolute">
        <origin
        xyz="0.042 0 0.015"
        rpy="-3.641E-16 2.4584E-16 2.8344" />
        <parent
        link="Link2" />
        <child
        link="Link22" />
        <axis
        xyz="0 0 1" />
        <limit
        lower="0"
        upper="1"
        effort="1"
        velocity="1" />
    </joint>


  <link name="world" />

  <joint name="world_joint" type="fixed">
    <parent link="world" />
    <child link = "pedestal_Link" />
    <origin xyz="0.0 0.0 0.0" rpy="0.0 0.0 0.0" />
  </joint>

  <link 
    name="pedestal_Link">
    <visual>
      <geometry>
        <mesh
          filename="package://aubo_description/meshes/aubo_i5/collision/pedestal.STL" />
      </geometry>
    </visual>
  </link>

  <joint 
    name="pedestal_joint" 
    type="fixed">
    <parent link="pedestal_Link"/>
    <child link="base_link"/>
    <origin xyz="0.0 0.0 0.40" rpy="0.0 0.0 0.0" />
</joint>
</robot>

验证这个新建的文件,记得修改一下aubo_description文件夹下的display.launch
第一处修改是textfile,将原先的aubo_i5.urdf换为aubo_i5_gripper.urdf
第二处修改是node下的type参数,将原先的state_publisher改为robot_state_publisher

<launch>
  <arg
    name="model" />
  <arg
    name="gui"
    default="False" />
  <param
    name="robot_description"
    textfile="$(find aubo_description)/urdf/aubo_i5_gripper.urdf" />
  <param
    name="use_gui"
    value="$(arg gui)" />
  <node
    name="joint_state_publisher"
    pkg="joint_state_publisher"
    type="joint_state_publisher" />
  <node
    name="robot_state_publisher"
    pkg="robot_state_publisher"
    type="robot_state_publisher" />
  <node
    name="rviz"
    pkg="rviz"
    type="rviz"
    args="-d $(find aubo_description)/urdf.rviz" />
</launch>

编译命令步骤:
catkin_make
source devel/setup.bash
roslaunch aubo_description display.launch
在这里插入图片描述

得到的rviz显示如下:
同样的也是要先选择Fixed Frame为world,再点击左下角的Add按钮,选择RobotModel,即可得到正确添加夹爪后机械臂
在这里插入图片描述

本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若转载,请注明出处:http://www.coloradmin.cn/o/1532021.html

如若内容造成侵权/违法违规/事实不符,请联系多彩编程网进行投诉反馈,一经查实,立即删除!

相关文章

PyCharm中设置代码模版

前言 新创建一个.py文件后&#xff0c;我们总需要在开头写一些必要的代码&#xff0c;有什么方法能够一劳永逸&#xff0c;让这些代码自动生成呢&#xff1f; 有&#xff0c;它就是代码模版。 设置代码模版 这里先说说如何设置它。 步骤&#xff1a;首先打开PyCharm&#xff0…

内核移植——开发板的软件抽象(struct machine_desc)

以下内容源于朱有鹏嵌入式课程的学习与整理&#xff0c;如有侵权请告知删除。 内核支持什么架构、支持哪款cpu&#xff0c;这是如何确定的&#xff1f;主要是通过机器码来确定的。 内核中定义了一份机器码&#xff0c;uboot也会给内核传递一个机器码。 在内核启动的汇编阶段&…

PowerShell 一键更改远程桌面端口

前言 提高工作效率,安全性和规范化,最终实现一键更改Windows 远程桌面端口 前提条件 开启wmi,配置网卡,参考 一键更改远程桌面端口自动化脚本 默认端口3389变更后的端口3390win+r mstsc YOU_ip常规更改的连接方式win+r mstsc YOU_ip:3390需要恢复到原来的端口3390更改成3…

wireshark抓tcp包使用指南

本博文源于笔者不断探索加上去网络总结获得的经验&#xff0c;撰写wireshark如何抓tcp包 文章目录 1、打开wireshark2、选择网络源3、搜索ip地址与tcp条件4、看灰色的条纹 1、打开wireshark 2、选择网络源 选择自己当前的ip地址适用于的网络源&#xff0c;比如这里选择“以太…

.net使用excel的cells对象没有value方法——学习.net的Excel工作表问题

$exception {"Public member Value on type Range not found."} System.MissingMemberException 代码准备运行问题解决1. 下载别的版本的.net框架2. 安装3. 运行 代码 Imports Excel Microsoft.office.Interop.Excel Public Class Form1Private Sub Button1_Click(…

CTF题型 匿名函数考法例题总结

CTF题型 匿名函数考法&例题总结 文章目录 CTF题型 匿名函数考法&例题总结一 .原理分析二 .重点匿名函数利用1.create_function()如何实现create_function代码注入 2.array_map()3.call_user_func()4.call_user_func_array()5.array_filter() 三.例题讲解1.[Polar 靶场 …

netty基础_12.用 Netty 自己实现简单的RPC

用 Netty 自己实现简单的RPC RPC 基本介绍我们的RPC 调用流程图己实现 Dubbo RPC&#xff08;基于 Netty&#xff09;需求说明设计说明代码封装的RPCNettyServerNettyServerHandlerNettyClientHandlerNettyClient 接口服务端(provider)HelloServiceImplServerBootstrap 客户端(…

Spring Web MVC入门(5)

响应 在我们前面的代码例子中, 都已经设置了响应数据Http响应结果可以是数据, 也可以是静态页面, 也可以针对响应设置状态码, Header信息等. 返回静态页面 创建前端页面index.html(注意路径) html代码如下: <!DOCTYPE html> <html lang"en"> <hea…

算法沉淀——贪心算法四(leetcode真题剖析)

算法沉淀——贪心算法四 01.最长回文串02.增减字符串匹配03.分发饼干04.最优除法 01.最长回文串 题目链接&#xff1a;https://leetcode.cn/problems/longest-palindrome/ 给定一个包含大写字母和小写字母的字符串 s &#xff0c;返回 通过这些字母构造成的 最长的回文串 。 …

初始Java篇(JavaSE基础语法)(2)

个人主页&#xff08;找往期文章包括但不限于本期文章中不懂的知识点&#xff09;&#xff1a;我要学编程(ಥ_ಥ)-CSDN博客 目录 逻辑控制 顺序结构 分支结构 if语句 switch 语句 循环结构 while 循环 for 循环 do while 循环 输入输出 输出到控制台 从键盘输入 …

C++ UML类图

参考文章&#xff1a; &#xff08;1&#xff09;C UML类图详解 &#xff08;2&#xff09;C基础——用C实例理解UML类图 &#xff08;3&#xff09;C设计模式——UML类图 &#xff08;4&#xff09;[UML] 类图介绍 —— 程序员&#xff08;灵魂画手&#xff09;必备画图技能之…

npm出现内部错误,重新设置镜像

问题&#xff1a; 报错解释&#xff1a; 这个错误表明你尝试从一个指定的npm镜像源的响应时失败了。可能的原因包括网络问题、镜像源不可用、DNS解析问题或者镜像源的确已经下线或更改。 1.重新设置镜像源 设置淘宝镜像源&#xff1a; npm config set registry https://re…

⾃定义类型:联合和枚举

1.联合体 1.1 联合体类型的声明 像结构体⼀样&#xff0c;联合体也是由⼀个或者多个成员构成&#xff0c;这些成员可以不同的类型。 但是编译器只为最⼤的成员分配⾜够的内存空间。联合体的特点是所有成员共⽤同⼀块内存空间。所以联合体也叫&#xff1a;共⽤体。 给联合体…

安装MySQL5.7.19 + 解决数据库乱码

文章目录 1.删除mysql服务 sc delete mysql2.解压到D:\mysql5.7下3.配置管理员环境变量4.D:\mysql5.7\mysql-5.7.19-winx64下创建my.ini1.创建文件2.文件内容 5.管理员打开cmd&#xff0c;切换到 D:\mysql5.7\mysql-5.7.19-winx64\bin6.输入 mysqld -install 安装mysql服务7.初…

腾讯云服务器怎么买省钱?先领券,再下单!

腾讯云代金券领取渠道有哪些&#xff1f;腾讯云官网可以领取、官方媒体账号可以领取代金券、完成任务可以领取代金券&#xff0c;大家也可以在腾讯云百科蹲守代金券&#xff0c;因为腾讯云代金券领取渠道比较分散&#xff0c;腾讯云百科txybk.com专注汇总优惠代金券领取页面&am…

2024年腾讯云服务器优惠券领取入口和代金券使用教程(收藏)

腾讯云代金券领取渠道有哪些&#xff1f;腾讯云官网可以领取、官方媒体账号可以领取代金券、完成任务可以领取代金券&#xff0c;大家也可以在腾讯云百科蹲守代金券&#xff0c;因为腾讯云代金券领取渠道比较分散&#xff0c;腾讯云百科txybk.com专注汇总优惠代金券领取页面&am…

C语言经典算法-6

文章目录 其他经典例题跳转链接31.数字拆解32.得分排行33.选择、插入、气泡排序34.Shell 排序法 - 改良的插入排序35.Shaker 排序法 - 改良的气泡排序 其他经典例题跳转链接 C语言经典算法-1 1.汉若塔 2. 费式数列 3. 巴斯卡三角形 4. 三色棋 5. 老鼠走迷官&#xff08;一&…

10分钟带你了解分布式系统的补偿机制

我们知道&#xff0c;应用系统在分布式的情况下&#xff0c;在通信时会有着一个显著的问题&#xff0c;即一个业务流程往往需要组合一组服务&#xff0c;且单单一次通信可能会经过 DNS 服务&#xff0c;网卡、交换机、路由器、负载均衡等设备&#xff0c;而这些服务于设备都不一…

浏览量这么低,还要不要继续坚持?

哈喽&#xff0c;你好啊&#xff0c;我是雷工&#xff01; 曾经在一个群里聊天&#xff0c;有群友看到我两位数的浏览量&#xff0c;说到&#xff1a;浏览量这么低还坚持什么&#xff1f; 浏览量低是事实&#xff0c;大多数是十几二十的&#xff0c;上百的都是少数&#xff0c…

Day62:WEB攻防-PHP反序列化CLI框架类PHPGGC生成器TPYiiLaravel等利用

目录 反序列化链项目-PHPGGC&NotSoSecure NotSoSecure(综合类) PHPGGC(单项类) 反序列化框架利用-ThinkPHP&Yii&Laravel [安洵杯 2019]iamthinking Thinkphp V6.0.X 反序列化 CTFSHOW 反序列化 267 Yii2反序列化 CTFSHOW 反序列化 271 Laravel反序列化 知识…