Cross-Compiling ROS for the Nao Ubuntu 12.04 and fuerte
Problem on starting the roscore on a Nao v3
Thanks to Daniel Maier there is a ros wiki page how to compile cross compile ROS for a NAO with a Geode processor. But I the description is not up-to-date and I have problems with the following constellation:
The environment
- Ubuntu 12.04 (32bit)
- Nao V3.x (NaoQi 1.12.5)
- ROS fuerte
Is there someone who has a nice "how to" recipe?
My error messages
With my recipe below I am getting the following error on starting the roscore at the Nao robot:
Traceback (most recent call last):
File "/home/nao/ros-cross/ros/fuerte/bin/roscore", line 4, in <module>
import pkg_resources
ImportError: No module named pkg_resources
or on starting rospack
rospack: error while loading shared libraries: libboost_system.so.1.46.1: cannot open shared object file: No such file or directory
My recipe which does not work! Not yet :-)
This is my recipe but it does not work --> it differs to the original wiki-description by an other installation path and it just compiles the roscore with no extra stuff.
# set environment variables
export ROS_CROSS_ROOT=/home/nao/ros-cross #this is where ROS will be installed to, see below
export ROS_CROSS_DIR=$ROS_CROSS_ROOT/ros #this is where ROS will be installed to, see below
export AL_DIR="$HOME/opt/v.1.12.5-RoboCup/naoqi"
export CTC_DIR="$AL_DIR/crosstoolchain" # path to Aldebaran's cross-compilation toolchain (CTC)
export GEODE_CXX=$CTC_DIR/cross/bin/i686-pc-linux-gnu-g++
export GEODE_CC=$CTC_DIR/cross/bin/i686-pc-linux-gnu-gcc
export LD_LIBRARY_PATH= # just to be sure
ll $GEODE_CXX # just to test the path
ll $GEODE_CC # just to test the path
sudo mkdir -p $ROS_CROSS_ROOT
sudo chown -R $USER $ROS_CROSS_ROOT
cd $ROS_CROSS_ROOT
#fuerte
rosinstall --catkin $ROS_CROSS_ROOT/ros-underlay http://ros.org/rosinstalls/fuerte-ros-base.rosinstall
cp $ROS_CROSS_ROOT/ros-underlay/ros/core/rosbuild/rostoolchain.cmake $ROS_CROSS_ROOT/ros-underlay/ros/core/rosbuild/rostoolchain.cmake.bak
echo "include(\"$CTC_DIR/toolchain-geode.cmake\")" >> $ROS_CROSS_ROOT/ros-underlay/ros/core/rosbuild/rostoolchain.cmake
echo "include_directories(\"$ROS_CROSS_DIR/ros-deps/include\")" >> $ROS_CROSS_ROOT/ros-underlay/ros/core/rosbuild/rostoolchain.cmake
echo "link_directories(\"$ROS_CROSS_DIR/ros-deps/lib\")" >> $ROS_CROSS_ROOT/ros-underlay/ros/core/rosbuild/rostoolchain.cmake
gedit ./ros/core/rosbuild/private.cmake
# --> replace find_file(_file_name ${file} ${PROJECT_SOURCE_DIR} /) with find_file(_file_name ${file} ${PROJECT_SOURCE_DIR} / NO_CMAKE_FIND_ROOT_PATH)
cd $ROS_CROSS_ROOT/ros-underlay
mkdir build
cd build
cmake -D CMAKE_INSTALL_PREFIX=$ROS_CROSS_DIR/fuerte ..
make install
source $ROS_CROSS_DIR/fuerte/setup.sh
rosmake ros
#rosinstall $ROS_CROSS_DIR/fuerte/stacks "http://packages.ros.org/cgi-bin/gen_rosinstall.py?rosdistro=fuerte&variant=desktop&overlay=no"
cd rosinstall $ROS_CROSS_DIR/fuerte/stacks "http://packages.ros.org/cgi-bin/gen_rosinstall.py?rosdistro=fuerte&variant=ros-base&overlay=no"
rsync -zrptLv --delete-after -e "ssh" --exclude 'ros-underlay' --exclude 'boost' $ROS_CROSS_ROOT nao@IP-ROBOT:./
Thanks Max
did you test running roscore in your computer within your current ros installation path before copying to the robot?