This How to is written by Thomas van der Sluijs.
In order to integrate the UP Board with the Universal Robot, in this case the UR5, the following will be needed:
- UP Board
- Ethernet switch
- Ethernet cables
- Laptop
- Universal Robot
The main reason behind using a UP board with the universal robot is so the users latop can replaced.
The UP board can replace your laptop as a more powerful alternative to a Raspberry Pi, managing large scripts and tasks requiring intensive computing, such as machine learning or vision processing, without the need for a large computer. It is also compact enough to fit inside a small electrical box for a clean setup…
Installing and setting up Ubuntu on the UP Board
To access the GPIO pins, a special kernel is needed. As of now, the latest compatible version is Ubuntu 20.04, which you can download and install by following these setup instructions on GitHub. Alternatively, refer to the installation guide for Ubuntu 20.04 for UP board models, including UP, UP 4000, UP Squared, UP Core, UP Core Plus, UP Xtreme, and UP Squared Pro.
After completing the instructions, you will have Ubuntu running on the UP board. Important: Disable the automatic system updater or avoid clicking “update” when prompted, as this may update the kernel to an incompatible version, rendering GPIO libraries unusable.
Next, install the Periphery library for GPIO functionality by following the Python Periphery instructions.
Making first connection with the UP board using a laptop
Now the UP board is up and running, transfering files to the UP board and accessing them from the outside is wanted. This makes programming easier as the program can be made on alaptop or pc and transfer the code to the UP board for testing. The same goes for pictures using machine learning for example.
Connecting the UP board and thelaptop to the same ethernet switch is needed. Make sure that the UP board and thelaptop both have a static IPv4 address within the same range.
Download a file transferer like WinSCP on your laptop and fire it up. Create a ‘new site,’ and enter the IP address of the UP board in the ‘Host name’ tab. The port number is already set, the default is ‘22’. For ‘Username’ and ‘Password’ enter the ones you set up in the UP board for login in, or using the ‘sudo’ command.
Now you are in the file system of the UP board, and you can transfer files to and from your laptop. Now we also want to be able to run scripts on the UP board from your laptop. For this we will use PowerShell. (for Windows systems) By using the ‘ssh@{up_board_ip_address}’ command it will prompt you to login to the UP board using its password.
When you have done this, you are now inside the command prompt of the UP board. This allows you to run scripts, edit system settings, edit files and much more. This is very handy for troubleshooting. Now all that is left to do is connecting the UP board to the Universal robot.
For this you just connect the robots ethernet cable to the same ethernet switch you were using. And now you can communicate using TCP/IP, using the ‘socket’ library in Python.
For the full tutorial on how to setup TCP/IP and communication, see this link: How to send and receive information between python and UR5 robot.