nao_ros_cross_compile - How to cross compile your NAO Packages without the NAO Open VM

98 views
Skip to first unread message

Stephan Opfer

unread,
Nov 18, 2014, 6:12:36 AM11/18/14
to ros-sig-...@googlegroups.com
Hi All,

I am trying to compile my own ROS packages for my NAO, but without the Open VM from Aldebaran. The aim is to have the least amount of work on a daily basis.

Following the advice of Vincent I created a github repository, to make cooperation more easy: nao_ros_cross_compile

I am not sure, whether the repository setup is fine for the community to make the best practise way of contributing possible. Please suggest corrections about that.

I also already filed an issue, which states were I currently stuck.

Greetings,
  Stephan


Stephan Opfer

unread,
Nov 18, 2014, 10:15:50 AM11/18/14
to ros-sig-...@googlegroups.com
Hi All,

I made some progress in "understanding cross compiling". Now I ask myself, whether it is necessary to have ROS pre-compiled for the NAO architecture, in order to link my packages against these libraries.

For libraries like pthread, rt, boost this seems to be necessary, as the Aldebaran Cross Toolchain provides them.

Greetings,
  Stephan

Stephan Opfer

unread,
Nov 18, 2014, 12:45:08 PM11/18/14
to ros-sig-...@googlegroups.com

Vincent Rabaud

unread,
Nov 21, 2014, 12:18:24 PM11/21/14
to ros-sig-...@googlegroups.com
Hi Stephan, I tried something last night (which I'll finalize this weekend and release) that works (the tough part was to get it to work with the 2.1 toolchain: 1.14 was easy).
Big thx to Severin's work and robotpkg ! (and they're not aware of it :) )
Here is how I did it:
- I uncompressed the toolchain archive
- I took the few packages missing in the toolchain (e.g. log4cxx) from http://robotpkg.openrobots.org/packages/bsd/OpenNao-2.1.0.19-i386/All/ and added them at the right place in the toolchain folders (and also modified them to comply to the new paths). That was the solution: getting 3rd party packages to compile with the toolchain was tricky (especially as log4cxx is automake) but getting them already compiled just simplified the process :)
- I used catkin_make_isolated with -DCMAKE_TOOLCHAIN_FILE=whatever/cross-config.cmake

That's it. I'll write a script to do that automatically and work with the two versions. Stay tuned.

--
You received this message because you are subscribed to the Google Groups "ROS Sig Aldebaran" group.
To unsubscribe from this group and stop receiving emails from it, send an email to ros-sig-aldeba...@googlegroups.com.
To post to this group, send email to ros-sig-...@googlegroups.com.
Visit this group at http://groups.google.com/group/ros-sig-aldebaran.
To view this discussion on the web visit https://groups.google.com/d/msgid/ros-sig-aldebaran/c87644aa-455a-4c40-8c8c-0efd145b173c%40googlegroups.com.

For more options, visit https://groups.google.com/d/optout.

Vincent Rabaud

unread,
Nov 23, 2014, 4:04:13 PM11/23/14
to ros-sig-...@googlegroups.com
It compiles but I have no idea on whether it is runnable on the robot :) Please update the wiki if you have problems or just ping me offline by mail.

Stephan Opfer

unread,
Nov 26, 2014, 4:36:47 AM11/26/14
to ros-sig-...@googlegroups.com
As I already mailed with vincent, I also want to share it here with the community:

What Vincent describes in the wiki works. Furthermore, I was able to compile the nao_talker example with the help of the steps described there.

The best way for me, was to execute the steps in an extra catkin-workspace. I sourced and compiled that workspace.

Afterwards, I created an extra workspace for my own code and sourced this workspace after the one with from the wiki (with roscpp inside). Then I was able to compile my nao_talker project with the same compile command vincent used in his wiki description.

Vincent Rabaud

unread,
Nov 26, 2014, 5:13:19 AM11/26/14
to ros-sig-...@googlegroups.com
Cool, please complete the wiki with your whole methodology, especially the part where you set the CMAKE_INSTALL_PREFIX if that got the setup.sh to work for you at the end.

--
You received this message because you are subscribed to the Google Groups "ROS Sig Aldebaran" group.
To unsubscribe from this group and stop receiving emails from it, send an email to ros-sig-aldeba...@googlegroups.com.
To post to this group, send email to ros-sig-...@googlegroups.com.
Visit this group at http://groups.google.com/group/ros-sig-aldebaran.

Stephan Opfer

unread,
Nov 26, 2014, 2:59:18 PM11/26/14
to ros-sig-...@googlegroups.com
Updated the wiki, accordingly. We will further experiment with this setup on Monday. So stay tuned. :)

Stephan Opfer

unread,
Nov 26, 2014, 5:32:32 PM11/26/14
to ros-sig-...@googlegroups.com
Hi Vincent,

Concerning the copys of the external third party libraries in the devel_isolated folder. Shouldn't the command be

cp $TOOLCHAIN2/libnaoqi-sysroot/lib/libconsole_bridge.so ./devel_isolated/lib/
cp $TOOLCHAIN2/libnaoqi-sysroot/lib/liblog4cxx.so* ./devel_isolated/lib/
cp $TOOLCHAIN2/libnaoqi-sysroot/lib/liblz4.so* ./devel_isolated/lib/

instead of

cp $TOOLCHAIN2/libnaoqi-sysroot/lib/libconsole_bridge.so ./devel_isolated/ls/
cp $TOOLCHAIN2/libnaoqi-sysroot/lib/liblog4cxx.so* ./devel_isolated/ls/
cp $TOOLCHAIN2/libnaoqi-sysroot/lib/liblz4.so* ./devel_isolated/ls/

Greetings,
Stephan

Vincent Rabaud

unread,
Nov 27, 2014, 3:33:23 AM11/27/14
to ros-sig-...@googlegroups.com
yes, you are right. Also, the tutorial was just explaining how to get roscpp to compile. Don't hesitate to change that to something higher-level in ROS (like tf2 maybe ? ), in which case you would need to download more 3rd party libraries from robotpkg.

--
You received this message because you are subscribed to the Google Groups "ROS Sig Aldebaran" group.
To unsubscribe from this group and stop receiving emails from it, send an email to ros-sig-aldeba...@googlegroups.com.
To post to this group, send email to ros-sig-...@googlegroups.com.
Visit this group at http://groups.google.com/group/ros-sig-aldebaran.
Reply all
Reply to author
Forward
0 new messages