Suggested Setup in order to install the prerequisites for URCaps SDK

Hello everyone!

I worked through various post in this forum but unfortunately I do not get the URCaps SDK 1.1.0.76 to run (mvn install threw errors).

The instruction that “jbm” created is very good and helpful but unfortunately I did not worked for me. My guess is that the prerequisites are not setup properly or maybe I am using the wrong Ubuntu version (16.04 LTS). Can someone help me with a detailed instruction on how to setup the system before starting the install.sh from the SDK folder. My questions are

  1. Which Ubuntu version should I use? 14.04 LTS 64-bit, like mentioned in the post URSim running issue after a clean installation? I am on a intel chip.

  2. The tutorial pdf from the doc folder says a JAVA SDK 6 is needed? Is this mandatory? Can I just install java with sudo apt-get install default-jre? If not, how can I install and setup the proper java version?

  3. The tutorial pdf from the doc folder says maven 3.0.5 is needed? Is this mandatory? Can I just install maven with sudo apt-get install maven? If not, how can I install and setup the proper maven version?

  4. Do I need to install Python in order to use the python daemon? How can I install it?

  5. Can I install every ecplise version I like or do I need Kepler, like the one in the starter package?

I would very thankful if someone could help me with a little “preinstall.sh” script so everything is setup in order to start the “install.sh”.

Thanks a lot!

1 Like

Alternatively if you don’t want to mess around with the installation, I recommend using virtual machine to develop, their simulator, you get here:
https://www.universal-robots.com/download/?option=30326#section16597

build your urcap using only the newURCap.sh in the host machine (my host machine uses 16.04) copy it over to the VM and run.
or build everything in the VM, do what suits you.
I have been using this setup from the start and had no issues.

  1. Yes you can do sudo apt-get install maven
  2. Python is installed in the Simulator in the link you can test it there. or on the host machine you must have python.
  3. Use whatever IDE suits you, the one I use is intellij.

Hi dhv!
Thank you for your help. I tried already the simulator (you mean the starter-package URSim 3.4.0.39 Starter right?). Since the Ubuntu version that is used for the VM is 32-bit I get also errors because of the C++ Cross Compiler while building with maven. Because of that I wanted to install a clean Ubuntu just for URCaps. Besides that I would also prefer to avoid performance limitations due to the VM.

It would be perfect if there was a list with programs that have to be installed in order to start the install.sh without any upcoming errors or problems. A short instruction on where to download and how to setup the programs would be neat.

I mean the VM image including Lubuntu 14.04 and URsimulator, which is in the link.
My host computer is 64 bit Ubuntu 16.04, which I use to build and then copy over to the VM environment supplied by UR.
The install.sh is already trying to download the prerequisite tools to be able to build an URcap, it is only needed to install maven with sudo apt-get install maven.
I choose this setup since I use Ubuntu 16.04, and couldn’t install the latest URsimulator since it requires 14.04 Ubuntu.
Performance wise maybe this is an issue when running a VM alongside, so I understand your concern, but it’s quite an easy setup.

Ok, so I tried it this way:

  • Fresh install of Ubuntu 16.04
  • installing maven with sudo apt-get install maven
  • setting the JAVA_HOME variable in ~/.bashrc
  • running the install.sh in the sdk folder
  • dialog, sshpass, C/C++ cross-compiler toolchain got installed successfully
  • running mvn install in the helloworld folder gives me this error:

[INFO] Scanning for projects…
[WARNING]
[WARNING] Some problems were encountered while building the effective model for com.ur.urcap.examples:helloworld:bundle:1.0-SNAPSHOT
[WARNING] ‘build.plugins.plugin.version’ for org.apache.maven.plugins:maven-jar-plugin is missing. @ line 62, column 12
[WARNING]
[WARNING] It is highly recommended to fix these problems because they threaten the stability of your build.
[WARNING]
[WARNING] For this reason, future Maven versions might no longer support building such malformed projects.
[WARNING]
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building HelloWorld 1.0-SNAPSHOT
[INFO] ------------------------------------------------------------------------
[WARNING] The POM for com.ur.urcap:api:jar:1.0.0.30 is missing, no dependency information available
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 0.874 s
[INFO] Finished at: 2017-08-22T09:50:54+02:00
[INFO] Final Memory: 11M/208M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal on project helloworld: Could not resolve dependencies for project com.ur.urcap.examples:helloworld:bundle:1.0-SNAPSHOT: Failure to find com.ur.urcap:api:jar:1.0.0.30 in Central Repository: was cached in the local repository, resolution will not be reattempted until the update interval of central has elapsed or updates are forced → [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] DependencyResolutionException - Apache Maven - Apache Software Foundation

Can you explain me which step I missed?

What java version do you use?, also did you successfully install archetype and API also older API versions to maven and the additional jars in the install.sh file?, maybe try with sudo. here is what I have in my .bashrc:

export PATH
export JAVA_HOME=/usr/lib/jvm/java-8-openjdk-amd64
PATH=“${PATH}:/opt/urtool-3.0/bin”

I am on Java 1.8.0_131. I guess this is the version that got installed during installing maven. I did not install java on my own. I added the lines to the .bashrc. If I try echo $JAVA_HOME I get /usr/lib/jvm/java-1.8.0-openjdk-amd64. But when running the install.sh it says:

The tool 'dialog' is installed...
The tool 'sshpass' is installed...
The tool 'mvn' is installed...
Installing archetype and API to maven repository...
Warning: JAVA_HOME environment variable is not set.

How do I install the archetype and API and older API versions to maven? Sorry for the questions, but I am new to maven.

Thank you for your help!

Ok, little success. I ran install.sh as sudo and it could not find the JAVA_HOME. Running it WITHOUT sudo solved the problem and all archetype and API, older API versions additional jars got installed successfully. I small problem is left:

When I build with maven it says:

No compiler is provided in this environment. Perhaps you are running on a JRE rather than a JDK?

checking the Java Compiler with javac -version it says no program “javac” can be found. Shouldn’t be the compiler already installed in the jdk?

Finally it works. So this is how it worked for me, after a clean Ubuntu 16.04 installation

  1. Install all ubuntu updates
  2. Install JDK 8: sudo apt-get install openjdk-8-jdk
  3. Set JAVA_HOME variable to ~.bashrc
  4. Install maven: sudo apt-get install maven
  5. run install.sh (NOT as sudo). Confirm all additional installations with y

I can build the helloworld and mydaemon samples without any errors. Thank you dhv for your help :wink:

3 Likes