2020-11-02

URSim on Ubuntu 18

Universal Robots has made a nice offline simulator for their UR series robots: HERE.

I use it for my robotics course, since you can practice communicating with it just as it were a real robot.

I have recently endeavored to upgrade computers in the lab to Ubuntu 18, which has unfortunately broken a lot of stuff. I have in particular had some trouble running URSim on that Ubuntu version and I'm aware that a lot of people have the same problem.

This is what has helped me running URSim 3.14.2.1031212 on Ubuntu 18:

1. It seems that the install.sh script doesn't recognize the newest Java version. It is also trying to install libcurl3, which, if you also happen to have ROS installed, will almost certainly result in removing a lot of packages and breaking the installation. These changes to install.sh script seem to help (use this as patch, or just change the indicated lines):

--- /home/dagothar/Downloads/URSim_Linux-3.14.2.1031212/ursim-3.14.2.1031212/install.sh
+++ /home/dagothar/Downloads/ursim-3.14.2.1031212/install.sh
@@ -34,6 +34,7 @@
     # source https://stackoverflow.com/questions/7334754/correct-way-to-check-java-version-from-bash-script
         version=$(java -version 2>&1 | awk -F '"' '/version/ {print $2}')
         echo version "$version"
+        return 0
         if [[ "$version" > "1.6" ]]; then
         echo "java version accepted"
             return 0
@@ -67,7 +68,7 @@
 
 set -e
 
-commonDependencies='libcurl3 libjava3d-* ttf-dejavu* fonts-ipafont fonts-baekmuk fonts-nanum fonts-arphic-uming fonts-arphic-ukai'
+commonDependencies='libcurl4 libjava3d-* ttf-dejavu* fonts-ipafont fonts-baekmuk fonts-nanum fonts-arphic-uming fonts-arphic-ukai'
 if [[ $(getconf LONG_BIT) == "32" ]]
 then
     packages=`ls $PWD/ursim-dependencies/*i386.deb`

2. Run the install script:

./install.sh

3. Install missing RPC library and other dependencies if prompted:

sudo apt install libxmlrpc-c++8-dev:i386

4. Install Java 8:

 sudo apt install openjdk-8-jre openjdk-8-jdk

5. Set Java 8 as default:

sudo update-java-alternatives -s java-1.8.0-openjdk-amd64


When running URSim, first start URSim in one terminal:

./start-ursim.sh

It will prompt you that no UR control process is running. Start it manually in another terminal:

./URControl





No comments:

Post a Comment