机械臂—ROS下UR10e+ft300+2f-140gripper ur机械臂配置夹爪及问题解决

目录

一、环境

  1. Ubuntu18.04;
  2. ROS melodic;

二、ROS melodic及Moveit的安装

看了很多博文,建议参考这位博主
其中可能ROS工作空间catkin_make的时候会报错,参考这位博主
Moveit的下载参考官网,如果ROS版本不一样,替换melodic为相应版本。
1、安装moveit
sudo apt install ros-melodic-moveit
2、配置环境
source /opt/ros/melodic/setup.bash
3、安装资源文件:
sudo apt-get install ros-melodic-moveit-resources

三、UR机械臂、Robtiq功能包下载

UR机械臂功能包下载

cd ~/catkin_ws/src/universal_robot
git clone -b melodic-devel https://github.com/ros-industrial/universal_robot.git

驱动下载(之后与真实机械臂通信时需要)

cd catkin_ws/src
git clone https://github.com/UniversalRobots/Universal_Robots_ROS_Driver.git ~/catkin_ws/src/Universal_Robots_ROS_Driver

gripper下载

cd catkin_ws/src
git clone https://github.com/ros-industrial/robotiq.git

编译

cd catkin_ws
sudo apt update -qq
rosdep update
rosdep install --from-paths src --ignore-src -y
catkin_make
source ~/catkin_ws/devel/setup.bash
---------------------------------------------------------------------------------
#若catkin_make报错:
git clone https://github.com/ros-industrial/ur_msgs.git src/ur_msgs
#用ur_msgs替换下载的ur机械臂universal_robot中的ur_msgs功能包,重新编译。
catkin_make

四、功能包介绍

1.UR机械臂功能包
在这里插入图片描述
Universal_Robots_ROS_Driver——刚下载的真实机械臂驱动功能包
ur_*_moveit_config——运动规划功能包,里面有ur的srdf,即语义描述文件(自定义的机器人位姿、自碰撞矩阵设定),关节限制(速度、加速度)文件。
ur_description——机器人的urdf文件,meshes(.stl)文件,关节限位文件等。
ur_gazebo——gazebo仿真能用到的launch文件。
ur_msgs——机器人通信的消息配置。

2.gripprt功能包
在这里插入图片描述
robotiq_ft_senor——是末端的力传感器,分为300和150,也就是最大测量力300N和150N。
其他的就是一些夹爪型号了吧,还有几个包还没看。

五、建立自己的包

为了方便以及避免直接修改功能包,建立自己的包。

mkdir my_ur10e
cd my_ur10e
catkin_create_pkg my_ur10e_description std_msg rospy roscpp
catkin_create_pkg my_ur10e_gazebo std_msg rospy roscpp
catkin_create_pkg my_ur10e_moveit_config std_msg rospy roscpp
cd ..
catkin_make
source ~/catkin_ws/devel/setup.bash

我是直接复制了需要的文件到对应的功能包里面。我用到的是ur10e,所以把ur_e_description中ur10e的部分复制到my_ur10e_description,其他也一样。文件中把对应的路径也改了下。
roslaunch my_ur10e_description view_ur10e.launch看到模型正常显示。
在这里插入图片描述

六、传感器和夹爪配置

首先是力传感器安装到机械臂末端,然后夹爪再安装到传感器上,都是fixed设置。
1.urdf修改
(1)查看一下力传感器的urdf文件,如下有一个使用例子,也就是include文件,然后再使用宏定义添加力传感器,设置parent和安装位置即可。
在这里插入图片描述
拉到文件最后,看到最后末端的link:name="${prefix}robotiq_ft_frame_id"

(2)接着查看夹爪的urdf文件,复杂一些,里面有四个文件,如下:
在这里插入图片描述
先打开第二个看了一眼,发现调用了第三个文件;打开第三个看,调用了第四个文件,transimission文件是用来描述关节和驱动器之间的关系,比如定义硬件接口,定义关节传动比和连杆之间的关系之类,继续看第二个文件,拉到最后可以看到如下,是夹爪的整体宏定义, name=“robotiq_arg2f_140” params=“prefix”。
在这里插入图片描述
(3)在description/urdf中新建一个ur10e_robot_ft_grriprt.urdf.xacro,或者直接复制ur10e的对应文件再改个名字就行,叫什么都行。
修改如下:
在这里插入图片描述
在这里插入图片描述
这里解释一下为什么传感器直接用,定义一下连接的parent link是tool0即可,而机械手还需要加个joint。仔细看传感器的urdf文件,可以看到它传参有个parent,然后呢可以看到它定义了一个joint就是用来连接传感器和parent的,所以说算是预留了一个未完全定义的joint给我们,输入parent就可以连接上去了。而相应的夹爪是没有的,所以得自己定义一个joint。
另外就是parent的确定,机械臂最后末端叫tool0,力传感器末端叫robotiq_ft_frame_id,夹爪首端叫robotiq_arg2f_base_link,首尾相连。
2.launch文件修改
路径在catkin_ws/src/my_ur10e/my_ur10e_description/launch/
原本吧每个机械臂都有两文件,一个是vew…一个是upload。
同样按照这格式创两个,名字还是view_ur10e_ft_gripper.launch,另外一个也差不多…upload.launch。
在这里插入图片描述
在这里插入图片描述
改完之后roslaunch my_ur10e_description view_ur10e_ft_gripper.launch看看,可以看到都装上去了,joint_state_publisher中也增加了finger_joint,总长0.7,调整可以看到夹爪闭合。在这里插入图片描述
完成,后续如果用于gazebo仿真,还会有相应的配置。

七、遇到的问题和解决

for the erro:Skipping virtual joint ‘fixed_base’ because its child frame ‘base_link’ does not match the URDF frame ‘world’

#$(find ur_moveit_config)/config/ur.srdf 中修改virtual_joint的child_link为world
<virtual_joint name=“fixed_base” type=“fixed” parent_frame=“world” child_link=“base_link” />
<virtual_joint name=“fixed_base” type=“fixed” parent_frame=“world” child_link=“world” />


为了不让机械臂碰到地面发生震动

#$(find ur_description)/urdf/ur_robot.urdf.xacro 中base_link修改高度为3,后面又改回来了


for the error:Exception while loading move_group capability ‘move_group/MoveGroupExecuteService’: MultiLibraryClassLoader: Could not create object of class type move_group::MoveGroupExecuteService as no factory exists for it. Make sure that the library exists and was explicitly loaded through MultiLibraryClassLoader::loadLibrary()

#$(find ur_moveit_config)//launch/move_group.launch 中MoveGroupExecuteService修改为MoveGroupExecuteTrajectoryAction

<param name="capabilities" value="move_group/MoveGroupCartesianPathService
			      move_group/MoveGroupExecuteService
			      move_group/MoveGroupKinematicsService
			      move_group/MoveGroupMoveAction
			      move_group/MoveGroupPickPlaceAction
			      move_group/MoveGroupPlanService
			      move_group/MoveGroupQueryPlannersService
			      move_group/MoveGroupStateValidationService
			      move_group/MoveGroupGetPlanningSceneService
			      move_group/ClearOctomapService
			      " />

for the erro:[ERROR] : Semantic description is not specified for the same robot as the URDF
#$(find ur_moveit_config)//launch/planning_context.launch 中ur10修改为ur10e,确认了下路径

  • 12
    点赞
  • 96
    收藏
    觉得还不错? 一键收藏
  • 11
    评论
要将Robotiq-2F85连接到UR5e机械臂的法兰盘,并使用ROS进行控制,可以按照以下流程进行操作: 1. 首先,确保你已经在UR5e机械臂的法兰盘上安装了Robotiq-2F85,并且的通信和电源已经连接好。 2. 确保你的机器人上已经安装了ROS,并且配置了适当的URDF(Unified Robot Description Format)文件,以描述机械臂的结构和关节信息。 3. 在ROS工作空间创建一个新的功能包,可以使用以下命令: ``` $ cd ~/catkin_ws/src $ catkin_create_pkg robotiq_ur5e_control rospy std_msgs ``` 4. 进入功能包目录,创建一个名为"scripts"的文件,并在该文件创建一个Python脚本文件,用于控制Robotiq-2F85。例如,可以创建一个名为"robotiq_ur5e_control.py"的文件。 5. 在Python脚本文件,导入必要的库和消息类型,例如rospy和std_msgs。然后,编写代码来控制的动作。你可以使用ROS提供的MoveIt库来控制UR5e机械臂的运动,并使用的控制消息来控制的动作。 6. 在功能包目录下创建一个名为"launch"的文件,并在该文件创建一个名为"robotiq_ur5e_control.launch"的launch文件。在launch文件配置节点和参数,以启动机器人控制节点和控制节点。 7. 编译ROS功能包,可以使用以下命令: ``` $ cd ~/catkin_ws $ catkin_make ``` 8. 启动ROS节点,可以使用以下命令: ``` $ roslaunch robotiq_ur5e_control robotiq_ur5e_control.launch ``` 9. 现在,你应该能够通过ROS功能包来控制UR5e机械臂法兰盘上的Robotiq-2F85了。你可以通过发布适当的消息到相关的ROS话题,来控制的动作和机械臂的运动。 请注意,以上步骤只是一个基本的指南。实际操作可能会有其他细节和配置,具体取决于你的机器人和环境。你可以查阅Robotiq、URROS的官方文档,以获取更详细的步骤和示例代码。

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论 11
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值