The catkin package has got a runtime dependency to cmake, make,
gcc and other build utilities. These dependencies, however, are
only needed if it is desired to build with catkin on the target
board. If we do not want to build on the target board, i.e., if
we just want to use ros tools like roslaunch, only a small part
of catkin (i.e., the corresponding python packages) is required
to be deployed on the target board.
Therefore, we introduce a new package called catkin-runtime.
It installs only the python packages that are required for
the ros tools to run. The roslib package now depends on
catkin-runtime (previously: catkin).
I also tried an alternative approach which just modifies catkin.bb:
- add a catkin-runtime package
- move PYTHON_SITEPACKAGES_DIR from FILES_catkin to FILES_CATKIN_RUNTIME
- make catkin_runtime RDEPEND on the python stuff
- make catkin RDEPEND on the cmake, binutils, ..., + catkin-runtime
With this setup, for some reason, bitbake thinks that
catkin-runtime still RDEPENDS on binutils. Therefore, I split up
the catkin recipe into two different recipes. Here, the
RDEPENDS are managed correctly.
If we want to deploy catkin as a build tool on the board, we can
simply add a runtime dependency to catkin. However, this should
not be the default setup.
Special thanks go to Tobias Henkel (tobias.henkel@bmw-carit.de)
who deserves most of the credits for this patch.
Signed-off-by: Andreas Baak <andreas.baak@bmw-carit.de>
When roslaunch is started, it checks the file size of the local log
directory by calling:
disk_usage = rosclean.get_disk_usage(d) [1]
The function `get_disk_usage` [2] in rosclean creates a subprocess and
calls `du -sb` on Linux systems (cf. [3]).
However, the `du` command, which busybox usually provides on an
embedded Linux image, does not support the `-b` option, and only the
`du` command from the coreutils [4] supports this option.
This issue was first reported in April 2013 on the meta-ros issue
tracker [5]. Hence, on the first iteration of this issue, the
commit db0c8d5c [6] simply adds the dependency on coreutils to
roslaunch.
However, this has certain disadvantages:
- coreutils is licensed under GPLv3 and must not be deployed in a
product, which is massively distributed to customers.
- coreutils has larger file-system foot print than busybox and makes
the minimal Linux images considerably larger.
As a fortuitous circumstance, Alexis Ballier [7] had already observed
this disadvantage and provides a patch [8, 9] that makes
`get_disk_usage` use `du -k`, which works with busybox and coreutils.
So, on the second iteration of this issue, this commit here patches
rosclean's `get_disk_usage` function with the aforementioned patch.
This slightly modifies the semantics of this function. However, I
believe this plays only a minor role for the overall intended
functionality to check if the log usage has reached a critical file-size
limit, and it allows us to remove the dependency on coreutils, which is
much more critical.
Andreas Baak reported the disadvantages of the previous solution, which
triggered the re-investigation. The current resolution has been
discussed and worked out in collaboration with Andreas Baak.
[1] 9da29441f3/tools/roslaunch/src/roslaunch/rlutil.py (L63)
[2] c6e91f9af1/tools/rosclean/src/rosclean/__init__.py (L120)
[3] c6e91f9af1/tools/rosclean/src/rosclean/__init__.py (L130)
[4] http://cgit.openembedded.org/cgit.cgi/openembedded-core/tree/meta/recipes-core/coreutils/coreutils_8.23.bb?h=master
[5] https://github.com/bmwcarit/meta-ros/issues/60
[6] db0c8d5cd1
[7] https://github.com/aballier
[8] https://github.com/ros/ros/pull/76
[9] bbf1f945c7
Signed-off-by: Lukas Bulwahn <lukas.bulwahn@oss.bmw-carit.de>
Signed-off-by: Andreas Baak <andreas.baak@bmw-carit.de>
When I investigated the issue #291 with Kristof's patch applied,
I noticed that `bitbake octomap` failed.
Due to my inspection, I believe that the inheritance on ros
was only needed as the ROS_SPN and ROS_SP variables were used in
the recipe. After simply using the default variables, BPN and BP,
I removed the inheritance on ros.
Furthermore, as meta-ros only has one recipe for octomap base
library for now, we do not need to split the recipe definition
in an include and a recipe file.
Probably, this was done as premature optimization believing
that the libraries from the octomap repository, e.g., octovis,
would be added shortly after.
Testing with `bitbake packagegroup-ros-world` reported no errors.
Signed-off-by: Lukas Bulwahn <lukas.bulwahn@oss.bmw-carit.de>
ROS and catkin packages install their assets to paths prefixed by
ros_prefix. As the recipe was trying to collect the assets for the dev
package in the wrong locations, the dev package was empty.
To address this we use the ros_prefix consistently across the recipe.
In special situations, the prefix used by yocto is prefixed by an
additional staging dir and thus not always starting at /. The current
class already covered the special case for building native packages, but
was erroneous when trying to build nativesdk packages.
Instead of dealing with these special cases ourselves, we can prefix the
ros_prefix with yocto's base_prefix. This prefix will contain any
additional dirs yocto decides to use and will therefore always result in
valid directory variables automatically.
roscore-default: Removing not supported variable in variable
roscore-default: Adding PATH, LD_LIBRARY_PATH and PYTHONPATH
roscore.service: Using /opt/ros/hydro/bin instead of /usr/bin to launch
roscore
You can now install roslaunch-systemd :
opkg install roslaunch-systemd
and start roscore :
systemctl start roscore