Ubuntu18.04+ROSmelodic配置UR机器人

首先安装moveit

sudo apt-get install ros-melodic-moveit

创建工作空间及下载包

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

切换路径,检查依赖(超时换网)

cd ~/catkin_ws/
rosdep update
rosdep install --rosdistro melodic --ignore-src --from-paths src

编译

catkin_make

激活工作空间

source ~/catkin_ws/devel/setup.bash

为了驱动实际机械臂,需要用ur_modern_driver替换ur_driver,位于catkin_ws/src/universal_robot。然后重新编译

catkin_make

启动UR5

roslaunch ur5_moveit_config demo.launch

Ubuntu18.04+ROSmelodic配置UR机器人_第1张图片

若报错某某包配置文件缺失:
Could not find a package configuration file provided by “joy” with any of
the following names:
joyConfig.cmake
joy-config.cmake

sudo apt-get install ros-melodic-joy*

melodic换成你的ros版本
joy换成你缺少的包名
或者
在github上下载相对应的ros包:
https://github.com/ros-perception
把包放在你的src下即可,但是这个joy包好像没有找到在github的源码。

你可能感兴趣的:(moveit,UR机器人配置)