参考资料:https://www.youtube.com/watch?v=j6bBxfD_bYs
1. 下载ROS-Industrial universal robot meta-package
cd ~/catkin_ws/src
git clone https://github.com/ros-industrial/universal_robot.git
cd ~/catkin_ws
catkin_make
2. 启动Gazebo
cd ~/catkin_ws/src/universal_robot/ur_gazebo/launch
roslaunch ur10.launch
此时Gazebo将启动,并且能够看到ur10机械臂
3. 配置MoveIt!
roslaunch moveit_setup_assistant setup_assistant.launch
第一个标签下面需要选择机械臂的urdf文件,注意/catkin_ws/src/universal_robot/ur_description/urdf/文件夹中只有xacro文件,因此先使用xacro命令将ur10.urdf.xacro转换为静态urdf文件。
cd ~/catkin_ws/src/universal_robot/ur_description/urdf/
rosrun xacro xacro.py ur10.urdf.xacro > ur10