Cross-Compiling ROS Melodic on RaspberryPi 3B+ Problem

asked 2019-03-03 16:23:56 -0600

jhill515 gravatar image

After doing some research, I found that there isn't a single "tried-and-true" way of cross-compiling ROS for RaspberryPi. The best I could come up with was downloading /usr, /lib, and /opt from the target device onto my development machine (installed at $HOME/Projects/TargetResources), making a CMake Toolchain file, and calling catkin_make_isolated -DCMAKE_TOOLCHAIN_FILE=.... Though the build process starts, I'm met with an immediate error:

$ catkin_make_isolated -DCMAKE_TOOLCHAIN_FILE=${HOME}/Projects/${MY_PROJ}/RPI3+_Melodic_Toolchain.cmake

CMake Error at ${HOME}/Projects/TargetResources/opt/ros/melodic/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):

${HOME}/Projects/TargetResources/opt/ros/melodic/share/catkin/cmake/tools/rt.cmake:42 (assert_file_exists)

${HOME}/Projects/TargetResources/opt/ros/melodic/share/catkin/cmake/all.cmake:159 (include)

${HOME}/Projects/TargetResources/opt/ros/melodic/share/catkin/cmake/catkinConfig.cmake:20 (include)

CMakeLists.txt:10 (find_package)

After doing some digging, the target device (i.e., RaspberryPi 3+) does not have librt.so. Interestingly enough, if I just run catkin_make for the project on the device, everything builds successfully. So I don't think attempting to install it is really necessary (or the right solution).

Additionally, I should note that the target has ROS Melodic Base installed whereas my development machine has ROS Melodic Desktop installed. I'm not sure if this would cause the issue I'm experiencing, but I don't want to prematurely rule it out.

So, my question is how should I proceed? Did I overlook something whilst setting up the toolchain or am I assuming something about ROS/Catkin that is false?

Thank you in advance for all of your help and consideration.

edit retag flag offensive close merge delete

Comments

Since it's been about a week with only 21 views and no comments or answers, I've decided to cross-post this question to Stack Overflow.

jhill515 gravatar image jhill515  ( 2019-03-09 14:16:02 -0600 )edit