Some examples which use moveit!
to manipulate UR5 (robot arm)
mkdir -p ws_moveit/src
- universal_robots
ROS-Industrial support for Univesal Robots manipulators.
To enable networking, use the UR’s teach-pendant to navigate to the Setup Robot -> Setup Network Menu (shown in the below attachment).
Note: In order to test the communication between computer and robot arm, you can use this command:
ping IP_OF_THE_ROBOT
1). Install the package: ROS_Industrial
roslaunch ur_description ur5_upload.launch
roslaunch ur_description test.launch
You should see an rviz window showing the UR5 in a lying-down position, and a separate window where the joint values may be manually specified. Note that this is not a simulation, just a visualization of the arm model. To simulate UR5 or UR10, see ur_gazebo.
1). Install package ur_modern_driver
catkin_make
roslaunch ur_modern_driver ur5_bringup.launch robot_ip:=IP_OF_THE_ROBOT [reverse_port:=REVERSE_PORT]
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
1). For setting up the MoveIt! nodes to allow motion planning run (assumes the connection is already established above):
roslaunch ur5_moveit_config ur5_moveit_planning_execution.launch
roslaunch ur5_moveit_config moveit_rviz.launch config:=true
Note that as MoveIt! seems to have difficulties with finding plans for the UR with full joint limits [-2pi, 2pi], there is a joint_limited version using joint limits restricted to [-pi,pi]. In order to use this joint limited version, simply use the launch file arguments 'limited', i.e.:
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
catkin_create_pkg [package name] ...
cd ~/ws_moveit/src
rosdep install -y --from-paths . --ignore-src --rosdistro kinetic
cd ~/ws_moveit
catkin config --extend /opt/ros/${ROS_DISTRO} --cmake-args -DCMAKE_BUILD_TYPE=Release
catkin build
source ~/ws_moveit/devel/setup.bash
# echo 'source ~/ws_moveit/devel/setup.bash' >> ~/.bashrc