ROS on Raspberry PI
Hi. I want to run my own ros node on a raspberry pi which is running a Ubiquity distro . I have a ubuntu here to cross compile my ros node. I am able to cross compile a hello world example without any problems. But when i try to integrate a ros part i always got an error. I use cmake and the following CMakeLIsts.txt file
cmake_minimum_required(VERSION 2.8.3)
project(hello_world)
set(CMAKE_THREAD_PREFER_PTHREAD TRUE)
find_package(Threads REQUIRED)
## Find catkin and any catkin packages
find_package(catkin REQUIRED COMPONENTS
roscpp)
## Declare ROS messages and services
##add_message_files(DIRECTORY msg FILES Num.msg)
##add_service_files(DIRECTORY srv FILES AddTwoInts.srv)
## Generate added messages and services
##generate_messages(DEPENDENCIES std_msgs)
## Declare a catkin package
catkin_package(CATKIN_DEPENDS roscpp)
##set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11 -Wall -Werror -pthread")
set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11 -pthread")
set (CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS}")
include_directories(include ${catkin_INCLUDE_DIRS})
add_executable(hello_world ../src/main.cpp)
target_link_libraries(hello_world ${catkin_LIBRARIES})
##target_link_libraries(hello_world)
But i always got the following error:
-- Found gtest sources under '/usr/src/gtest': gtests will be built
-- Using Python nosetests: /usr/bin/nosetests-2.7
CMake Error at /opt/ros/kinetic/share/catkin/cmake/assert.cmake:17 (message):
Assertion failed: check for file existence, but filename
(RT_LIBRARY-NOTFOUND) unset. Message: RT Library
Call Stack (most recent call first):
/opt/ros/kinetic/share/catkin/cmake/tools/rt.cmake:42 (assert_file_exists)
/opt/ros/kinetic/share/catkin/cmake/all.cmake:147 (include)
/opt/ros/kinetic/share/catkin/cmake/catkinConfig.cmake:20 (include)
CMakeLists.txt:8 (find_package)
-- Configuring incomplete, errors occurred!
Does anybody knows what to do?
What is your linx distro on raspberry ? Why do you need to cross compile on your desktop for the raspberry ?
@Vincent R : It can be useful when your compilation takes a lot of time on your raspberry (in my case sometimes the compilation even fails one time out of two so it's a really good alternative)