ROS+UR机械臂+Moveit+ 仿真与实体机械臂的使用+realsense相机+eye_handeye手眼标定(亲测有效)上

2023-05-16

Universal Robots(优傲机器人)公司是一家引领协作机器人全新细分市场的先驱企业,该公司成立于2005年,关注机器人的用户可操作性和灵活度,总部位于丹麦的欧登塞市,主要的机器人产品有:UR3、UR5和UR10,分别针对不同的负载级别。
Universal Robots早在2009年便推出了第一款协作机器人——UR5,自重18公斤,负载高达5公斤,工作半径85cm,不仅颠覆了人们对于传统工业机器人的认识,还自此定义了“协作机器人”的真正意义。除了安全度高、无需安全围栏等特点外,协作机器人还应该具备编程简单和灵活度高等特点,才能实现真正的人机和谐共事。

2015年3月推出的UR3是现今市场上最灵活轻便、并且可与工人一起肩并肩工作的台式机器人。它自重仅为11公斤,但是有效负载却高达3公斤,所有腕关节均可360度旋转,而末端关节可作无限旋转。UR 10的有效负载为10公斤,工作半径130cm。三款机器人均以编程的简易性、高度灵活性以及与人一起工作的安全可靠性而享誉业内。

一:安装ROS机器人操作系统

二:建立ros工作区

几个参考的网址(1) https://github.com/ros-industrial/universal_robot universal_robot
(2) https://github.com/ros-industrial/ur_modern_driver ur_modern_driver
installation
在此存储库中安装软件包有两种不同的方法。以下各节详细介绍了如何使用二进制发行版安装包,以及如何在Catkin工作区中从源代码构建包。
2.1方法以源码安装UR支持包
ROS中同样集成了Universal Robots机器人的功能包,使用如下命令即可安装,其中包含UR3、UR5、UR10三款机器人的相关功能:
sudo apt-get install ros-kinetic-universal-robots
(随不同的版本kinetic可以改变replace $ROS_DISTRO with hydro, indigo or kinetic, depending on which ROS version you have installed.

)
2.2方法二以源码的方式安装-建立ros_ur工作空间

In all other cases the packages will have to be build from sources in a Catkin workspace:

(1)cd $HOME/catkin_ws/src

#retrieve the sources (replace ‘$ROS_DISTRO’ with the ROS version you are using)
(2)git clone -b $ROS_DISTRO-devel https://github.com/ros-industrial/universal_robot.git

(3)cd $HOME/catkin_ws

#checking dependencies (again: replace ‘$ROS_DISTRO’ with the ROS version you are using)
(4)rosdep update
(5)rosdep install --rosdistro $ROS_DISTRO --ignore-src --from-paths src

#building
(6)catkin_make

#activate this workspace
(7)source $HOME/catkin_ws/devel/setup.bash
**(8)**在第六步前由于版本的原因需要更改universal_robot github的ur_driver驱动.将ur_modern_driver github下的驱动下在功能包下.然后重新编译…
在编译中会出现错误 参考链接 csdn链接描述 github链接描述
具体为/home/xxx/catkin_ws/src/ur_modern_driver/src/ur_hardware_interface.cpp:180:22: error: ‘const struct hardware_interface::ControllerInfo’ has no member named ‘hardware_interface’

将src/ur_hardware_interface.cpp中的

controller_it->hardware_interface (大概12处)
全部改为

controller_it->type
参考链接

三 运行真正的机器人UR

首先上命令行
真实UR
roslaunch ur_bringup ur5_bringup.launch robot_ip:=IP_OF_THE_ROBOT [reverse_port:=REVERSE_PORT]
roslaunch ur5_moveit_config ur5_moveit_planning_execution.launch
roslaunch ur5_moveit_config moveit_rviz.launch config:=true

真实带有关节限制的UR
启动驱动
roslaunch ur_bringup ur5_bringup.launch limited:=true robot_ip:=IP_OF_THE_ROBOT [reverse_port:=REVERSE_PORT]
启动moveit规划
roslaunch ur5_moveit_config ur5_moveit_planning_execution.launch limited:=true
启动rviz可视化界面
roslaunch ur5_moveit_config moveit_rviz.launch config:=true

要启动真正的机器人,请运行:
roslaunch ur_bringup ur5_bringup.launch robot_ip:=IP_OF_THE_ROBOT [reverse_port:=REVERSE_PORT]

MoveIt! with real Hardware
此外,您还可以使用MoveIt!控制机器人。
有它!两个机器人的配置包。
用于设置MoveIt!允许运行运动规划的节点:
roslaunch ur5_moveit_config ur5_moveit_planning_execution.launch
用于使用包含MoveIt的配置启动RViz!运动规划插件运行:
roslaunch ur5_moveit_config moveit_rviz.launch config:=true

NOTE:
As MoveIt!!似乎很难找到具有所有关节限制[-2pi,2pi]的UR路径规划,有一个联合限制版本使用限制为[-pi,pi]的联合限制。要使用此联合受限版本,只需使用启动文件参数“limited”,即:
roslaunch ur_bringup ur5_bringup.launch limited:=true robot_ip:=IP_OF_THE_ROBOT [reverse_port:=REVERSE_PORT]

roslaunch ur5_moveit_config ur5_moveit_planning_execution.launch limited:=true

roslaunch ur5_moveit_config moveit_rviz.launch config:=true

三Gazebo Rviz 中的UR机械臂仿真

首先上命令行

在gazebo中的仿真UR
启动gazebo中的UR
roslaunch ur_gazebo ur5.launch
启动moveit控制
roslaunch ur5_moveit_config ur5_moveit_planning_execution.launch sim:=true
启动rviz可视化
roslaunch ur5_moveit_config moveit_rviz.launch config:=true

带有关节限制的,在gazebo中的仿真UR

roslaunch ur_gazebo ur5.launch limited:=true
roslaunch ur5_moveit_config ur5_moveit_planning_execution.launch sim:=true limited:=true
roslaunch ur5_moveit_config moveit_rviz.launch config:=true

查看链接ros wiki
Usage with Gazebo Simulation
There are launch files available to bringup a simulated robot - either UR5 or UR10.
In the following the commands for the UR5 are given. For the UR10, simply replace the prefix accordingly.

Don’t forget to source the correct setup shell files and use a new terminal for each command!

To bring up the simulated robot in Gazebo, run:

roslaunch ur_gazebo ur5.launch

MoveIt! with a simulated robot
Again, you can use MoveIt! to control the simulated robot.

For setting up the MoveIt! nodes to allow motion planning run:

roslaunch ur5_moveit_config ur5_moveit_planning_execution.launch sim:=true

For starting up RViz with a configuration including the MoveIt! Motion Planning plugin run:

roslaunch ur5_moveit_config moveit_rviz.launch config:=true

NOTE:
As MoveIt! seems to have difficulties with finding plans for the UR with full joint limits [-2pi, 2pi], there is a joint_limited version using joint limits restricted to [-pi,pi]. In order to use this joint limited version, simply use the launch file arguments ‘limited’, i.e.:

roslaunch ur_gazebo ur5.launch limited:=true

roslaunch ur5_moveit_config ur5_moveit_planning_execution.launch sim:=true limited:=true

roslaunch ur5_moveit_config moveit_rviz.launch config:=true

使用以下命令启动UR5机器人的gazebo仿真环境:
$ roslaunch ur_gazebo ur5.launch
查看当前系统中的话题列表。

在这里插入图片描述
follow_joint_trajectory是MoveIt!最终规划发布的action消息,由机器人控制器端接收该消息后控制机器人完成运动。从上边的话题列表中,可以找到follow_joint_trajectory,由仿真机器人的控制器插件订阅。
打开启动的ur5.launch文件,可以看到以下代码段:

  <!-- start this controller -->
  <rosparam file="$(find ur_gazebo)/controller/arm_controller_ur5.yaml" command="load"/>
  <node name="arm_controller_spawner" pkg="controller_manager" type="controller_manager" args="spawn arm_controller" respawn="false" output="screen"/>

控制器管理节点controller_manager启动了一个arm_controller插件,该插件的配置可以查看arm_controller_ur5.yaml文件:

arm_controller:
 type:position_controllers/JointTrajectoryController
 joints:
    -shoulder_pan_joint
    -shoulder_lift_joint
    -elbow_joint
    -wrist_1_joint
    -wrist_2_joint
    - wrist_3_joint
constraints:
    goal_time: 0.6
    stopped_velocity_tolerance: 0.05
    shoulder_pan_joint: {trajectory: 0.1, goal: 0.1}
    shoulder_lift_joint: {trajectory: 0.1, goal: 0.1}
    elbow_joint: {trajectory: 0.1, goal: 0.1}
    wrist_1_joint: {trajectory: 0.1, goal: 0.1}
    wrist_2_joint: {trajectory: 0.1, goal: 0.1}
    wrist_3_joint: {trajectory: 0.1, goal: 0.1}
stop_trajectory_duration: 0.5
state_publish_rate:  25
action_monitor_rate: 10

从上边的配置信息中可以看到,arm_controller是一个JointTrajectory类型的控制器,接收follow_joint_trajectory中的轨迹信息后,完成机器人的运动控制。

使用MoveIt!控制UR机器人
ROS中类似于UR5这样的机械臂控制当然离不开MoveIt!,接下来我们就使用MoveIt!实现对gazebo中UR5的控制。

UR5的控制需要通过follow_joint_trajectory这个action接口实现,这就需要在MoveIt!端配置一个控制器插件,实现该接口的功能。该插件的配置在ur5_moveit_config中已经实现,可以查看ur5_moveit_config功能包中的controllers.yaml文件:

controller_list:
  - name: ""
    action_ns: follow_joint_trajectory
    type: FollowJointTrajectory
    joints:
      - shoulder_pan_joint
      - shoulder_lift_joint
      - elbow_joint
      - wrist_1_joint
      - wrist_2_joint
      - wrist_3_joint

所以我们并不需要进行任何修改,使用如下命令启动MoveIt!和rviz,启动过程会包含所需要的控制器插件:

$ roslaunch ur5_moveit_config ur5_moveit_planning_execution.launch sim:=true
$ roslaunch ur5_moveit_config moveit_rviz.launch config:=true

realsense相机和 手眼标定
标定链接:https://blog.csdn.net/weixin_43735353/article/details/106128655

本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)

ROS+UR机械臂+Moveit+ 仿真与实体机械臂的使用+realsense相机+eye_handeye手眼标定(亲测有效)上 的相关文章

随机推荐

  • [四旋翼无人机PID仿真(一)

    64 四旋翼无人机串级PID仿真 四旋翼无人机的数学模型的建立 xff1a 在建立模型的过程中 xff0c 采用了欧拉角来进行数学模型的建立 首先进行无人机结构以及飞行原理的分析 xff0c 然后进行系统建模 xff0c 在建模的过程中 x
  • Django查询、删除、更新数据

    查询数据 查询无疑是数据库表中使用频率最高的操作 table object get 方法用于从数据库表中取得一条匹配的结果 xff0c 返回一个对象 xff0c 如果记录不存在的话 xff0c 那么它会报DoesNotExist类型错误 通
  • static 静态方法可以直接调用,不用创建对象

    static 静态方法可以直接调用 xff0c 不用创建对象
  • Java歌手评分系统

    有五个评委 xff0c 对一个歌手唱歌打分 xff0c 最终得分要求去掉最高分去掉最低分 xff0c 求平均分 注意要求的格式为 xff1a 输入第1个评委给分 97 1 输入第2个评委给分 89 2 输入第3个评委给分 88 6 输入第4
  • python3环境下使用cv_bridge

    环境 ubuntu18 04 ros melodic 由于ros自带的python版本是2 7 系统中的cv bridge是用python2编译的 xff0c 如果在python3环境中使用cv bridge xff0c 会报以下错误 xf
  • 运行VINS-MONO报的错

    刚刚安装完环境 xff0c 已经可以跑通Euroc数据集 xff0c 回忆一下值得记下来的注意事项 环境配置 我的电脑 xff1a Ubuntu18 04 ROS melodic Opencv3 4 3 首先 xff1a GitHub上的代
  • TX2安装realsense SDK和librealsense

    官网https github com IntelRealSense librealsense安装很简单 xff0c 一定要对应好SDK与ros包 realsense固件的版本 https github com IntelRealSense
  • VINS-Fusion轨迹评估

    代码轨迹输出修改 visualization cpp VINS Fusion master vins estimator src utility visualization cpp的150行左右 xff1a span class token
  • antd4中Form组件initialValues设置初始值无效,使用setFieldsValue动态赋值,getFieldsValus动态获取值

    首先说明initialValues这个属性 xff0c 这个属性antd官方给的是设置Form组件初始值 xff0c 但是有个问题如果值从后端请求那么initialValues可能会设置不上 xff0c 如果说用匿名组件的话 xff0c 修
  • 一个存放论文、笔记等的github仓库

    link xff1a PaperNote如果好用 xff0c 请给个star哦
  • 关于C++ Overload、Override、hide的一些总结

    一 override和overload区别 当需要一些相同的函数名接受不同的参数实现不同的功能时 xff0c 可以是运用函数重载来实现 但是 xff0c 函数的重载必须要在同一个作用域内重载 xff0c 才叫做重载 在不同作用域的两个同名函
  • C++多态的个人总结

    多态 多态分为运行时多态和编译期多态 xff0c 也被称作动态绑定和静态绑定或者晚绑定和早绑定 一 编译期多态 编译期多态主要是通过函数重载 xff0c 运算符重载还有模板函数 xff0c 模板类来是实现的 函数重载和运算符重载 xff0c
  • 嵌入式linux截图工具gsnap移植到OK6410 TX2416开发板

    交叉编译器版本 xff1a arm linux gcc 4 3 2 操作系统平台 xff1a Ubuntu 11 04 开发板平台 xff1a Tx2416 OK6410开发板 需要以下两个源文件 jpegsrc v6b tar gz gs
  • C++四种类型转换运算符的个人总结

    在这四种类型转换符包括static cast dynamic cast reinterpret cast const cast其中使用比较多的是dynamic cast和static cast 我们就从这两种类型转换符开始谈起 一 stat
  • 什么是系统调用?

    01 系统调用是什么 系统内核通过包装一些能够实现特定功能的特殊硬件指令和硬件状态 xff0c 即为内核函数 xff0c 通过一组称为系统调用 xff08 system call 的接口呈现给用户 xff0c 为系统调用而封装出来的API也
  • js中函数内部可以访问外部的变量

  • 视觉SLAM——小觅相机实测vins-mono步骤

    文章目录 step1 相机对应驱动 ubuntu SDK源码安装step2 相机测试 标定参数获取step3 安装vins并建立启动文件step4 开启相机节点并运行vins 使用的是双目深度板小觅相机 xff0c 只需要使用相机左摄像头和
  • ROS自定义消息类型 发布与订阅

    1 自定义消息类型与编译 1 在功能包里面创建一个msg文件夹 添加文档 文档名字为生成的头文件名和消息类型名 功能包名为消息类型的作用域 在msg文件夹下创建一个Person msg文件 xff0c 将下列代码复制进去 xff1a str
  • ROS的launch文件创建

    1 使用launch文件 Launch文件是ROS提供的 xff0c 可以同时运行多个nodes的文件 Launch文件以一种特殊的XML格式编写 xff0c 在ROS packages中使用广泛 创建launch功能包 首先在工作空间sr
  • ROS+UR机械臂+Moveit+ 仿真与实体机械臂的使用+realsense相机+eye_handeye手眼标定(亲测有效)上

    Universal Robots xff08 优傲机器人 xff09 公司是一家引领协作机器人全新细分市场的先驱企业 xff0c 该公司成立于2005年 xff0c 关注机器人的用户可操作性和灵活度 xff0c 总部位于丹麦的欧登塞市 xf