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

Autoware.Auto - Config.cmake file not found during colcon build

asked 2020-08-13 14:55:15 -0500

jpalo gravatar image

updated 2020-08-16 00:10:51 -0500

Workstation: Ubuntu 18.4, Docker version: 19.03.12, ROS: ROS2 Dashing

Task: Building Autoware.Auto in a docker container with the instructions from the documentation: https://autowarefoundation.gitlab.io/...

When entering the command "colcon build" the following error message appears before the installation is aborted:

CMake Error at CMakeLists.txt:19 (find_package): By not providing "Findament_cmake_auto.cmake" in CMAKE_MODULE_PATH this project has asked CMake to find a package configuration file provided by "ament_cmake_auto", but CMake did not find one.

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

ament_cmake_autoConfig.cmake
ament_cmake_auto-config.cmake

Add the installation prefix of "ament_cmake_auto" to CMAKE_PREFIX_PATH or set "ament_cmake_auto_DIR" to a directory containing one of the above files. If "ament_cmake_auto" provides a separate development package or SDK, be sure it has been installed.

The installed ROS version is ROS 2 Dashing - installed according to this documentation: https://index.ros.org/doc/ros2/Instal...

Although the error message is very descriptive, I do not think that it would be the right approach to edit any source files from the original autoware code, since that should run "out of the box". From my understanding the path to the requested config files should be in the variable "CMAKE_MODULE_PATH", but the package should do that automatically.

I did make sure to source the ROS2 env setup via source /opt/ros/dashing/setup.bash. Thus all ROS2 packages should be available. What am I missing? Is this a known issue in either ROS2 or Autoware.Auto? Any feedback is welcome.

--update-- I confirmed that ROS2 commands are running in ADE by running a simple sender / listener command. But when trying to source the setup.bash file within ADE I get the error

bash: /home/jpalo/ros2_dashing/install/setup.bash: No such file or directory

But the file is there, and when I am outside of ADE the command works. There might be a reference to this issue https://github.com/ros2/ros2/issues/653.

edit retag flag offensive close merge delete

Comments

1

Regarding my last comment: the problem was solved by un-installing the source installation of ros2 and relying solely on the ros2 environment integrated in ade. The command "which ros2" returns the path that also contains the setup.bash file. The colcon build problem is persistent.

jpalo gravatar image jpalo  ( 2020-08-16 16:44:07 -0500 )edit

It is correct, thank you. I'm using binariy installation ROS2. It works to run"which ros2" before running "colcon build"

joshbushdash gravatar image joshbushdash  ( 2023-03-02 07:36:34 -0500 )edit

1 Answer

Sort by ยป oldest newest most voted
0

answered 2020-08-16 18:21:40 -0500

jpalo gravatar image

Okay, after hours of searching the web and trying various configurations I managed to solve the bug described above. Here is what worked for me:

The cause of the error was a missmatch of the source directory path saved in the package files and the actual installation path of the packages. The reason for this was that I created the binaries (github clone) with the sudo command. This must have set the path to the directory of the root, while they were actually installed in the directory of the current user.

The solution was to give write priviliges for the folder in which the container was to be built (adehome) to the current user.

This allowed the user to clone the src files and run colcon build without the sudo command, therefore eliminating the directory missmatch and the error message described above.

edit flag offensive delete link more

Comments

Sorry, could you elaborate more about this? as I am facing the exact same issue with you. I am working on ROS2 galactic and create a ros user (uid=1000 gid=1000 sudo=no-passwd). The base ros2 image was built by root only autoware is constructed under ros to gain read/write when mounting into container.

Should I rebuild ros2 in ros user or what should I do to fix this issue?

ThomasL624 gravatar image ThomasL624  ( 2022-11-14 21:57:54 -0500 )edit

well, I run printenv | grep ROS and some ROS_VERSION is missed, thus i source it again, and colcon build is fine.

ThomasL624 gravatar image ThomasL624  ( 2022-11-15 00:24:25 -0500 )edit

Question Tools

2 followers

Stats

Asked: 2020-08-13 14:55:15 -0500

Seen: 3,177 times

Last updated: Aug 16 '20