Currently, the 0.7 version of RSB can be installed in the following ways :
Download the tools binary from the appropriate location:
After the download, the tools file has to be made executable in most cases. This can be done for example by executing
chmod +x tools
in the download directory.
The various tools are provided as symbolic links to the single tools binary. When invoked, it prints a list of these links and offers to create them:
$ ./tools
[...]
Create missing links now [yes/no]? y
Creating symbolic link info -> tools
[...]
Note
The links can also be created as follows:
Non-interactively
$ ./tools create-links
Manually
$ for alias in info logger call ; do ln -s tools ${alias} ; done
Note
In case you are unfamiliar with the git version control system, have a look at our short GIT primer.
The whole source tree of RSB can be obtained from the repository located at “0.7” branch of https://code.cor-lab.org/git/rsb.git.. URLs of individual implementations:
Language |
Repository URL |
---|---|
C++ |
“0.7” branch of https://code.cor-lab.org/git/rsb.git. cpp |
Java |
“0.7” branch of https://code.cor-lab.org/git/rsb.git. java |
Python |
“0.7” branch of https://code.cor-lab.org/git/rsb.git. python |
Common Lisp |
“0.7” branch of https://code.cor-lab.org/git/rsb.git. cl |
Matlab |
“0.7” branch of https://code.cor-lab.org/git/rsb.git. matlab |
Additionally, the internal protocol, which is required for a from-source installation is available at “0.7” branch of https://code.cor-lab.org/git/rsb.git. protocol.
Note
There is currently an issue with the automatic replacement of the git URLs in this documentation. For all URLs there should not be a space between git. and the specific suffix.
Build and install an implementation
Debian packages for several versions of Ubuntu GNU/Linux are available from the CoR-Lab package repository.
The following repository source line has to be added to /etc/apt/sources.list:
deb http://packages.cor-lab.de/ubuntu/ RELEASENAME main
where RELEASENAME is the appropriate Ubuntu release name.
After that, packages can be installed via
$ sudo apt-get install PACKAGES
where PACKAGES is the appropriate subset of rsb0.7 rsb-tools-cpp0.7 rsb-tools-cl0.7.
Note
This installation method only works with Ubuntu GNU/Linux. More information can be found here.
For python, platform-unspecific packages are pushed to the central repository server and can hence be installed with pip or easy_install.
The installation of the Python implementation of RSB requires the Google Protocol Buffers module on your system. Depending on whether pip or easy_install is used do one of the following:
$ easy_install protobuf
$ pip install protobuf
Note
These commands will install protobuf for the whole system and require root permissions. If you only want to install protobuf for your local user, add the --user option to the call of easy_install or pip install. The same applies for the subsequently described installation of rsb-python itself.
The rsb-python module can be installed by using one of the following funtions:
$ easy_install "rsb-python<0.8"
$ pip install "rsb-python<0.8"
Note
These commands will currently install rsb-python in version 0.7 as this is at the time of writing the stable version. This will be changed once the backport of this rst file was done.
If you plan to use the spread transport, you need to additionally install the python spread module which is available at: http://www.spread.org/files/SpreadModule-1.5spread4.tgz The version of this module which is pushed to the PyPI is outdated and does not work with spread version 4. You need to compile this module on your own.
TODO
Problem (applies to C++, Python)
Communication over spread does not work anymore. Spread settings are ignored.
Solution
Starting with version 0.7, RSB uses a transport that implements a custom TPC-based protocol to facilitate the easy use of the framework without dependencies on 3rd party libraries. In order to use to the old spread transport the configuration needs to be changed.
This can be changed in three ways:
Globally for all RSB programs (or running under a particular UNIX user)
Create or modify a RSB configuration file /etc/rsb.conf or ~/.config/rsb.conf to contain the following lines:
1 2 3 4 [transport.spread] enabled = 1 [transport.socket] enabled = 0Lines 3 and 4 can be omitted to enable both transport s in parallel.
Locally for the current directory
Create a RSB configuration file $(pwd)/rsb.conf with the same contents as described above.
For the current shell
Set and export environment variables as follows:
$ export RSB_TRANSPORT_SPREAD_ENABLED=1 $ export RSB_TRANSPORT_SOCKET_ENABLED=0
Problem (applies to C++,Common Lisp,Python)
How can I configure the TCP-based transport?
Solution
The TCP-based transport can be configured locally or globally by placing the following content in /etc/rsb.conf, ~/.config/rsb.conf or $(pwd)/rsb.conf:
[transport.socket] enabled = 1 host = HOSTNAME port = 4444 server = autoHOSTNAME can be localhost (if all processes are going to run on the same node), a host name of an IP address.
Note
The above configuration uses server = auto which causes the initial RSB process to create the specified server and subsequent processes to connect to that server.
Problem (applies to C++)
I compiled and installed successfully, but RSB binaries/libraries produce linker errors at runtime.
Solution
The C++ implementation of RSB is built without fixed rpath by default. As a result, installed RSB binaries and libraries do not contain information regarding the location of their dependencies. This potentially causes runtime linking to fail because the dependencies cannot be located.
There are two possible solutions:
Building and installing RSB with fixed rpath
This can be achieved by configuring RSB with
$ cmake -DCMAKE_INSTALL_RPATH_USE_LINK_PATH=TRUEThis instructs CMake to set the rpath of installed libraries and executables to the values used for building them. Normally the rpath is stripped at installation time.
Use of the LD_LIBRARY_PATH environment variable
When the value of LD_LIBRARY_PATH contains the directory/directories into which RSB (and its dependencies) have been installed, these dependencies can be located at runtime. LD_LIBRARY_PATH can be set, for example, like this:
$ export LD_LIBRARY_PATH=PREFIX/libwhere PREFIX is the prefix directory into which RSB and its dependencies have been installed.
Warning
This workaround is not permanent and has to be repeated for each new shell that should be able to execute RSB binaries or RSB-based programs.
Problem (applies to Common Lisp)
When I start any of the tools, the following happens:
$ logger socket://localhost:7777 WARNING: Failed to load Spread library: Unable to load any of the alternatives: ("libspread-without-signal-blocking.so" "libspread.so" "libspread.so.2" "libspread.so.2.0" "libspread.so.1"). Did you set LD_LIBRARY_PATH? Spread transport will now be disabled. [execution continues, but Spread transport does not work]
Solution
Place one of the mentioned Spread libraries on the system library search path or set LD_LIBRARY_PATH appropriately.
Problem (applies to all implementations)
When a listener in my component receives certain event s, it crashes and complains about missing converter s. For example like this:
$ ./myconponent
[...]
terminate called after throwing an instance of 'rsc::runtime::NoSuchObject'
what(): No converter for wire-schema or data-type `.rst.vision.Image'.
Available converters: {
bool: *rsb::converter::BoolConverter[wireType = std::string, wireSchema = bool, dataType = bool] at 0x9d0b80
[...]
}
Solution
There can be several solutions to this problem.