roscore and rosnodes working

Up until now the nodes launched from the meta-ros code weren’t working (they hang) but after the work at the issue #68 they seem to work properly.

I created a patch that fixes this situation. If you’re interested you can just apply it to oe-core but hopefully this patch get be pushed to the Angstrom oe-core.

From 30b73ddd1c3ddbd03a083c2ad9c4fcedf7749d32 Mon Sep 17 00:00:00 2001
From: victor 
Date: Mon, 1 Jul 2013 14:46:42 +0200
Subject: [PATCH] apr_cv_mutex_recursive=yes added to apr_1.4.6.bb to make
 rosnodes work
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

Working with the meta-ros project we detected that the ROS nodes didn't launch properly
the reason was that by default apr_cv_mutex_recursive in apr is set to no and this leads
to the APRENOTIMPL return value of apr_thread_mutex_create in thread_mutex.c when
APR_THREAD_MUTEX_NESTED is requested via flags.

Added CACHED_CONFIGUREVARS += "apr_cv_mutex_recursive=yes" to sources/openembedded-core/meta/recipes-support/apr/apr_1.4.6.bb
to fix this issue. It has also been removed the mention of this variable in
meta/site/powerpc32-linux.

Signed-off-by: Víctor Mayoral Vilches 
---
 meta/recipes-support/apr/apr_1.4.6.bb |    3 +++
 meta/site/powerpc32-linux             |    1 -
 2 files changed, 3 insertions(+), 1 deletion(-)

diff --git a/meta/recipes-support/apr/apr_1.4.6.bb b/meta/recipes-support/apr/apr_1.4.6.bb
index 896f79f..ba59639 100644
--- a/meta/recipes-support/apr/apr_1.4.6.bb
+++ b/meta/recipes-support/apr/apr_1.4.6.bb
@@ -23,6 +23,9 @@ inherit autotools lib_package binconfig multilib_header
 
 OE_BINCONFIG_EXTRA_MANGLE = " -e 's:location=source:location=installed:'"
 
+# Added to fix some issues with cmake. Refer to https://github.com/bmwcarit/meta-ros/issues/68#issuecomment-19896928
+CACHED_CONFIGUREVARS += "apr_cv_mutex_recursive=yes"
+
 do_configure_prepend() {
 	cd ${S}
 	./buildconf
diff --git a/meta/site/powerpc32-linux b/meta/site/powerpc32-linux
index 4550df3..b3973c9 100644
--- a/meta/site/powerpc32-linux
+++ b/meta/site/powerpc32-linux
@@ -203,7 +203,6 @@ apr_cv_use_lfs64=${apr_cv_use_lfs64=yes}
 apr_cv_epoll=${apr_cv_epoll=yes}
 apr_cv_pthreads_cflags=${apr_cv_pthreads_cflags=-pthread}
 apr_cv_pthreads_lib=${apr_cv_pthreads_lib=-lpthread}
-apr_cv_mutex_recursive=${apr_cv_mutex_recursive=yes}
 ac_cv_func_mmap=${ac_cv_func_mmap=yes}
 ac_cv_file__dev_zero=${ac_cv_file__dev_zero=yes}
 ac_cv_sizeof_off_t=${ac_cv_sizeof_off_t=4}
-- 
1.7.9.5

Update: Make sure you check the source to get the latest version of the patch https://github.com/vmayoral/beagle-ros.

Advertisements
Standard

19 thoughts on “roscore and rosnodes working

  1. Les Oakes says:

    excellent find!!! I had started attacking this problem in May with no success. Congratulations! And much success with your project!

  2. HvN says:

    I’m using a BeagleBoard-xM (Angstrom, 2.6.32 arm7l) and want to install ROS. So far neither opkg nor git is working for me. Can you please tell me how to install ROS ?

  3. hvn says:

    Since the heanet document keeps giving library problems, and will go to building recipes. However, after downloading en unpacking the master zip, I get this:

    $ MACHINE=beagleboard-xm ./oebb.sh config beagleboard-xm
    BASE_VERSION mismatch, recreating /home/huub/.oe/environment-angstromv2012.12
    There now is a sourceable script in ~/.oe/enviroment. You can do ‘. /home/huub/.oe/environment-angstromv2012.12’ and run ‘bitbake something’ without using ./oebb.sh as wrapper
    env: gawk: No such file or directory

    Setup for beagleboard-xm completed
    huub@Lubuntu-cross:~/PERA$ . /home/huub/.oe/environment-angstromv2012.12
    $ bitbake roscore
    Traceback (most recent call last):
    File “/usr/bin/bitbake”, line 35, in
    import bb
    File “/usr/lib/pymodules/python2.7/bb/__init__.py”, line 71, in
    from bb import fetch2 as fetch
    ImportError: cannot import name fetch2
    /usr/lib/pymodules/python2.7/bb/event.py:87: RuntimeWarning: Parent module ‘bb’ not found while handling absolute import
    from bb.msg import BBLogFormatter
    Error in atexit._run_exitfuncs:
    Traceback (most recent call last):
    File “/usr/lib/python2.7/atexit.py”, line 24, in _run_exitfuncs
    func(*targs, **kargs)
    File “/usr/lib/pymodules/python2.7/bb/event.py”, line 87, in print_ui_queue
    from bb.msg import BBLogFormatter
    File “/usr/lib/pymodules/python2.7/bb/__init__.py”, line 71, in
    from bb import fetch2 as fetch

    Could you tell me what I’m doing wrong ? Thank you.

  4. hvn says:

    I obviously was acting too fast on that. However, after installing awk and dependencies, I still get the message that it can’t import fetch2 which would have something to do with bb (which isn’t in the zip). I searched for this and there is no fetch2 or fetch package. Is there still a missing package or script ?

    • hvn, great hearing that you fixed the dependencies.

      I haven’t tested the code in the Beagleboard-xm (don’t have access to one) but i would guess it should work as well.

      To me it seems like you still have some missing dependencies. According to your log, bitbake doesn’t even read the recipes. That’s probably an Angstrom installation issue. Make sure you followed properly http://www.angstrom-distribution.org/building-angstrom.

      Try posting your error log and i might be able to help you a little.

  5. hvn says:

    Well, like I said in my first comment, I do have Angstrom running on the xM, and it’s prepared to run using the DSP (which is tested ok). So steps 1 and 2 of that building-angstrom link have been completed, be it not by me. All I actually want to do is to install ROS and some ROS-using software I wrote myself. What would be your suggestion to do in this case? Tried to find a log in the build directory but there is none.

  6. Having Angstrom running in your board and having a “properly” Angstrom build setup are totally different things hvn.

    I suspect you’re having trouble with the second.

    Could you at least post the complete error you get?

  7. hvn says:

    I have tried posting questions to the angstrom mailing list, but I get them all back for “taking to too long reach” the email address.
    I set up .profile and I’m trying to follow this page: https://github.com/bmwcarit/meta-ros and have a question about bitbake: is it supposed to come with e.g. meta-oe and oe-core? I get this error: Error: “The bitbake directory (/home/hvn/OE/oe-core/bitbake) does not exist! Please ensure a copy of bitbake exists at this location”. While I also get this:
    /OE$ find . -name bitbake
    ./openembedded/recipes/bitbake
    ./bitbake
    ./bitbake/bitbake-ng/include/bitbake
    ./bitbake/bitbake
    ./bitbake/bitbake/bin/bitbake
    Do I again miss some instructions ?

  8. hvn says:

    Trying to bitbake roscore, it gives this error: “ERROR: no recipe files to build, check your BBPATH and BBFILES?” Since the recipes are clearly there, I checked and find that in layer.conf BBPATH .= “:${LAYERDIR}”, but LAYERDIR is empty (checked with echo) and I can’t find where it is set. Searching on the net has given no clue either.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s