Robotics StackExchange | Archived questions

Colcon Failure Gazebo11 w ROS2 Foxy

Hello I'm new to the terminal in Linux (Ubuntu) and I keep getting this error at step 7 of this tutorial.

I messed up my Ubuntu 20.04 installation 2 days ago and now I keep running into this problem:

:~/ws$ sudo colcon build --symlink-install
Starting >>> camera_calibration_parsers
Starting >>> cv_bridge
Starting >>> gazebo_dev
Starting >>> gazebo_msgs
Starting >>> image_transport
Starting >>> image_geometry
--- stderr: image_geometry            
CMake Error at CMakeLists.txt:4 (find_package):
  By not providing "Findament_cmake_python.cmake" in CMAKE_MODULE_PATH this
  project has asked CMake to find a package configuration file provided by
  "ament_cmake_python", but CMake did not find one.

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

    ament_cmake_pythonConfig.cmake
    ament_cmake_python-config.cmake

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


---
Failed   <<< image_geometry [0.69s, exited with code 1]
Aborted  <<< cv_bridge [0.71s]
Aborted  <<< gazebo_dev [0.71s]
Aborted  <<< camera_calibration_parsers [0.78s]
Aborted  <<< image_transport [0.70s]
Aborted  <<< gazebo_msgs [0.71s]

Summary: 0 packages finished [1.09s]
  1 package failed: image_geometry
  5 packages aborted: camera_calibration_parsers cv_bridge gazebo_dev gazebo_msgs image_transport
  6 packages had stderr output: camera_calibration_parsers cv_bridge gazebo_dev gazebo_msgs image_geometry image_transport
  7 packages not processed

Asked by Santiago Perez on 2021-08-27 11:10:37 UTC

Comments

Two possible problems: did you forget to source /opt/ros/foxy/setup.bash? If you did not, seems like you are missing the ros-foxy-ament-cmake-python package, could be?

Asked by Jose Luis Rivero on 2021-09-03 10:16:52 UTC

Hello Jose Luis. I've sourced it with . ~/ros2_foxy/install/local_setup.bash same as in the tutorial. The ros-foxy-ament-cmake-python-package seems to exist under ~/ros2_foxy. Should I be installing foxy elsewhere? could that be causing the problem? I followed the instructions verbatim prior to 27th august with no issue. Could an Ubuntu update cause this?

Asked by Santiago Perez on 2021-09-05 15:29:57 UTC

I've also tried sourcing it both with setup.bash and local_setup.bash . A curious thing that's happening is that Gazebo builds well enough to run the GUI but not well enough to run the simple exercise that's in the tutorial that literally worked as of 26 Aug. I'm trying to use colcon build one directory up as an experiment since it seems to be building further along. I don't know what changed from 26 -27 Aug but goddamn is it frustrating.

Asked by Santiago Perez on 2021-09-13 17:28:21 UTC

Answers

Maybe you could do a

sudo apt install ros-foxy-ament-cmake-python

in a terminal to install the required ament-cmake-python package for ros-foxy

Asked by Teusner on 2021-09-07 08:40:28 UTC

Comments

Hello. I gave this a shot it installed a newer version but the problem was not resolved. .

Asked by Santiago Perez on 2021-09-07 19:35:34 UTC

I've tried locate:

$ locate ament_cmake_rosConfig.cmake ...:
$ /home/$usr$/ros2_foxy/build/ament_cmake_ros/ament_cmake_core/ament_cmake_rosConfig.cmake
$ /home/$usr$/ros2_foxy/install/ament_cmake_ros/share/ament_cmake_ros/cmake/ament_cmake_rosConfig.cmake

Also tried:

$ locate ament_cmake_ros-config.cmake...
                  [Blank]

Asked by Santiago Perez on 2021-09-07 19:43:09 UTC

I'm thinking this is key to this problem:

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

ament_cmake_rosConfig.cmake
ament_cmake_ros-config.cmake

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

Asked by Santiago Perez on 2021-09-07 19:48:52 UTC

Maybe if I could append CMAKE_PREFIX_PATH I could fix this. I don't know how to do this.

Asked by Santiago Perez on 2021-09-07 19:49:44 UTC

I have the same PRoblem now.

move_request_service_interfaceConfig.cmake move_request_service_interface-config.cmake

does anybody knows how to solve this?

Asked by ema.shkurtaj@yahoo.com on 2023-03-07 17:58:11 UTC

I don't really consider this an answer; I gave up on building Gazebo from source and just installed it from binaries. I still don't know what caused the initial problem or how to solve it. I've seen echoes of similar issues across the internet. I'm sure it would be trivial to solve for more senior UNIX-heads.

Asked by Santiago Perez on 2021-09-15 11:37:22 UTC

Comments