0
$\begingroup$

Rosanswers logo

##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


Originally posted by Markus Bader on ROS Answers with karma: 847 on 2012-07-09

Post score: 2


Original comments

Comment by ryann2k1 on 2013-05-20:
did you test running roscore in your computer within your current ros installation path before copying to the robot?

$\endgroup$

1 Answer 1

0
$\begingroup$

Rosanswers logo

Hi, I am using the newer Nao too. I decided to install ROS electric (desktop), ubuntu 10.04 with the atom toolchain 1.12.5. Today it compiles onto the pc. Buuut, ROS still doesnt run into the NAO. I attatch you my environment path bash with two boost paths that I included and solved a similar problem with boost.

#!/bin/sh
# set some environment variables for compiling
export TARGETDIR=~ #this is where ROS will be installed to, see below
export CTC_DIR=/path/to/nao-cross-toolchain-dir/nao-atom-cross-toolchain-1.12.5.3_2012-06-03 # path to Aldebaran's cross-compilation toolchain (CTC)
export ATOM_CXX=$CTC_DIR/cross/bin/i686-pc-linux-gnu-g++
export ATOM_CC=$CTC_DIR/cross/bin/i686-pc-linux-gnu-gcc
export ROS_BOOST_ROOT="${CTC_DIR}/sysroot/usr"
export ROS_BOOST_VERSION="1.45.0"
export LD_LIBRARY_PATH= # just to be sure
echo Paths seteados correctamente...

Originally posted by LeonardoLeottau with karma: 58 on 2012-09-10

This answer was ACCEPTED on the original site

Post score: 0

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.