LIO-SAM icon indicating copy to clipboard operation
LIO-SAM copied to clipboard

ROS2 foxy, colcon build error

Open adijams01 opened this issue 1 year ago • 2 comments

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

adijams01 avatar Feb 24 '24 17:02 adijams01

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

rehanTUNI avatar Mar 25 '24 11:03 rehanTUNI

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.

adijams01 avatar Mar 25 '24 13:03 adijams01