This is a layer to provide ros in an openembedded linux system.
Currently, this layer is still under development and not fully functional.
PURPOSE of this document:
This document describes:
* the installation, use and content of the git repository meta_ros
* milestones, the open issues and how some issues have been resolved.
INSTALLATION:
The repository only contains a layer for ros to be added to the existing yocto poky-danny-8.0 archive.
To install, unpack http://downloads.yoctoproject.org/releases/yocto/yocto-1.3/poky-danny-8.0.tar.bz2 into a directory <dir>.
In <dir>, clone this repository into the subdirectory meta-ros.
Add the meta-ros directory to your local bblayers.conf file
USE for native compilation on the VM (milestone M1):
The commands
source oe-init-build-env
bitbake core-image-ros
builds our specifically configured linux image.
With `runqemu qemux86-64 qemuparams="-m 2048" core-image-ros` the linux image runs within a virtual machine with 2048 MB of memory.
We assumed that this is running on and compiled for an x86-64 architecture. For other architectures, some settings must be adjusted.
Extract ros_server.tar.gz somewhere, adjust pathes in fuerte-ros-base.rosinstall to the location where it has been extracted to.
After starting the virtual machine, copy the installation script from the guest system to the home directory with scp and execute it.
scp lukas@192.168.7.1:/<location of repository>/install.sh .
sh ./install.sh
WARNING:
When contributing repository, notice that the recipe for log4cxx was based on the recipe in the OpenEmbedded (Classic) Development
(cf. http://cgit.openembedded.org/openembedded/tree/recipes/log4cxx), which is licensed with the MIT Licence.
CONTENT of the repository:
README this README file, which contains all important information
COPYING.MIT
conf/layer.conf configuration file for this layer
install.sh installation script that runs within the virtual machine
recipes-core/images/core-image-bmw.bb recipe for our own core image (derived from core-image-minimal)
recipes-devtools/python/python-pyyaml_3.10.bb recipe for pyyaml python library
recipes-devtools/python/python-rospkg_1.0.15.bb recipe for rospkg tool
recipes-devtools/python/python-empy_3.3.bb recipe for empy python library
recipes-devtools/python/python-nose_1.2.1.bb recipe for nose python library
recipes-devtools/python/python-rosinstall_0.6.21.bb recipe for rosinstall tool
recipes-devtools/python/python-pyyaml-native_3.10.bb native recipes for cross-compilation
recipes-devtools/python/python-rospkg-native_1.0.15.bb
recipes-devtools/python/python-empy-native_3.3.bb
recipes-devtools/python/python-nose-native_1.2.1.bb
recipes-devtools/python/python-setuptools_0.6c11.bb setuptools recipe originated from oe-core
recipes-devtools/log4cxx recipes and patches for log4cxx 0.10.0
recipes-devtools/log4cxx/log4cxx_0.10.0.bb
recipes-devtools/log4cxx/log4cxx/0001-log4cxx_0-10-0_add-missing-includes.patch
recipes-devtools/log4cxx/log4cxx/0003-log4cxx-0.10.0-add_stdio_header.patch
recipes-devtools/log4cxx/log4cxx/0002-Remove-duplicates-from-makefile.patch
recipes-ros/ros/ros.bb recipe for ros (incomplete)
recipes-ros/ros/ros/fuerte-ros-base.rosinstall the .rosinstall file to download ros
classes/distutils.bbclass distutils recipe originated from oe-core (patch submitted to oe-core and accepted)
classes/easyinstall.bbclass adjustments for easyinstall
MILESTONES
M1: basic image with dev-tools (make, cmake, ...) and ROS compiles natively in the virtual machine
M2: Linux+ROS System can be built completely with bitbake (no compilation and installing in the virtual machine)
M3: Linux+ROS System with configured kernel (e.g. RT-Linux, System-D) that meets real-time and safety requirements
RESOLVED ISSUES for M1:
- recipes for python-pyyaml and python-rospkg create invalid shell scripts (header line refers to python-native instead of python.)
RESOLVED by patching distutils class--has be committed to oe-core.
- recipe for log4cxx requires another patch.
RESOLVED by providing patch 0003 in recipe
- Compilation with make fails in the virtual machine because of insufficient memory during compilation.
RESOLVED by increasing memory.
OPEN ISSUES for M1:
- python-setuptools requires some python-modules at run-time.
TEMPORARILY RESOLVED by adding all python-modules in the image
SHOULD BE RESOLVED by creating an appropriate patch for python-setuptools and contributing to openembedded-core
- rospkg modules are not found when runnning python.
TEMPORARILY RESOLVED by installing natively in the virtual machine
CAUSE of PROBLEM: must add /usr/lib/python2.7/site-packages/rospkg-1.0.15-py2.7.egg to PYTHON_PATH (sys.path)
In the usual setting, this is done by adding rospkg-1.0.15-py2.7.egg to the easy-install.pth
However, the distutils class removes the created easy-install.pth before packaging.
Modifying the class, to not remove the easy-install.pth does not solve the issue, because
also the python-setuptools must add an entry to easy-install.pth
This can be only solved by providing a general merge mechanism for the easy-install.pth file.
Implementing this should not be difficult because the format of this file is very easy, and
the pathes can be simply accumulated.
FIRST TEMPORARY SOLUTION: we simply write the easy-install.pth file in the rootfs task of the image generation.
SECOND SOLUTION: implemented behavior described above
THIRD SOLUTION: uses the dist_utils argument to use traditional packaging mechanism and avoid .egg files at all (suggested by Ross Burton)
OPEN ISSUES for M2:
- understand what rosinstall actually does
- how fetch from multiple git repositories?
OPEN ISSUES for PUBLICATION:
- Explain how to/write a script to obtain the files in ros_server