ethz-asl / grid_map_geo

Geolocalization for grid map using GDAL.
BSD 3-Clause "New" or "Revised" License
141 stars 19 forks source link

Error while building grid_map_geo for ROS2 Humble #25

Closed Claudio-Chies closed 11 months ago

Claudio-Chies commented 12 months ago

Hey, i cant seem to build grid_map_geo for ROS2 Humble

Steps to reproduce:

git clone https://github.com/ethz-asl/grid_map_geo.git --branch ros2 ~/ros2_ws/src/grid_map_geo
cd ~/ros2_ws/
source /opt/ros/humble/setup.bash
rosdep update
rosdep install --from-paths src --ignore-src -y
colcon build --cmake-args -DCMAKE_BUILD_TYPE=Release -DCATKIN_ENABLE_TESTING=False --packages-up-to grid_map_geo

Which then throws following Error:

CMake Error at CMakeLists.txt:24 (add_library):
  Target "grid_map_geo" links to target "grid_map_core::grid_map_core" but
  the target was not found.  Perhaps a find_package() call is missing for an
  IMPORTED target, or an ALIAS target is missing?

CMake Error at src/CMakeLists.txt:7 (add_executable):
  Target "test_tif_loader" links to target "grid_map_core::grid_map_core" but
  the target was not found.  Perhaps a find_package() call is missing for an
  IMPORTED target, or an ALIAS target is missing?

CMake Error at /opt/ros/humble/share/ament_cmake_gtest/cmake/ament_add_gtest_executable.cmake:50 (add_executable):
  Target "grid_map_geo-test" links to target "grid_map_core::grid_map_core"
  but the target was not found.  Perhaps a find_package() call is missing for
  an IMPORTED target, or an ALIAS target is missing?
Call Stack (most recent call first):
  /opt/ros/humble/share/ament_cmake_gtest/cmake/ament_add_gtest_executable.cmake:37 (_ament_add_gtest_executable)
  /opt/ros/humble/share/ament_cmake_gtest/cmake/ament_add_gtest.cmake:68 (ament_add_gtest_executable)
  test/CMakeLists.txt:3 (ament_add_gtest)
Ryanf55 commented 11 months ago

This depends on an upstream PR. We're working on taking ownership of grid_map. I'll have a fix shortly.

The new grid_map library in use for ROS 2 will be here: https://github.com/ethz-asl/grid_map

The owners of the original library have not been active on the ROS 2 branches, evident by the lack of responses on PR's targetting those branches or even trivial README updates: https://github.com/ANYbotics/grid_map/pull/404

Claudio-Chies commented 11 months ago

ok, then i'll try with the asl grid_map. thanks

Ryanf55 commented 11 months ago

ok, then i'll try with the asl grid_map. thanks

Sounds good! I'll put you as a reviewer for the PR you need.

Claudio-Chies commented 11 months ago

i was able to build it, see https://github.com/ANYbotics/grid_map/issues/409 for the fixes i had to do on grid_map. but then the PR's there wont probably go anywhere