Gazebo | Ignition | Community
Ask Your Question
0

Colcon Failure Gazebo11 w ROS2 Foxy

asked 2021-08-27 11:10:37 -0600

Santiago Perez gravatar image

updated 2021-09-03 10:15:04 -0600

Jose Luis Rivero gravatar image

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
edit retag flag offensive close merge delete

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?

Jose Luis Rivero gravatar imageJose Luis Rivero ( 2021-09-03 10:16:52 -0600 )edit

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?

Santiago Perez gravatar imageSantiago Perez ( 2021-09-05 15:29:57 -0600 )edit

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.

Santiago Perez gravatar imageSantiago Perez ( 2021-09-13 17:28:21 -0600 )edit

2 Answers

Sort by ยป oldest newest most voted
0

answered 2021-09-15 11:37:22 -0600

Santiago Perez gravatar image

updated 2021-09-15 11:38:28 -0600

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.

edit flag offensive delete link more
0

answered 2021-09-07 08:40:28 -0600

Teusner gravatar image

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

edit flag offensive delete link more

Comments

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

Santiago Perez gravatar imageSantiago Perez ( 2021-09-07 19:35:34 -0600 )edit

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]
Santiago Perez gravatar imageSantiago Perez ( 2021-09-07 19:43:09 -0600 )edit

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.
Santiago Perez gravatar imageSantiago Perez ( 2021-09-07 19:48:52 -0600 )edit

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

Santiago Perez gravatar imageSantiago Perez ( 2021-09-07 19:49:44 -0600 )edit
Login/Signup to Answer

Question Tools

1 follower

Stats

Asked: 2021-08-27 11:10:37 -0600

Seen: 102 times

Last updated: Sep 15