Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ROS2 foxy, colcon build error #476

Open
adijams01 opened this issue Feb 24, 2024 · 2 comments
Open

ROS2 foxy, colcon build error #476

adijams01 opened this issue Feb 24, 2024 · 2 comments

Comments

@adijams01
Copy link

using
ubuntu 20.04
ROS2 foxy
installed all dependicies with foxy

sudo apt install ros-<ros2-version>-perception-pcl \
  	   ros-<ros2-version>-pcl-msgs \
  	   ros-<ros2-version>-vision-opencv \
  	   ros-<ros2-version>-xacro
sudo add-apt-repository ppa:borglab/gtsam-release-4.1
sudo apt install libgtsam-dev libgtsam-unstable-dev

while doing colcon build

Starting >>> lio_sam 
--- stderr: lio_sam                         
CMake Error at CMakeLists.txt:10 (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.


---
Failed   <<< lio_sam [0.61s, exited with code 1]

Summary: 0 packages finished [2.62s]
  1 package failed: lio_sam
  1 package had stderr output: lio_sam
@rehanTUNI
Copy link

using ubuntu 20.04 ROS2 foxy installed all dependicies with foxy

sudo apt install ros-<ros2-version>-perception-pcl \
  	   ros-<ros2-version>-pcl-msgs \
  	   ros-<ros2-version>-vision-opencv \
  	   ros-<ros2-version>-xacro
sudo add-apt-repository ppa:borglab/gtsam-release-4.1
sudo apt install libgtsam-dev libgtsam-unstable-dev

while doing colcon build

Starting >>> lio_sam 
--- stderr: lio_sam                         
CMake Error at CMakeLists.txt:10 (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.


---
Failed   <<< lio_sam [0.61s, exited with code 1]

Summary: 0 packages finished [2.62s]
  1 package failed: lio_sam
  1 package had stderr output: lio_sam

I believe you forgot to source your ros2 environment. Moreover, replace with your ros2 distribution

@adijams01
Copy link
Author

Thanks for your input,
Ig I did forgot to replace with foxy.
Anyways I shifted with the ROS1 branch and it worked.
Will try with the ROS2 branch soon.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants