Ask Your Question

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:

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:


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:

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

edit retag flag offensive close merge delete


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

1 Answer

Sort by ยป oldest newest most voted

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

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

1 follower


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

Seen: 881 times

Last updated: Aug 16 '20