ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question
0

ROS2 foxy base cross compiled on Google coral error tracetools due to rclcpp

asked 2020-08-14 12:48:20 -0500

IMengineer gravatar image

I have installed ROS2 foxy base through cross compilation on a Google coral dev board running mendel (like debian 10 buster) and a standard node works but as soon as I add

find_package(rclcpp REQUIRED)

to the package CMakeLists.txt I get the following error:

mendel@Coral-3:~/osd_ws$ colcon build --packages-select cpp_pubsub --cmake-args " -DTRACETOOLS_DISABLED=ON" Starting >>> cpp_pubsub --- stderr: cpp_pubsub
CMake Error at /home/mendel/ros2_foxy_base_cc_install_aarch64/rcl/share/rcl/cmake/ament_cmake_export_dependencies-extras.cmake:21 (find_package): By not providing "Findtracetools.cmake" in CMAKE_MODULE_PATH this project has asked CMake to find a package configuration file provided by "tracetools", but CMake did not find one.

Could not find a package configuration file provided by "tracetools" with any of the following names:

tracetoolsConfig.cmake
tracetools-config.cmake

Add the installation prefix of "tracetools" to CMAKE_PREFIX_PATH or set "tracetools_DIR" to a directory containing one of the above files. If "tracetools" provides a separate development package or SDK, be sure it has been installed. Call Stack (most recent call first): /home/mendel/ros2_foxy_base_cc_install_aarch64/rcl/share/rcl/cmake/rclConfig.cmake:41 (include) /home/mendel/ros2_foxy_base_cc_install_aarch64/libstatistics_collector/share/libstatistics_collector/cmake/ament_cmake_export_dependencies-extras.cmake:21 (find_package) /home/mendel/ros2_foxy_base_cc_install_aarch64/libstatistics_collector/share/libstatistics_collector/cmake/libstatistics_collectorConfig.cmake:41 (include) /home/mendel/ros2_foxy_base_cc_install_aarch64/rclcpp/share/rclcpp/cmake/ament_cmake_export_dependencies-extras.cmake:21 (find_package) /home/mendel/ros2_foxy_base_cc_install_aarch64/rclcpp/share/rclcpp/cmake/rclcppConfig.cmake:41 (include) CMakeLists.txt:20 (find_package)


Failed <<< cpp_pubsub [3.91s, exited with code 1]

Summary: 0 packages finished [6.58s] 1 package failed: cpp_pubsub 1 package had stderr output: cpp_pubsub

As far as I know, I shouldn't need tracetools, so how can I get rid of this error? Any ideas are welcome. Thank you in advance.

edit retag flag offensive close merge delete

Comments

can you include more information, or link to a tutorial you followed? e.g. how did you cross-compile it exactly?

christophebedard gravatar image christophebedard  ( 2020-08-15 10:23:38 -0500 )edit

1 Answer

Sort by ยป oldest newest most voted
0

answered 2020-08-15 10:18:45 -0500

updated 2020-08-15 10:23:55 -0500

You do need the tracetools package, otherwise you can't compile rclcpp since it's a dependency, as you can see. However, building with -DTRACETOOLS_DISABLED=ON, as you have done, will effectively make tracetools kind of an empty package, but you still need it.

If your intention is to build everything from source, you might not be doing it correctly. Try --packages-up-to instead of --packages-select to make sure to build all dependencies.

edit flag offensive delete link more

Comments

Hello, Christophebedard, and thank you for your answer. I only used --packages-select following the ROS2 tutorial on creating a package to just build that one package and nothing else. My intention is to install a base version of foxy on a Debian 10 buster OS, but a direct build gave me c++ fatal errors, so I tried cross compiling the base packages from source on a Ubuntu 20.04 machine using cross-compilation and then transferring the install_aarch64 file into the coral dev board (as per their example in https://github.com/ros-tooling/cross_...). I then tried to create the package in ROS2 tutorials to check that the ROS2 environment worked, and I got to run a simple node, but as soon as I need rclcpp, it fails because it can't seem to find the necessary trace tools files which on the desktop version live in /opt/ros/foxy/... I ...(more)

IMengineer gravatar image IMengineer  ( 2020-08-15 11:36:49 -0500 )edit

If you can think of a better alternative to build the base ROS2 foxy packages on the Debian 10 buster machine, that would be even better!

For the time being, I will try to follow your suggestion and will let you know if it worked. Have a nice weekend.

IMengineer gravatar image IMengineer  ( 2020-08-15 11:37:01 -0500 )edit

Did you source your Foxy base installation (before building your custom package)? i.e. source install_aarch64/setup.bash

christophebedard gravatar image christophebedard  ( 2020-08-17 19:07:18 -0500 )edit

You might want to try building it all from source directly on the board again (unless it takes too long) and ask another question about the compilation errors you get.

christophebedard gravatar image christophebedard  ( 2020-08-17 19:17:04 -0500 )edit

Hi Christophebedard, I ended up building everything from source directly on the board and it worked. Turns out there were also some issues accessing the packages from the repos file I generated to ensure I only had the ROS2 core packages. Thanks for your help.

IMengineer gravatar image IMengineer  ( 2020-08-21 11:18:02 -0500 )edit

Question Tools

1 follower

Stats

Asked: 2020-08-14 12:48:20 -0500

Seen: 665 times

Last updated: Aug 15 '20