uos / ros2_tutorial

Tutorials for the KBS robotics labs
56 stars 12 forks source link

[Ex2] Failed to Build ceres_localization: robot_localization Package Not Found #1

Open EduardoWS opened 6 months ago

EduardoWS commented 6 months ago

Environment:

Issue Description: I'm encountering an issue when trying to build my workspace with the ceres_localization package. During the colcon build process, the build fails with an error indicating that the robot_localization package configuration file was not found. Below is the error output:

eduardo@berserker:~/ceres_ws$ colcon build
Starting >>> ceres_description
Starting >>> ceres_localization
Starting >>> uos_common_urdf
Starting >>> volksbot_driver
Starting >>> ceres_util
Starting >>> uos_diffdrive_teleop
Starting >>> uos_maps
--- stderr: ceres_localization                                         
CMake Error at CMakeLists.txt:10 (find_package):
  By not providing "Findrobot_localization.cmake" in CMAKE_MODULE_PATH this
  project has asked CMake to find a package configuration file provided by
  "robot_localization", but CMake did not find one.

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

    robot_localizationConfig.cmake
    robot_localization-config.cmake

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

---
Failed   <<< ceres_localization [0.51s, exited with code 1]
Aborted  <<< uos_common_urdf [0.51s]
Aborted  <<< ceres_util [0.53s]
Aborted  <<< uos_maps [0.53s]
Aborted  <<< ceres_description [0.58s]
Aborted  <<< uos_diffdrive_teleop [1.02s]        
Aborted  <<< volksbot_driver [1.31s]                            

Summary: 0 packages finished [1.50s]
  1 package failed: ceres_localization
  6 packages aborted: ceres_description ceres_util uos_common_urdf uos_diffdrive_teleop uos_maps volksbot_driver
  3 packages had stderr output: ceres_localization uos_common_urdf volksbot_driver
  5 packages not processed
amock commented 6 months ago

Hello @EduardoWS ,

it seems that the package "robot_localization" is missing from your system. How to install missing packages is first described in "ex02_gazebo_simulation" - "What to do when packages are missing?". The solution is to enter the following command in the command line:

sudo apt install ros-humble-robot-localization

Conceptionally, the problem remains that ex01 can only be used with the knowledge of ex02. That's not good. Thanks for pointing that out. I will try to find a solution for this soon.