How to cross-compile ros-pkg for arm
Hello. Due to using the armel, I install the ros from the source. Now the roscore can run on the arm succesfully. The ROS packages are compiled directly on board. I want to cross-compile it. But the eros seems to have been abandoned. So I do as the following: Create the cmakelists.txt
cmake_minimum_required(VERSION 2.4.6)
include($ENV{ROS_ROOT}/core/rosbuild/rostoolchain.cmake)
set(CMAKE_SYSTEM_NAME Linux)
set(CMAKE_C_COMPILER /opt/usr/local/gcc-4.6.2-glibc-2.13-linaro-multilib-2011.12/fsl-linaro-toolchain/bin/arm-linux-gcc)
set(CMAKE_CXX_COMPILER /opt/usr/local/gcc-4.6.2-glibc-2.13-linaro-multilib-2011.12/fsl-linaro-toolchain/bin/arm-linux-g++)
set(CMAKE_FIND_ROOT_PATH /opt/usr/local/gcc-4.6.2-glibc-2.13-linaro-multilib-2011.12/fsl-linaro-toolchain)
set(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM BOTH)
set(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY)
set(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY)
set(EXECUTABLE_OUTPUT_PATH ${PROJECT_SOURCE_DIR}/bin)
set(LIBRARY_OUTPUT_PATH ${PROJECT_SOURCE_DIR}/lib)
ADD_EXECUTABLE(mrobot_driver src/mrobot_driver.cpp src/mrobot_comms.c)
SET(BOOST_ROOT /usr/include/boost)
than :
$ camke .
$ make
I got the error messages:
Building CXX object CMakeFiles/mrobot_driver.dir/src/mrobot_driver.o
In file included from /opt/ros/hydro/include/ros/ros.h:38:0,
from /home/znzx/cmake/ros/mrobot_driver1/src/mrobot_driver.h:40,
from /home/znzx/cmake/ros/mrobot_driver1/src/mrobot_driver.cpp:40:
/opt/ros/hydro/include/ros/time.h:58:50: fatal error: boost/math/special_functions/round.hpp: No such file or directory
compilation terminated.
make[2]: *** [CMakeFiles/mrobot_driver.dir/src/mrobot_driver.o] Error 1
make[1]: *** [CMakeFiles/mrobot_driver.dir/all] Error 2
make: *** [all] Error 2
While , boost/math/special_functions/round.hpp does exists. And the path of boost is right. Is the method of cross_compiling correct? Please help me.thank you very much.