UR机械臂学习(9):加入robotiq力传感器

01 安装过程

  • 1/ 下载robotiq功能包
    cd ur_ws/src
    git clone https://github.com/ros-industrial/robotiq.git
    
  • 2/ 修改ur3的描述文件
    • 首先,参考robotiq功能包中有关力传感器的部分

      cd  ~/ur_ws/src/robotiq/robotiq_ft_sensor/urdf
      gedit robotiq_ft300.urdf.xacro
      

      robotiq_ft300.urdf.xacro中有一段信息描述了怎样将sensor添加到机械臂的末端:

      <!-- Macro function to instanciate URDF model of the FT300 force-torque sensor with mounting plate
          Example use: 
          ```
              // Import this macro function
              <xacro:include filename="$(find robotiq_ft_sensor)/urdf/robotiq_ft300.urdf.xacro" />
              
              // Instanciate sensor instance and connect it to robot flange
              <xacro:robotiq_ft300 parent="robot_flange_link" prefix="">
                  <origin xyz="0 0 0" rpy="0 0 0"/> 
              </xacro:robotiq_ft300>
          ```
      -->
      
    • 接下来,我们将按照上面所描述的信息,添加到ur3的描述文件中

      打开ur3的描述文件ur3.urdf.xacro

      cd ~/ur_ws/src/fmauch_universal_robot/ur_description/urdf
      gedit  ur3.xacro  
      

      ur3.xacro中,添加如下语句

      <xacro:include filename="$(find robotiq_ft_sensor)/urdf/robotiq_ft300.urdf.xacro" />
      

      效果如图:

      在这里插入图片描述


      打开ur3的描述文件ur3_macro.xacro

      cd ~/ur_ws/src/fmauch_universal_robot/ur_description/urdf/inc
      gedit  ur3_macro.xacro 
      

      ur3_macro.xacro的末尾处,添加如下语句

      <xacro:robotiq_ft300 parent="${prefix}tool0" prefix="">
      	<origin xyz="0 0 0 " rpy="0 0 0"/>
      </xacro:robotiq_ft300>
      

      效果如图:
      在这里插入图片描述


      一些说明:

      如下图所示,在~/ur_ws/src/fmauch_universal_robot/ur_description/urdf/incur_macro.xacro文件中,ur机械臂暴露给最外面的link是${prefix}tool0

      在这里插入图片描述

      所以,我们只需要将ft sensor的宏定义的parent赋值为tool0即可

      在这里插入图片描述

02 启动

在这里插入图片描述

# 启动gazebo
# 注意是ur3_bringup.launch,而不是ur3.launch
roslaunch ur_gazebo ur3_bringup.launch

# 启动move it规划
roslaunch ur3_moveit_config ur3_moveit_planning_execution.launch sim:=true

# 启动rviz
# 注意后面要给出rviz_config的地址
roslaunch ur3_moveit_config moveit_rviz.launch rviz_config:=$(rospack find ur3_moveit_config)/launch/moveit.rviz

03 报错与解决

3.1 问题1 soem

Could not find a package configuration file provided by "soem" with any of the following names:

在这里插入图片描述

3.2 问题2

Could not find a package configuration file provided by "socketcan_interface" with any of the following names:

在这里插入图片描述

  • 解决

    sudo apt-get install ros-melodic-socketcan-interface
    

04 参考

下载robotiq的ros package
http://wiki.ros.org/robotiq

issues
https://github.com/ros-industrial/robotiq/issues

ScazLab的安装方法
https://scazlab.github.io/ur5e_setup_guide.html

评论 8
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值