- Configuration
- Installation
- Controlling UR10e through MoveIt with RViz
- Real-time UR10e following a tracked object
- Gripper Remote Control
- Real-time UR10e following & picking a tracked object
This repository was built to work with:
- UR10e manipulator (Universal Robot 10 e-series)
- Ubuntu 20.04.3 LTS
- ROS Noetic
For working on a real robot you need to install the externalcontrol-1.0.5.urcap which can be found inside the resources folder of this repository.
Using a USB pen drive, follow:
- Format the flash drive
- Download and save the externalcontrol-1.0.5.urcap on the USB pen drive
- Insert the USB drive on UR10e controller (the controller has two USB ports)
- Turn on the Teach Pendant
- Click on Menu (top right corner) + System + URCaps + Select External Control and press "+"
- Configure the remote host's IP to
192.168.56.1
-
Click on Menu (top right corner) + System + Network
-
Configure:
- Network method : Static Address
- IP address:
192.168.56.2
- Subnet mask:
255.255.255.0
- Default gateway:
192.168.56.2
-
Click on Apply
- Disable EtherNet/IP fieldbus:
Installation > Fieldbus > EtherNet/IP > Disable
First, it is required to have MoveIt installed in your system:
sudo apt install ros-noetic-moveit
Besides MoveIt, there are other packages that need to be installed:
sudo apt-get install ros-noetic-industrial-robot-status-interface
sudo apt-get install ros-noetic-scaled-controllers
sudo apt-get install ros-noetic-pass-through-controllers
sudo apt-get install ros-noetic-ur-client-library
sudo apt-get install ros-noetic-velocity-controllers
sudo apt-get install ros-noetic-force-torque-sensor-controller
sudo apt-get install socat
(Note: At this moment, if you do not have a catkin workspace, you should now create one, by following the steps described here)
After all these installations, on your catkin workspace you need to clone this repository, the ur_msgs
(http://wiki.ros.org/ur_msgs) package and the robotiq
(http://wiki.ros.org/robotiq) package:
cd catkin_ws/src
git clone https://github.com/afonsocastro/larcc_interface.git
git clone https://github.com/ros-industrial/ur_msgs.git
git clone https://github.com/ros-industrial/robotiq.git
There are several packages inside robotiq that do not work are are not needed so they can be removed.
rm -r robotiq/robotiq_2f_gripper_action_server robotiq/robotiq_2f_gripper_control robotiq/robotiq_3f_gripper_articulated_gazebo_plugins robotiq/robotiq_3f_gripper_control robotiq/robotiq_3f_gripper_joint_state_publisher robotiq/robotiq_3f_rviz robotiq/robotiq_ethercat
So that packages are able to import from each other, run the following:
echo "export PYTHONPATH=\$PYTHONPATH:~/catkin_ws/src/larcc_interface" >> ~/.bashrc
source ~/.bashrc
TENSOR FLOW install
pip install tensorflow==2.9.0
troubleshooting: in case protobuf version >=3.20:
pip install protobuf==3.19.*
Now compile your catkin workspace:
cd ~/catkin_ws
catkin_make
Finally, to establish the communication between the robot and the computer, it is required to connect an Ethernet cable from the UR10e controller to the computer. After you connect the cable, you need to configure the IPv4 like this:
Just need to follow these next 4 steps to remotely control the real UR10e robot, connected via the Ethernet cable to your computer.
-
roslaunch ur_robot_driver ur10e_bringup.launch robot_ip:=192.168.56.2
-
Run the external control program on the teach pendant:
Click on Program + URCaps + External Control + Press "play"
At this point, you should get the message "Robot connected to reverse interface. Ready to receive control commands." printed out on your terminal window.
roslaunch ur10e_moveit_config ur10e_moveit_planning_execution.launch
At this point, you should get the green message "You can start planning now!" printed out on your terminal window, just like this:
roslaunch ur10e_moveit_config moveit_rviz.launch config:=true
Now you can control the real robot, by simply moving the manipulator marker on RViz and then asking the robot to move to that goal (using the Motion Planning Panel). MoveIt will plan the trajetory.
By using ViSP RGB-D object tracking (see this repository) and MoveIt to remotely control the UR10e, it was developed this demonstration of a real-time followed object that is being tracked with one RGB-D camera (Intel RealSense D435):
In order to control the ROBOTIQ 2F-140 gripper from an external computer, it is required to:
- Turn on the robot (UR10e)
- Connect the TCP/IP communication between the robot and the computer
- Remove/Uninstall any ROBOTIQ URCap: remove 'Robotiq_Grippers' on UR10e Teach Pendant (Click on Menu (top right corner) + System + URCaps)
- Install the rs485-1.0.urcap. See the first 5 points of on-ur10e-controller.
Finally, for testing:
-
cd larcc_interface/gripper/src
-
python3 test_robotiq.py
The Python module for controlling Robotiq 2F-140 from an external PC can be found here.
On test_robotiq.py, you may have to change HOST ip address to UR10e.
Notes:
- UR10e can either be on Remote Control or in Local Control mode (does not make any difference).
- It is not required to launch any robot driver. The TCP/IP connection is enough, since the RS485 communication will be directly established between the gripper and the external PC
- It is necessary rs485 URcap. That is daemon for communicate between UR10e's rs485 network and external pc via tcp (port 54321). RobotiqHand module use this mechanism. So you must activate rs485 URCap on UR10e. And, If you activate Robotiq_Gripper URCap on UR10e, that URCap always use inner rs485 network without exclusive. This means external rs485 communication make conflict communication contents. So if you want to control 2f-140 via rs485 from external pc, you must deactivate Robotiq_Gripper URCap on UR10e