美文网首页
2018-01-05:Gazebo中运行universal ro

2018-01-05:Gazebo中运行universal ro

作者: ShapeYourself | 来源:发表于2018-01-05 23:19 被阅读0次

    操作过程如下:

    mkdir -p ~/Desktop/catkin_project/catkin_04/src
    cd ~/Desktop/catkin_project/catkin_04/src
    git clone https://github.com/ros-industrial/universal_robot.git
    cd ..
    catkin_make
    source devel/setup.bash
    roslaunch ur_gazebo ur10.launch
    

    最后启动Gazebo出现如下的警告:

    [ WARN] [1515161906.841343613, 0.156000000]: Deprecated syntax, please prepend 'hardware_interface/' to 'PositionJointInterface' within the <hardwareInterface> tag in joint 'shoulder_pan_joint'.
    [ WARN] [1515161906.842791658, 0.156000000]: Deprecated syntax, please prepend 'hardware_interface/' to 'PositionJointInterface' within the <hardwareInterface> tag in joint 'shoulder_lift_joint'.
    [ WARN] [1515161906.843854506, 0.156000000]: Deprecated syntax, please prepend 'hardware_interface/' to 'PositionJointInterface' within the <hardwareInterface> tag in joint 'elbow_joint'.
    [ WARN] [1515161906.844811837, 0.156000000]: Deprecated syntax, please prepend 'hardware_interface/' to 'PositionJointInterface' within the <hardwareInterface> tag in joint 'wrist_1_joint'.
    [ WARN] [1515161906.845638764, 0.156000000]: Deprecated syntax, please prepend 'hardware_interface/' to 'PositionJointInterface' within the <hardwareInterface> tag in joint 'wrist_2_joint'.
    [ WARN] [1515161906.846605148, 0.156000000]: Deprecated syntax, please prepend 'hardware_interface/' to 'PositionJointInterface' within the <hardwareInterface> tag in joint 'wrist_3_joint'.
    

    我们根据警告的提示,我们找到ur_description/urdf/ur.transmission.xacro文件中的如下标签:

          <joint name="${prefix}shoulder_pan_joint">
            <hardwareInterface>PositionJointInterface</hardwareInterface>
          </joint>
          <joint name="${prefix}shoulder_lift_joint">
            <hardwareInterface>PositionJointInterface</hardwareInterface>
          </joint>
          <joint name="${prefix}elbow_joint">
            <hardwareInterface>PositionJointInterface</hardwareInterface>
          </joint>
          <joint name="${prefix}wrist_1_joint">
            <hardwareInterface>PositionJointInterface</hardwareInterface>
          </joint>
          <joint name="${prefix}wrist_2_joint">
            <hardwareInterface>PositionJointInterface</hardwareInterface>
          </joint>
          <joint name="${prefix}wrist_3_joint">
            <hardwareInterface>PositionJointInterface</hardwareInterface>
          </joint>
    

    分别改为如下的形式:

         <joint name="${prefix}shoulder_pan_joint">
            <hardwareInterface>hardware_interface/PositionJointInterface</hardwareInterface>
          </joint>
          <joint name="${prefix}shoulder_lift_joint">
            <hardwareInterface>hardware_interface/PositionJointInterface</hardwareInterface>
          </joint>
          <joint name="${prefix}elbow_joint">
            <hardwareInterface>hardware_interface/PositionJointInterface</hardwareInterface>
          </joint>
          <joint name="${prefix}wrist_1_joint">
            <hardwareInterface>hardware_interface/PositionJointInterface</hardwareInterface>
          </joint>
          <joint name="${prefix}wrist_2_joint">
            <hardwareInterface>hardware_interface/PositionJointInterface</hardwareInterface>
          </joint>
          <joint name="${prefix}wrist_3_joint">
            <hardwareInterface>hardware_interface/PositionJointInterface</hardwareInterface>
          </joint>
    

    最后运行:

    roslaunch ur_gazebo ur10.launch
    

    警告消失,问题解决.

    相关文章

      网友评论

          本文标题:2018-01-05:Gazebo中运行universal ro

          本文链接:https://www.haomeiwen.com/subject/dedenxtx.html