UR3e 真实机械臂与Ros调试记录

目录

1、准备

2、UR-E Ros驱动包的编译

3  在连接真实UR前 示教器安装External Control 功能

3.1 按照Installing a URCap on a e-Series robot步骤安装External Control

3.2 Extract calibration information

3.3 ROS控制真实UR3e机械臂

4 常见问题

点击示教器运行后出现 "The connection to the remote PC could not be established"

5 链接


1、准备

https://github.com/ros-industrial/universal_robot/tree/melodic-devel

https://github.com/UniversalRobots/Universal_Robots_ROS_Driver

ROS 版本 melodic

Ubuntu 18.04

按照官网说明下载ROS 包合ROS-E系列的驱动,与UR 的不同E系列需要Universal_Robots_ROS_Driver

一定要找对安装包

2、UR-E Ros驱动包的编译

如下时官网给出的步骤进行,下载程序速度慢的时候可以尝试手机热点进行下载速度会快点。

install dependencies这一步,我没有更新成功后来看好像也不太影响。

# source global ros
$ source /opt/ros/<your_ros_version>/setup.bash

# create a catkin workspace
$ mkdir -p catkin_ws/src && cd catkin_ws

# clone the driver
$ git clone https://github.com/UniversalRobots/Universal_Robots_ROS_Driver.git src/Universal_Robots_ROS_Driver

# clone fork of the description. This is currently necessary, until the changes are merged upstream.
$ git clone -b calibration_devel https://github.com/fmauch/universal_robot.git src/fmauch_universal_robot

# install dependencies
$ sudo apt update -qq
$ rosdep update
$ rosdep install --from-paths src --ignore-src -y

# build the workspace
$ catkin_make

# activate the workspace (ie: source it)
$ source devel/setup.bash

编译会遇到 Could NOT find ur_msgs (missing: ur_msgs_DIR),需要讲下载好的ur_msgs放入到fmauch_universal_robot文件夹内;ur_msgs下载地址忘记了(ur_msgs文件下载地址     git clone https://github.com/ros-industrial/ur_msgs.git src/ur_msgs)重新编译成功

 

3  在连接真实UR前 示教器安装External Control 功能

3.1 按照Installing a URCap on a e-Series robot步骤安装External Control

所在位置 ......./ur_ws/src/Universal_Robots_ROS_Driver/ur_robot_driver/resources 文件夹中找到拷贝到u盘当中,方便后面安装。

具体操作参照 下方连接进行

https://github.com/UniversalRobots/Universal_Robots_ROS_Driver/blob/master/ur_robot_driver/doc/install_urcap_e_series.md

a. 安装URCAP

 b.  设置Host IP (可以修改为自己ROS IP 比如192.168.1.3 ),ur3e示教器IP 设置为192.168.1.2

c. 切换到编写程序地方,新建一个程序插入External Control;暂时告一段落后面有再用到

 

3.2 Extract calibration information

校验这步骤暂时没有用到,可能后面会有用

roslaunch ur_calibration calibration_correction.launch robot_ip:=192.168.56.2 target_filename:="${HOME}/my_robot_calibration.yaml"

在${HOME} 路径下生成校验文件

3.3 ROS控制真实UR3e机械臂

官网介绍两种,一种是 rqt_joint_trajectory_controller GUI程序进行关节控制。另一种是使用moveit控制,下面分别介绍

第一种 首先安装 sudo apt install ros-melodic-rqt-joint-trajectory-controller

终端执行  rosrun rqt_joint_trajectory_controller rqt_joint_trajectory_controller

1. 在示教器打开运行ExternalControl 程序,点击play;

前提先运行ROS driver ,否则会报错误

roslaunch ur_robot_driver ur3e_bringup.launch robot_ip:=192.168.1.2

出现 Robot connected to reverse interface. Ready to receive control commands.代表连接成功

可以使用简单的 rqt_joint_trajectory_controller GUI程序控制执行 rosrun rqt_joint_trajectory_controller rqt_joint_trajectory_controller 打开如下图所示的交互界面,此时可以拖动6个关节,控制UR3e进行运动了。

第二种使用moveit rviz进行UR3e的控制

启动顺序和步骤(分别启动三个终端)

1)  roslaunch ur_robot_driver ur3e_bringup.launch robot_ip:=192.168.1.2

启动完成后,在示教器上面点击开始运行程序(此处为上面 介绍External Control 设置好的地方)

Robot connected to reverse interface. Ready to receive control commands.代表连接成功

2)  roslaunch ur3e_moveit_config ur3e_moveit_planning_execution.launch limited:=true

3)  roslaunch ur3e_moveit_config moveit_rviz.launch config:=true

打开rviz后界面会出现下面显示,需要修改一些地方

 修改Fixed Frame 为base,添加MotionPlanning

添加MotionPlanning,后出现ur3e的模型图中位置与实际位置一致;但此时不能拖动末端移动机械臂,还需设置规划组 planning Group,选择箭头所示地方。可以看到出现拖拽的球

 注意调整运动的速度和加速度以免调试运动太快发生碰撞;

选取拖动到一个终点位置  点击plan  然后 Execute,顺利的话已经看到ur3e开始运动了

其中也会遇到,plan成功,执行失败的情况;

原因未知待更新。。。

使用Gazebo仿真ur3e

 也可以使用Gazebo模拟ur在rviz种进行控制,分别打开三个终端运行source ./devel/setup.bash分别执行下面命令启动仿真模型

  1. roslaunch ur_gazebo ur3e_bringup.launch
  2. roslaunch ur3e_moveit_config ur3e_moveit_planning_execution.launch sim:=true
  3. roslaunch ur3e_moveit_config moveit_rviz.launch config:=true

4 常见问题

点击示教器运行后出现 "The connection to the remote PC could not be established"

1、Make sure, the IP address setup is correct, as described in the setup guides (CB3 robots, e-Series robots)

2、 This error can also show up, when the ROS driver is not running.

5 链接

https://blog.csdn.net/bornfree5511/article/details/106546516

 https://github.com/UniversalRobots/Universal_Robots_ROS_Driver/blob/master/ur_robot_driver/doc/initial_setup_images/es_07_installation_excontrol.png


 

6 错误

[ WARN] [1630152749.357689851]: Connection attempt on port 50001 while maximum number of clients (1) is already connected. Closing connection.
[ INFO] [1630152749.358120716]: Connection to reverse interface dropped.
[ERROR] [1630153862.054236766]: Can't accept new action goals. Controller is not running.
[ERROR] [1630153939.828227417]: Can't accept new action goals. Controller is not running.
[ERROR] [1630154020.694913392]: Can't accept new action goals. Controller is not running.

评论 5
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值