Installation Notes

Here are some notes on installation of Nengoros.

Install scipy and numpy on OS X

More information can be found in the blog post here.

download fortran


brew install gfortran

download virtualenv and wrapper


sudo pip install virtualenv
sudo pip install virtualenvwrapper

create ~/.virtualenvs directory

source /usr/local/bin/virtualenvwrapper.sh

create your virtualenv

mkvirtualenv nengoros
source ~/.virtualenvs/nengoros/bin/activate

Alternative ways to install wstool

On Ubuntu you can use package manager:

sudo apt-get install python-wstool

or compile from source:

git clone https://github.com/vcstools/wstool.git && cd wstool
python setup.py install

How does the rosjava_core installation work?

Rosjava_core is implementation of ROS in pure Java. It can be used as a library for java nodes, but it features an implementation of roscore, or class for loading rosjava nodes too.

Rosjava uses gradle, a declarative build tool for managing java projects.

When rosjava_core is built..


cd rosjava_core && ./gradlew build

.. gradle checks the project hierarchy, downloads required maven dependencies, compiles and installs rosjava_core.

This process consists of several main phases:

  • Compile java source code
  • Generate message interfaces, this means basically:
    • ROS defines message as a simple structure described in text file (e.g. *.msg)
    • Gradle searches ROS_PACKAGE_PATH for these files and converts them into java interfaces
    • These interfaces are then used by rosjava nodes for communication
  • Create jar file and place it into the maven repository (~/.m2/repository/)
    • Typically, rosjava nodes are looking there for this required library

This means that in order to define new type of message, you should recompile entire rosjava_core.

Catkin

Since Groovy, the ROS uses tool called Catkin. Catkin is an utility for dependency management. It uses python for generating CMakeLists.txt files for cross-platform make: cmake.

Dependencies between ROS components are defined in file package.xml for each ROS package. Based on these information, the CMakeLists.txt for cmake is generated.

For rosjava, two build tools are used in the current situation. While catkin treats all packages (python, c++, java) in the same way, the rosjava_core CMakeLists.txt contains mainly this:


execute_process(
 COMMAND ./gradlew
 WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
)

It basically means that: catkin tells cmake to run gradle on this package.

Advertisements