Ask Your Question
0

ROS2 - colcon build fails to find configuration file provided by "ament_cmake"

asked 2020-07-06 09:52:12 -0500

Tortelenny gravatar image

updated 2020-07-07 03:07:32 -0500

gvdhoorn gravatar image

I'm currently doing the ROS2 tutorial on Windows 10: "Creating a workspace" (https://index.ros.org/doc/ros2/Tutori...) using Ros2_foxy. So I'm a beginner.

However, upon trying to build the workspace with colcon, I get the following error:

PS C:\dev_ws\ colcon build - -merge -install 
Starting turtlesim 
--- stderr: turtlesim 
CMake Error at CMakeLists . txt:12 (find_package): 

By not providing "Findament_cmake.cmake" in CMAKE_MODULE_PATH this project has asked CMake to find a package configuration file provided by "ament_cmake", but CMake did not find one. 

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

ament_cmakeConfig.cmake
ament_cmake-config.cmake 

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

It would seem that I need to change my PATH to include the ament files, but I have no idea where to find them. I reinstalled CMake using Chocolatey, but that didn't solve it. And of course I'm sourcing ROS in my terminal.

Any ideas on how to solve this?

edit retag flag offensive close merge delete

Comments

Why did you delete your question?

If you have solved it, please post an answer yourself.

That way we can help future users to avoid this.

gvdhoorn gravatar image gvdhoorn  ( 2020-07-07 03:07:15 -0500 )edit

I deleted it because I have no clue what solved it. I came back into work the next day, tried it again, and it worked. I really don't know why, as I already rebooted the day before as well... I didn't want others wasting their time on my question, so I thought deleting it would be more appropriate in this case. Should I keep it open?

Tortelenny gravatar image Tortelenny  ( 2020-07-07 03:13:38 -0500 )edit

I would still suggest you post that as an answer.

It's not a good one, but it is an answer, and it did 'solve' your problem.

gvdhoorn gravatar image gvdhoorn  ( 2020-07-07 03:15:21 -0500 )edit

1 Answer

Sort by ยป oldest newest most voted
4

answered 2020-11-14 09:22:21 -0500

Akarsh gravatar image

updated 2020-11-14 09:50:48 -0500

Had this problem in ubuntu, I missed environment setup so "source /opt/ros/<distro>/setup.bash" helped.

In windows - call C:\dev\ros2_foxy\install\local_setup.bat might help (not tried though)

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

2 followers

Stats

Asked: 2020-07-06 09:52:12 -0500

Seen: 5,794 times

Last updated: Nov 14 '20