因时夹爪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" ?>
<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,即可得到正确添加夹爪后机械臂