7. Moveit:PROBOT c800 urdf文件的MoveIt Setup Assistant可视化配置

对应源码路径 guyueclass-main\guyueclass-main\ros_basic\moveit_setup_assistant

一、PROBOT c800的URDF文件:c800_description.urdf

<?xml version="1.0" encoding="utf-8" ?>
<!-- This URDF was automatically created by SolidWorks to URDF Exporter! Originally created by Stephen Brawner (brawner@gmail.com) 
     Commit Version: 1.5.1-0-g916b5db  Build Version: 1.5.7152.31018
     For more information, please see http://wiki.ros.org/sw_urdf_exporter -->
<robot name="c800_description">

    <joint name="bottom_joint" type="fixed">
        <origin xyz="0 0 0" rpy="0 0 0" />
        <parent link="base_link"/>
        <child link="bottom_link"/>
    </joint>
    <link name="bottom_link">
        <visual>
              <origin xyz=" 0 0 -0.01"  rpy="0 0 0"/>
                  <geometry>
                       <box size="0.2 0.2 0.02" />
                  </geometry>
              <material name="Brown" />
        </visual>
        <collision>
            <origin xyz=" 0 0 -0.01"  rpy="0 0 0"/>
            <geometry>
                <box size="0.2 0.2 0.02" />
            </geometry>
        </collision>
        <inertial>
            <mass value="500" />
            <inertia ixx="1.0" ixy="0.0" ixz="0.0" iyy="0.5" iyz="0.0" izz="1.0" />
        </inertial>
    </link>


    <link name="base_link">
        
<inertial>
            <origin xyz="5.1159E-06 -0.00045852 0.01511" rpy="0 0 0" />
            <mass value="0.47731" />
            <inertia ixx="0.00060819" ixy="-1.4211E-07" ixz="2.912E-08" iyy="0.00062131" iyz="-2.5797E-06" izz="0.0011481" />
        </inertial>

        <visual>
            <origin xyz="0 0 0" rpy="0 0 0" />
            <geometry>
                <mesh filename="package://c800_description/meshes/base_link.STL" />
            </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://c800_description/meshes/base_link.STL" />
            </geometry>
        </collision>
    </link>
    <link name="link_1">
        
<inertial>
            <origin xyz="0.009995 0.00010952 -0.088076" rpy="0 0 0" />
            <mass value="1.8893" />
            <inertia ixx="0.0041014" ixy="-5.8451E-06" ixz="0.0003739" iyy="0.0046287" iyz="4.1148E-06" izz="0.0033533" />
        </inertial>

        <visual>
            <origin xyz="0 0 0" rpy="0 0 0" />
            <geometry>
                <mesh filename="package://c800_description/meshes/link_1.STL" />
            </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://c800_description/meshes/link_1.STL" />
            </geometry>
        </collision>
    </link>
    <joint name="joint_1" type="revolute">
        <origin xyz="0 0 0.0317" rpy="3.1416 0 -1.5598" />
        <parent link="base_link" />
        <child link="link_1" />
        <axis xyz="0 0 1" />
        <limit lower="-3" upper="3" effort="100" velocity="3" />
    </joint>
    <link name="link_2">
        
<inertial>
            <origin xyz="0.087798 0.00096966 -0.1742" rpy="0 0 0" />
            <mass value="5.0587" />
            <inertia ixx="0.012152" ixy="-2.8164E-05" ixz="-3.968E-10" iyy="0.014702" iyz="-4.2598E-08" izz="0.0095763" />
        </inertial>

        <visual>
            <origin xyz="0 0 0" rpy="0 0 0" />
            <geometry>
                <mesh filename="package://c800_description/meshes/link_2.STL" />
            </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://c800_description/meshes/link_2.STL" />
            </geometry>
        </collision>
    </link>
    <joint name="joint_2" type="revolute">
        <origin xyz="0.075695 0.00083599 -0.087" rpy="0 0 0" />
        <parent link="link_1" />
        <child link="link_2" />
        <axis xyz="0.99994 0.011043 0" />
        <limit lower="-3" upper="3" effort="100" velocity="3" />
    </joint>
    <link name="link_3">
        
<inertial>
            <origin xyz="-0.074461 -0.00081729 -0.18595" rpy="0 0 0" />
            <mass value="2.4785" />
            <inertia ixx="0.0066463" ixy="-2.7745E-06" ixz="-0.00025133" iyy="0.0069332" iyz="-2.9588E-06" izz="0.0024538" />
        </inertial>

        <visual>
            <origin xyz="0 0 0" rpy="0 0 0" />
            <geometry>
                <mesh filename="package://c800_description/meshes/link_3.STL" />
            </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://c800_description/meshes/link_3.STL" />
            </geometry>
        </collision>
    </link>
    <joint name="joint_3" type="revolute">
        <origin xyz="0 0 -0.3484" rpy="0 0 0" />
        <parent link="link_2" />
        <child link="link_3" />
        <axis xyz="0.99994 0.011043 0" />
        <limit lower="-3" upper="3" effort="100" velocity="3" />
    </joint>
    <link name="link_4">
        
<inertial>
            <origin xyz="0.03744 0.00041334 0.011039" rpy="0 0 0" />
            <mass value="0.69512" />
            <inertia ixx="0.0007079" ixy="-9.1282E-07" ixz="-1.3418E-11" iyy="0.00079063" iyz="-9.8306E-11" izz="0.00062854" />
        </inertial>

        <visual>
            <origin xyz="0 0 0" rpy="0 0 0" />
            <geometry>
                <mesh filename="package://c800_description/meshes/link_4.STL" />
            </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://c800_description/meshes/link_4.STL" />
            </geometry>
        </collision>
    </link>
    <joint name="joint_4" type="revolute">
        <origin xyz="-0.017899 -0.00019768 -0.3495" rpy="0 0 0" />
        <parent link="link_3" />
        <child link="link_4" />
        <axis xyz="-0.99994 -0.011043 0" />
        <limit lower="-3" upper="3" effort="100" velocity="3" />
    </joint>
    <link name="link_5">
        
<inertial>
            <origin xyz="-0.011486 -0.00012684 -0.045406" rpy="0 0 0" />
            <mass value="0.69038" />
            <inertia ixx="0.00062179" ixy="-1.8272E-06" ixz="1.9143E-11" iyy="0.00078721" iyz="5.7484E-12" izz="0.00070448" />
        </inertial>

        <visual>
            <origin xyz="0 0 0" rpy="0 0 0" />
            <geometry>
                <mesh filename="package://c800_description/meshes/link_5.STL" />
            </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://c800_description/meshes/link_5.STL" />
            </geometry>
        </collision>
    </link>
    <joint name="joint_5" type="revolute">
        <origin xyz="0.042397 0.00046824 -0.0501" rpy="0 0 0" />
        <parent link="link_4" />
        <child link="link_5" />
        <axis xyz="0 0 1" />
        <limit lower="-3" upper="3" effort="100" velocity="3" />
    </joint>
    <link name="link_6">
        
<inertial>
            <origin xyz="0.01497 0.00016533 -6.0527E-10" rpy="0 0 0" />
            <mass value="0.13891" />
            <inertia ixx="0.00011411" ixy="5.0377E-07" ixz="1.0257E-12" iyy="6.8505E-05" iyz="-1.0223E-10" izz="6.85E-05" />
        </inertial>

        <visual>
            <origin xyz="0 0 0" rpy="0 0 0" />
            <geometry>
                <mesh filename="package://c800_description/meshes/link_6.STL" />
            </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://c800_description/meshes/link_6.STL" />
            </geometry>
        </collision>
    </link>
    <joint name="joint_6" type="revolute">
        <origin xyz="0.050097 0.00055327 -0.0504" rpy="0 0 0" />
        <parent link="link_5" />
        <child link="link_6" />
        <axis xyz="1 0 0" />
        <limit lower="-3" upper="3" effort="100" velocity="3" />
    </joint>

  <link name="tool0"/>
  <joint name="joint_tool0" type="fixed">
    <origin xyz="0.03328 0 0" rpy="0 0 0" />
    <parent link="link_6" />
    <child link="tool0" />
  </joint>
    
<transmission name="trans_joint_1">
        <type>transmission_interface/SimpleTransmission</type>
        <joint name="joint_1">
            <hardwareInterface>hardware_interface/PositionJointInterface</hardwareInterface>
        </joint>
        <actuator name="joint_1_motor">
            <hardwareInterface>hardware_interface/PositionJointInterface</hardwareInterface>
            <mechanicalReduction>1</mechanicalReduction>
        </actuator>
    </transmission>
    <transmission name="trans_joint_2">
        <type>transmission_interface/SimpleTransmission</type>
        <joint name="joint_2">
            <hardwareInterface>hardware_interface/PositionJointInterface</hardwareInterface>
        </joint>
        <actuator name="joint_2_motor">
            <hardwareInterface>hardware_interface/PositionJointInterface</hardwareInterface>
            <mechanicalReduction>1</mechanicalReduction>
        </actuator>
    </transmission>
    <transmission name="trans_joint_3">
        <type>transmission_interface/SimpleTransmission</type>
        <joint name="joint_3">
            <hardwareInterface>hardware_interface/PositionJointInterface</hardwareInterface>
        </joint>
        <actuator name="joint_3_motor">
            <hardwareInterface>hardware_interface/PositionJointInterface</hardwareInterface>
            <mechanicalReduction>1</mechanicalReduction>
        </actuator>
    </transmission>
    <transmission name="trans_joint_4">
        <type>transmission_interface/SimpleTransmission</type>
        <joint name="joint_4">
            <hardwareInterface>hardware_interface/PositionJointInterface</hardwareInterface>
        </joint>
        <actuator name="joint_4_motor">
            <hardwareInterface>hardware_interface/PositionJointInterface</hardwareInterface>
            <mechanicalReduction>1</mechanicalReduction>
        </actuator>
    </transmission>
    <transmission name="trans_joint_5">
        <type>transmission_interface/SimpleTransmission</type>
        <joint name="joint_5">
            <hardwareInterface>hardware_interface/PositionJointInterface</hardwareInterface>
        </joint>
        <actuator name="joint_5_motor">
            <hardwareInterface>hardware_interface/PositionJointInterface</hardwareInterface>
            <mechanicalReduction>1</mechanicalReduction>
        </actuator>
    </transmission>
    <transmission name="trans_joint_6">
        <type>transmission_interface/SimpleTransmission</type>
        <joint name="joint_6">
            <hardwareInterface>hardware_interface/PositionJointInterface</hardwareInterface>
        </joint>
        <actuator name="joint_6_motor">
            <hardwareInterface>hardware_interface/PositionJointInterface</hardwareInterface>
            <mechanicalReduction>1</mechanicalReduction>
        </actuator>
    </transmission>
    <gazebo>
        <plugin name="gazebo_ros_control" filename="libgazebo_ros_control.so">
            <robotNamespace>/</robotNamespace>
        </plugin>
    </gazebo>
</robot>

(1)<joint>:P121

(2)<link>:P121

(3)<collision>:P124

(4)<transmission>:P140

(5)<gazebo>:P143

(6)加入底盘(500公斤)防止侧翻。

 <joint name="bottom_joint" type="fixed">
        <origin xyz="0 0 0" rpy="0 0 0" />
        <parent link="base_link"/>
        <child link="bottom_link"/>
    </joint>
    <link name="bottom_link">
        <visual>
              <origin xyz=" 0 0 -0.01"  rpy="0 0 0"/>
                  <geometry>
                       <box size="0.2 0.2 0.02" />
                  </geometry>
              <material name="Brown" />
        </visual>
        <collision>
            <origin xyz=" 0 0 -0.01"  rpy="0 0 0"/>
            <geometry>
                <box size="0.2 0.2 0.02" />
            </geometry>
        </collision>
        <inertial>
            <mass value="500" />
            <inertia ixx="1.0" ixy="0.0" ixz="0.0" iyy="0.5" iyz="0.0" izz="1.0" />
        </inertial>
    </link>

(7)加入工具坐标系tool0,沿link_6的x轴偏移0.03328米

  <link name="tool0"/>
  <joint name="joint_tool0" type="fixed">
    <origin xyz="0.03328 0 0" rpy="0 0 0" />
    <parent link="link_6" />
    <child link="tool0" />
  </joint>

二、显示urdf文件:display.launch

<launch>
  <arg
    name="model" />
  <arg
    name="gui"
    default="False" />
  <param
    name="robot_description"
    textfile="$(find c800_description)/urdf/c800_description.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="state_publisher" />
  <node
    name="rviz"
    pkg="rviz"
    type="rviz"
    args="-d $(find c800_description)/urdf.rviz" />
</launch>

(1)修改joint_state_publisher后加_gui。要不不会出现滑动条小工具。

(2)修改state_publisher前加robot_,不加会报以下错误:

[ WARN] [1652667738.454603677]: The 'state_publisher' executable is deprecated. Please use 'robot_state_publisher' instead

(3)修改urdf文件,开头加入加入一个虚拟的杆与关节,因为KDL求解器不支持有惯性的基杆。设置一个虚拟杆,作为base_link父杆,base_link作为dummy(虚拟杆)杆的子杆,其中dummy没有任何实际意义,但是它作为基杆没有惯性矩阵,解决了报错问题。

<link name="dummy"> 
</link>
<joint name="dummy_joint" type="fixed">
     <parent link="dummy"/>
     <child link="base_link"/>
</joint>

不改,就会警告:

[ WARN] [1652667738.517454301]: The root link base_link has an inertia specified in the URDF, but KDL does not support a root link with an inertia.  As a workaround, you can add an extra dummy link to your URDF.

修改后的结果:

c800_description.urdf

<?xml version="1.0" encoding="utf-8" ?>
<!-- This URDF was automatically created by SolidWorks to URDF Exporter! Originally created by Stephen Brawner (brawner@gmail.com) 
     Commit Version: 1.5.1-0-g916b5db  Build Version: 1.5.7152.31018
     For more information, please see http://wiki.ros.org/sw_urdf_exporter -->
<robot name="c800_description">
<link name="dummy"> 
</link>
<joint name="dummy_joint" type="fixed">
     <parent link="dummy"/>
     <child link="base_link"/>
</joint>
。。。。。。。

display.launch

<launch>
  <arg
    name="model" />
  <arg
    name="gui"
    default="False" />
  <param
    name="robot_description"
    textfile="$(find c800_description)/urdf/c800_description.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 c800_description)/urdf.rviz" />
</launch>

三、rviz可视化

roslaunch c800_description display.launch

经过修改没有报任何错误。

rviz没有显示模型

(1)将固定坐标系改为base_link

 (2)加入RobotModel模块

 (3)加入TF模块,显示各个关节的三维位姿信息,robot_state_publisher发布的TF信息

 

 四、启动配置助手moveit_setup_assistant

 1.打开配置助手,配置一个新的包。

roslaunch moveit_setup_assistant setup_assistant.launch

 2.加载URDF文件,注意该操作所在终端必须是在工作空间内source后的终端,要不找不到相应的URDF文件。

 3.自碰撞检测,永远不会碰撞的杆之后不再参与碰撞检测计算,减少计算量。

 4.定义虚拟关节,机械臂底盘移动的情况下需要配置。在外界设置一个参考坐标系——世界参考坐标系。

用KDL会警告基杆不能有惯性系数,就得加入一个dummy杆,但是虚拟关节加在base_links上还和dummy杆冲突。故不需要没必要加各个虚拟关节。

5.定义规划组(运动学)

 (1)有论文提到trac_ik与RRTConnect好于KDL与RRT算法,故全部选择前者。之后报个小错,Melodic通病不影响运行。

[ WARN] [1652690666.945668007]: IK plugin for group 'arm' relies on deprecated API. Please implement initialize(RobotModel, ...).

 (2)运动学求解超时时间设置,设置太小如果在规定时间内没有求解出来会报错,并规划失败。(单位s秒)

(3)运动学参数文件空着,因为手动配置,没有预先准备的参数文件。

(4)设置运动学规划链。

6.预定义位姿

 7.定义末端执行器,这个urdf文件没有末端执行器。

 8.定义消极关节,规定某个关节不动,不用设置

 9.设置ROS控制器

(1)自动添加每个规划组的控制器

(2)添加接收信息的控制器

 Add Planning Group Joints

 save保存

 10.自动产生对应于gazebo的URDF文件。

 Copy to Clipboard复制到剪切板。复制到之前的URDF文件。

 其中绿色字为自动产生或者修改的内容。

 之前是已经修改过的URDF文件,组件很全,故发现之前已经添加了位姿控制接口,配置助手给我自动补充了力控接口,由于不用力控接口将其删除。如果没有位姿控制接口,那就把力控接口改为位姿控制接口。

EffortJointInterface改为PositionJointInterface

<?xml version="1.0" encoding="utf-8" ?>
<!-- This URDF was automatically created by SolidWorks to URDF Exporter! Originally created by Stephen Brawner (brawner@gmail.com) 
     Commit Version: 1.5.1-0-g916b5db  Build Version: 1.5.7152.31018
     For more information, please see http://wiki.ros.org/sw_urdf_exporter -->
<robot name="c800_description">
    <link name="dummy" />
    <joint name="dummy_joint" type="fixed">
        <parent link="dummy" />
        <child link="base_link" />
    </joint>
    <joint name="bottom_joint" type="fixed">
        <origin xyz="0 0 0" rpy="0 0 0" />
        <parent link="base_link" />
        <child link="bottom_link" />
    </joint>
    <link name="bottom_link">
        <visual>
            <origin xyz=" 0 0 -0.01" rpy="0 0 0" />
            <geometry>
                <box size="0.2 0.2 0.02" />
            </geometry>
            <material name="Brown" />
        </visual>
        <collision>
            <origin xyz=" 0 0 -0.01" rpy="0 0 0" />
            <geometry>
                <box size="0.2 0.2 0.02" />
            </geometry>
        </collision>
        
<inertial>
            <mass value="500" />
            <inertia ixx="1.0" ixy="0.0" ixz="0.0" iyy="0.5" iyz="0.0" izz="1.0" />
        </inertial>

    </link>
    <link name="base_link">
        
<inertial>
            <origin xyz="5.1159E-06 -0.00045852 0.01511" rpy="0 0 0" />
            <mass value="0.47731" />
            <inertia ixx="0.00060819" ixy="-1.4211E-07" ixz="2.912E-08" iyy="0.00062131" iyz="-2.5797E-06" izz="0.0011481" />
        </inertial>

        <visual>
            <origin xyz="0 0 0" rpy="0 0 0" />
            <geometry>
                <mesh filename="package://c800_description/meshes/base_link.STL" />
            </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://c800_description/meshes/base_link.STL" />
            </geometry>
        </collision>
    </link>
    <link name="link_1">
        
<inertial>
            <origin xyz="0.009995 0.00010952 -0.088076" rpy="0 0 0" />
            <mass value="1.8893" />
            <inertia ixx="0.0041014" ixy="-5.8451E-06" ixz="0.0003739" iyy="0.0046287" iyz="4.1148E-06" izz="0.0033533" />
        </inertial>

        <visual>
            <origin xyz="0 0 0" rpy="0 0 0" />
            <geometry>
                <mesh filename="package://c800_description/meshes/link_1.STL" />
            </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://c800_description/meshes/link_1.STL" />
            </geometry>
        </collision>
    </link>
    <joint name="joint_1" type="revolute">
        <origin xyz="0 0 0.0317" rpy="3.1416 0 -1.5598" />
        <parent link="base_link" />
        <child link="link_1" />
        <axis xyz="0 0 1" />
        <limit lower="-3" upper="3" effort="100" velocity="3" />
    </joint>
    <link name="link_2">
        
<inertial>
            <origin xyz="0.087798 0.00096966 -0.1742" rpy="0 0 0" />
            <mass value="5.0587" />
            <inertia ixx="0.012152" ixy="-2.8164E-05" ixz="-3.968E-10" iyy="0.014702" iyz="-4.2598E-08" izz="0.0095763" />
        </inertial>

        <visual>
            <origin xyz="0 0 0" rpy="0 0 0" />
            <geometry>
                <mesh filename="package://c800_description/meshes/link_2.STL" />
            </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://c800_description/meshes/link_2.STL" />
            </geometry>
        </collision>
    </link>
    <joint name="joint_2" type="revolute">
        <origin xyz="0.075695 0.00083599 -0.087" rpy="0 0 0" />
        <parent link="link_1" />
        <child link="link_2" />
        <axis xyz="0.99994 0.011043 0" />
        <limit lower="-3" upper="3" effort="100" velocity="3" />
    </joint>
    <link name="link_3">
        
<inertial>
            <origin xyz="-0.074461 -0.00081729 -0.18595" rpy="0 0 0" />
            <mass value="2.4785" />
            <inertia ixx="0.0066463" ixy="-2.7745E-06" ixz="-0.00025133" iyy="0.0069332" iyz="-2.9588E-06" izz="0.0024538" />
        </inertial>

        <visual>
            <origin xyz="0 0 0" rpy="0 0 0" />
            <geometry>
                <mesh filename="package://c800_description/meshes/link_3.STL" />
            </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://c800_description/meshes/link_3.STL" />
            </geometry>
        </collision>
    </link>
    <joint name="joint_3" type="revolute">
        <origin xyz="0 0 -0.3484" rpy="0 0 0" />
        <parent link="link_2" />
        <child link="link_3" />
        <axis xyz="0.99994 0.011043 0" />
        <limit lower="-3" upper="3" effort="100" velocity="3" />
    </joint>
    <link name="link_4">
        
<inertial>
            <origin xyz="0.03744 0.00041334 0.011039" rpy="0 0 0" />
            <mass value="0.69512" />
            <inertia ixx="0.0007079" ixy="-9.1282E-07" ixz="-1.3418E-11" iyy="0.00079063" iyz="-9.8306E-11" izz="0.00062854" />
        </inertial>

        <visual>
            <origin xyz="0 0 0" rpy="0 0 0" />
            <geometry>
                <mesh filename="package://c800_description/meshes/link_4.STL" />
            </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://c800_description/meshes/link_4.STL" />
            </geometry>
        </collision>
    </link>
    <joint name="joint_4" type="revolute">
        <origin xyz="-0.017899 -0.00019768 -0.3495" rpy="0 0 0" />
        <parent link="link_3" />
        <child link="link_4" />
        <axis xyz="-0.99994 -0.011043 0" />
        <limit lower="-3" upper="3" effort="100" velocity="3" />
    </joint>
    <link name="link_5">
        
<inertial>
            <origin xyz="-0.011486 -0.00012684 -0.045406" rpy="0 0 0" />
            <mass value="0.69038" />
            <inertia ixx="0.00062179" ixy="-1.8272E-06" ixz="1.9143E-11" iyy="0.00078721" iyz="5.7484E-12" izz="0.00070448" />
        </inertial>

        <visual>
            <origin xyz="0 0 0" rpy="0 0 0" />
            <geometry>
                <mesh filename="package://c800_description/meshes/link_5.STL" />
            </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://c800_description/meshes/link_5.STL" />
            </geometry>
        </collision>
    </link>
    <joint name="joint_5" type="revolute">
        <origin xyz="0.042397 0.00046824 -0.0501" rpy="0 0 0" />
        <parent link="link_4" />
        <child link="link_5" />
        <axis xyz="0 0 1" />
        <limit lower="-3" upper="3" effort="100" velocity="3" />
    </joint>
    <link name="link_6">
        
<inertial>
            <origin xyz="0.01497 0.00016533 -6.0527E-10" rpy="0 0 0" />
            <mass value="0.13891" />
            <inertia ixx="0.00011411" ixy="5.0377E-07" ixz="1.0257E-12" iyy="6.8505E-05" iyz="-1.0223E-10" izz="6.85E-05" />
        </inertial>

        <visual>
            <origin xyz="0 0 0" rpy="0 0 0" />
            <geometry>
                <mesh filename="package://c800_description/meshes/link_6.STL" />
            </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://c800_description/meshes/link_6.STL" />
            </geometry>
        </collision>
    </link>
    <joint name="joint_6" type="revolute">
        <origin xyz="0.050097 0.00055327 -0.0504" rpy="0 0 0" />
        <parent link="link_5" />
        <child link="link_6" />
        <axis xyz="1 0 0" />
        <limit lower="-3" upper="3" effort="100" velocity="3" />
    </joint>
    <link name="tool0" />
    <joint name="joint_tool0" type="fixed">
        <origin xyz="0.03328 0 0" rpy="0 0 0" />
        <parent link="link_6" />
        <child link="tool0" />
    </joint>
    
<transmission name="trans_joint_1">
        <type>transmission_interface/SimpleTransmission</type>
        <joint name="joint_1">
            <hardwareInterface>hardware_interface/PositionJointInterface</hardwareInterface>
        </joint>
        <actuator name="joint_1_motor">
            <hardwareInterface>hardware_interface/PositionJointInterface</hardwareInterface>
            <mechanicalReduction>1</mechanicalReduction>
        </actuator>
    </transmission>
    <transmission name="trans_joint_2">
        <type>transmission_interface/SimpleTransmission</type>
        <joint name="joint_2">
            <hardwareInterface>hardware_interface/PositionJointInterface</hardwareInterface>
        </joint>
        <actuator name="joint_2_motor">
            <hardwareInterface>hardware_interface/PositionJointInterface</hardwareInterface>
            <mechanicalReduction>1</mechanicalReduction>
        </actuator>
    </transmission>
    <transmission name="trans_joint_3">
        <type>transmission_interface/SimpleTransmission</type>
        <joint name="joint_3">
            <hardwareInterface>hardware_interface/PositionJointInterface</hardwareInterface>
        </joint>
        <actuator name="joint_3_motor">
            <hardwareInterface>hardware_interface/PositionJointInterface</hardwareInterface>
            <mechanicalReduction>1</mechanicalReduction>
        </actuator>
    </transmission>
    <transmission name="trans_joint_4">
        <type>transmission_interface/SimpleTransmission</type>
        <joint name="joint_4">
            <hardwareInterface>hardware_interface/PositionJointInterface</hardwareInterface>
        </joint>
        <actuator name="joint_4_motor">
            <hardwareInterface>hardware_interface/PositionJointInterface</hardwareInterface>
            <mechanicalReduction>1</mechanicalReduction>
        </actuator>
    </transmission>
    <transmission name="trans_joint_5">
        <type>transmission_interface/SimpleTransmission</type>
        <joint name="joint_5">
            <hardwareInterface>hardware_interface/PositionJointInterface</hardwareInterface>
        </joint>
        <actuator name="joint_5_motor">
            <hardwareInterface>hardware_interface/PositionJointInterface</hardwareInterface>
            <mechanicalReduction>1</mechanicalReduction>
        </actuator>
    </transmission>
    <transmission name="trans_joint_6">
        <type>transmission_interface/SimpleTransmission</type>
        <joint name="joint_6">
            <hardwareInterface>hardware_interface/PositionJointInterface</hardwareInterface>
        </joint>
        <actuator name="joint_6_motor">
            <hardwareInterface>hardware_interface/PositionJointInterface</hardwareInterface>
            <mechanicalReduction>1</mechanicalReduction>
        </actuator>
    </transmission>
    <gazebo>
        <plugin name="gazebo_ros_control" filename="libgazebo_ros_control.so">
            <robotNamespace>/</robotNamespace>
        </plugin>
    </gazebo>
</robot>

最终产生的URDF文件并没发生改变,因为之前的URDF文件就是完整的。

11.3D感知模块,没有不配置

 12.作者信息

13.创建文件夹,保存包

按照命名规范命名

 

 提示没有配置全,没有末端夹爪。

 配置结束。

14.检查urdf文件

check_urdf xxxx.urdf
urdf_to_graphiz mrobot_chassis.urdf

 

  • 3
    点赞
  • 8
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值