本文所讲的内容已经全都在Ubuntu 16.04+ROS Kinetic上实现,如有疑问,可以留言交流~
转载:http://blog.csdn.net/wangjiankun_ls/article/details/64441905
1.首先建立Catkin工作空间,下载所需资料:
- mkdir -p /tmp/ws/src
- cd /tmp/ws/src
- git clone https://github.com/ros-industrial/universal_robot.git
- cd /tmp/ws
- rosdep update
- rosdep install --from-paths src --ignore-src
- catkin_make
- source devel/setup.bash
2.运行Gazebo仿真,打开新的终端,运行:
- 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
3.运行真实机器人,关闭掉原来的终端,打开新的终端,运行:
- 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
4.有时步骤3会出问题,建议使用ur_modern_driver替换掉ur_driver,下载地址:https://github.com/ThomasTimm/ur_modern_driver
下载完之后,先使用catkin_make重新编译,ur_bringup.launch 选择ur_modern_driver目录下的,其他操作不变,一般问题就解决了。