ROS->UR真实机械臂动起来(ur_modern_driver)

Installation

The following instructions assume that a Catkin workspace has been created at $HOME/catkin_ws and that the source space is at $HOME/catkin_ws/src. Update paths appropriately if they are different on the build machine.

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

切换行号显示

   1 cd /path/to/catkin_ws/src
   2 
   3 # retrieve the sources (replace '$DISTRO' with the ROS version you are using)
   4 git clone -b $DISTRO-devel https://github.com/ros-industrial/ur_modern_driver.git
    //如果indigo的话需要手动下载到src文件夹下
   5 
   6 cd /path/to/catkin_ws
   7 
   8 # checking dependencies (replace '$DISTRO' with the ROS version you are using)
   9 rosdep update
  10 rosdep install --from-paths src --ignore-src --rosdistro $DISTRO
  11 
  12 # building
  13 catkin build
  //indigo版本的话需要catkin_make
  14 
  15 # source this workspace (careful when also sourcing others)
  16 source /path/to/catkin_ws/devel/setup.bash

The packages can now be used as regular ROS packages.

Usage

if you would like to run this package to connect to the hardware, you only need to run the following launch file.

roslaunch ur_modern_driver urXX_bringup.launch robot_ip:=ROBOT_IP_ADDRESS

//ROBOT_IP_ADDRESS为真实UR控制器IP地址,装ROS的主机要和UR控制器IP在同一网段

 

Where ROBOT_IP_ADDRESS is your UR arm's IP and XX is '5' or '10' depending on your robot. The above launch file makes calls to both roscore and the launch file to the urXX_description so that ROS's parameter server has information on your robot arm. If you do not have your ur_description installed please do so via:

 

sudo apt install ros-<distro>-ur-description

或者全部安装sudo apt-get install ros-kinetic-ur*

Where is the ROS distribution your machine is running on. You may want to run MoveIt to plan and execute actions on the arm. You can do so by simply entering the following commands after launching ur_modern_driver:

roslaunch urXX_moveit_config ur5_moveit_planning_executing.launch
roslaunch urXX_moveit_config moveit_rviz.launch config:=true

 

在moveit中拖动,单击plan,如果plan可以到达指定位置,则电机execute,则机械臂就会运动。

 

同类文章:

https://blog.csdn.net/fcc_bd_stars/article/details/78150729

UR5机械臂--ROS系统通信建立与实时控制

  • 0
    点赞
  • 2
    收藏
    觉得还不错? 一键收藏
  • 1
    评论
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值