Installing a Cross Compiled Bouncy

asked 2018-08-06 07:19:00 -0500

austinstig gravatar image

updated 2018-08-06 08:22:10 -0500

gvdhoorn gravatar image

I successfully built ROS2 Bouncy for ARM following the script and modifications given here: https://github.com/ros2-for-arm/ros2/... and then sourced local_setup.bash to "install" it onto my ARM machine (Pi Zero W running Arch Linux). Does anyone know how to install a cross-compile for ARM? I get as output from the bash script this (even though all those files do exist!)

not found: "/opt/ros2/ament_index_cpp/share/ament_index_cpp/local_setup.sh"
not found: "/opt/ros2/ament_index_cpp/share/ament_index_cpp/local_setup.bash"
not found: "/opt/ros2/ament_cmake_core/share/ament_cmake_core/local_setup.sh"
not found: "/opt/ros2/ament_cmake_core/share/ament_cmake_core/local_setup.bash"
not found: "/opt/ros2/ament_cmake_export_definitions/share/ament_cmake_export_definitions/local_setup.sh"
not found: "/opt/ros2/ament_cmake_export_definitions/share/ament_cmake_export_definitions/local_setup.bash"
not found: "/opt/ros2/ament_cmake_export_include_directories/share/ament_cmake_export_include_directories/local_setup.sh"
not found: "/opt/ros2/ament_cmake_export_include_directories/share/ament_cmake_export_include_directories/local_setup.bash"
not found: "/opt/ros2/ament_cmake_export_libraries/share/ament_cmake_export_libraries/local_setup.sh"
not found: "/opt/ros2/ament_cmake_export_libraries/share/ament_cmake_export_libraries/local_setup.bash"
not found: "/opt/ros2/ament_cmake_export_interfaces/share/ament_cmake_export_interfaces/local_setup.sh"
not found: "/opt/ros2/ament_cmake_export_interfaces/share/ament_cmake_export_interfaces/local_setup.bash"
not found: "/opt/ros2/ament_cmake_export_link_flags/share/ament_cmake_export_link_flags/local_setup.sh"
not found: "/opt/ros2/ament_cmake_export_link_flags/share/ament_cmake_export_link_flags/local_setup.bash"
not found: "/opt/ros2/ament_cmake_include_directories/share/ament_cmake_include_directories/local_setup.sh"
not found: "/opt/ros2/ament_cmake_include_directories/share/ament_cmake_include_directories/local_setup.bash"
not found: "/opt/ros2/ament_cmake_libraries/share/ament_cmake_libraries/local_setup.sh"
not found: "/opt/ros2/ament_cmake_libraries/share/ament_cmake_libraries/local_setup.bash"
not found: "/opt/ros2/ament_cmake_export_dependencies/share/ament_cmake_export_dependencies/local_setup.sh"
not found: "/opt/ros2/ament_cmake_export_dependencies/share/ament_cmake_export_dependencies/local_setup.bash"
not found: "/opt/ros2/ament_cmake_python/share/ament_cmake_python/local_setup.sh"
not found: "/opt/ros2/ament_cmake_python/share/ament_cmake_python/local_setup.bash"
not found: "/opt/ros2/ament_cmake_target_dependencies/share/ament_cmake_target_dependencies/local_setup.sh"
not found: "/opt/ros2/ament_cmake_target_dependencies/share/ament_cmake_target_dependencies/local_setup.bash"
not found: "/opt/ros2/ament_cmake_test/share/ament_cmake_test/local_setup.sh"
not found: "/opt/ros2/ament_cmake_test/share/ament_cmake_test/local_setup.bash"
not found: "/opt/ros2/ament_cmake/share/ament_cmake/local_setup.sh"
not found: "/opt/ros2/ament_cmake/share/ament_cmake/local_setup.bash"
not found: "/opt/ros2/ament_cmake_auto/share/ament_cmake_auto/local_setup.sh"
not found: "/opt/ros2/ament_cmake_auto/share/ament_cmake_auto/local_setup.bash"
not found: "/opt/ros2/ament_cmake_clang_format/share/ament_cmake_clang_format/local_setup.sh"
not found: "/opt/ros2/ament_cmake_clang_format/share/ament_cmake_clang_format/local_setup.bash"
not found: "/opt/ros2/ament_cmake_copyright/share/ament_cmake_copyright/local_setup.sh"
not found: "/opt/ros2/ament_cmake_copyright/share/ament_cmake_copyright/local_setup.bash"
not found: "/opt/ros2/ament_cmake_cppcheck/share/ament_cmake_cppcheck/local_setup.sh"
not found: "/opt/ros2/ament_cmake_cppcheck/share/ament_cmake_cppcheck/local_setup.bash"
not found: "/opt/ros2/ament_cmake_cpplint/share/ament_cmake_cpplint/local_setup.sh"
not found: "/opt/ros2/ament_cmake_cpplint/share/ament_cmake_cpplint/local_setup.bash"
not found: "/opt/ros2/ament_cmake_flake8/share/ament_cmake_flake8/local_setup.sh"
not found: "/opt/ros2/ament_cmake_flake8/share/ament_cmake_flake8/local_setup.bash"
not found: "/opt/ros2/ament_cmake_lint_cmake/share/ament_cmake_lint_cmake/local_setup.sh"
not found: "/opt/ros2/ament_cmake_lint_cmake/share/ament_cmake_lint_cmake/local_setup.bash"
not found: "/opt/ros2/ament_cmake_nose/share/ament_cmake_nose/local_setup.sh"
not found: "/opt/ros2/ament_cmake_nose/share/ament_cmake_nose/local_setup.bash"
not found: "/opt/ros2/ament_cmake_pytest/share/ament_cmake_pytest/local_setup.sh"
not found: "/opt/ros2/ament_cmake_pytest/share/ament_cmake_pytest/local_setup.bash"
not found: "/opt/ros2/ament_cmake_ros/share/ament_cmake_ros/local_setup.sh"
not found: "/opt/ros2/ament_cmake_ros/share/ament_cmake_ros/local_setup.bash"
not found: "/opt/ros2/ament_lint_auto ...
(more)
edit retag flag offensive close merge delete

Comments

1

When you say the file exists, do you mean that they are indeed at the same path? I think this file is generated depending on the host machine where you cross compiled. I did not had a proper look at it as I am using LD_LIBRARY_PATH to specify the path to the libs

pokitoz gravatar image pokitoz  ( 2018-08-06 07:42:47 -0500 )edit

To install the libraries to your target, you can use:

cp `find . -name "*.so*"` <destination_folder>
pokitoz gravatar image pokitoz  ( 2018-08-06 07:52:39 -0500 )edit

Hi @pokitoz I did:

export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/lib

I made sure /lib has all the has all of the *.so files that were created in the install directory. I moved all the binaries to /bin when I call$ros2 I get an error "ros2cli distribution was not found and is required by the applic

austinstig gravatar image austinstig  ( 2018-08-06 10:50:45 -0500 )edit

*application. It looks like a python traceback.

austinstig gravatar image austinstig  ( 2018-08-06 10:51:00 -0500 )edit

I'm currently trying to modify the DESTDIR variable in the cross-compile cmake and rebuild to see if that helps. This is my first experience with cross-compiling and cmake.

austinstig gravatar image austinstig  ( 2018-08-06 10:52:01 -0500 )edit
1

I got the LD_LIBRARY_PATH to work. It looks like the ros2 command line program isn't working. I suspect that's because rclpy is ignored in the build for arm.

austinstig gravatar image austinstig  ( 2018-08-06 14:55:59 -0500 )edit