首先安装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