(!) Please ask about problems and questions regarding this tutorial on answers.ros.org. Don't forget to include in your question the link to this page, the versions of your OS & ROS, and also add appropriate tags.

Installation

Description: Installation instructions from debs, sources, or maven.

Keywords: rosjava installation

Tutorial Level: BEGINNER

Next Tutorial: Creating Rosjava Packages

Installation Methods

There are three different ways to install rosjava. All three give you access to a maven repository of rosjava artifacts (jars), but each differs by where and how those repositories are accessed. In addition, the ros source and deb installations give you the full ros package environment which allows you to utilise ros-specific files in your package (e.g. launchers).

Source Installation

Deb Installation

No Ros Installation

Source Installation

The following instructions are for source installation on ubuntu platform 1.

Preparation

> sudo apt-get install ros-hydro-catkin ros-hydro-ros python-wstool

Sources

> mkdir -p ~/rosjava
> wstool init -j4 ~/rosjava/src https://raw.github.com/rosjava/rosjava/hydro/rosjava.rosinstall
> source /opt/ros/hydro/setup.bash
> cd ~/rosjava
# Make sure we've got all rosdeps and msg packages.
> rosdep update
> rosdep install --from-paths src -i -y
> catkin_make

Development Workspace

You can now proceed to adding your own source packages on top. Refer to the next tutorial - Creating Rosjava Packages.

Usage

You can now continue to compile your projects in one of two ways:

  • Entire Workspaces: on the command line with catkin_make.

  • Individual Projects/Targets: source devel/setup.bash and work with gradle.

Working directly with gradle is like using make under the hood of a catkin_make build for c++. Use the gradle wrapper scripts (gradlew) in each package.

Maven Artifacts

In this installation, you will find the maven repository of all rosjava artifacts in ~/rosjava/devel/share/maven.


Deb Installation

Execute the following command for deb installation on the Ubuntu platform.

> sudo apt-get install ros-hydro-catkin ros-hydro-ros ros-hydro-rosjava python-wstool

Development Workspace

With rosjava installed, proceed to the next tutorial, which demonstrates how to create a rosjava package - Creating Rosjava Packages

Maven Artifacts

In this installation, you will find the maven repository of all rosjava artifacts in /opt/ros/hydro/share/maven.


No Ros Installation

/!\ This is a No Ros Zone!!!

The following instructions are for a generic java project utilising rosjava artifacts from our external maven repository. This can be done from any java development environment you wish so long as it can pull in maven repository dependencies.

The url for our maven repo:

https://github.com/rosjava/rosjava_mvn_repo/raw/master/

Development Environments

We don't use this workflow ourselves for rosjava yet (we do for android). If you decide to work in this manner, please update the wiki with some notes on how you did so. If you have questions on how it might work in your scenario, ask us on the sig mailing list.

Eclipse

TODO!

Gradle

TODO!


  1. For other platforms, you'll need to use pip for the python packages and drop the other stack sources into your rosinstall. (1)

Wiki: rosjava/Tutorials/hydro/Installation (last edited 2014-03-09 04:07:56 by DanielStonier)