Boeing / modular_cartographer

Other
10 stars 9 forks source link

Googletest setup instructions #2

Open mitchallain opened 2 years ago

mitchallain commented 2 years ago

Thanks for releasing this work.

Question regarding the build process: can you explain your googletest package setup? The string googletest is not a rosdep key, which leads me to believe that you are using a catkin-ized version of the source code for googletest?

I am able to build with tests disabled, but had a little trouble linking my system install of gtest against this package. For instance,

[build] Found '101' packages in 0.0 seconds.
[build] Updating package table.
Starting  >>> catkin_tools_prebuild
Finished  <<< catkin_tools_prebuild                [ 1.8 seconds ]
Starting  >>> cartographer_ros_msgs
Finished  <<< cartographer_ros_msgs                [ 3.9 seconds ]
Starting  >>> cartographer_ros
_____________________________________________________________________________________________________________________________________________
Errors     << cartographer_ros:cmake /home/mallain/catkin_ws/logs/cartographer_ros/build.cmake.000.log
CMake Error at /opt/ros/melodic/share/catkin/cmake/catkinConfig.cmake:83 (find_package):
  Could not find a package configuration file provided by "googletest" with
  any of the following names:

    googletestConfig.cmake
    googletest-config.cmake

  Add the installation prefix of "googletest" to CMAKE_PREFIX_PATH or set
  "googletest_DIR" to a directory containing one of the above files.  If
  "googletest" provides a separate development package or SDK, be sure it has
  been installed.
Call Stack (most recent call first):
  CMakeLists.txt:140 (find_package)

cd /home/mallain/catkin_ws/build/cartographer_ros; catkin build --get-env cartographer_ros | catkin env -si  /usr/bin/cmake /home/mallain/catkin_ws/src/modular_cartographer/cartographer_ros --no-warn-unused-cli -DCATKIN_DEVEL_PREFIX=/home/mallain/catkin_ws/devel/.private/cartographer_ros -DCMAKE_INSTALL_PREFIX=/home/mallain/catkin_ws/install; cd -
.............................................................................................................................................
mitchallain commented 2 years ago

Looks like the file src/metrics/internal/metrics_test.cc needs to be ommitted from SRC_FILES in CMakeLists.txt, since it needs to be linked against GTest.

https://github.com/Boeing/modular_cartographer/blob/b397a59feb7107be16715427b5440a71bb2d0490/cartographer_ros/CMakeLists.txt#L191

brta-mszarski commented 2 years ago

Hi @MitchAllain, you are correct about the catkinization. We are planning to release an updated code drop shortly which will improve documentation and fix the build. Thanks for your interest, and stay tuned!

Nobreakfast commented 1 year ago

Hi @mitchallain, you are correct about the catkinization. We are planning to release an updated code drop shortly which will improve documentation and fix the build. Thanks for your interest, and stay tuned!

Hi, like your work. Could you specify the instruction of this repo, as there's no launch file. It cannot provide base_link -> odom transform in this example https://google-cartographer-ros.readthedocs.io/en/latest/demos.html .

Could you help me?

jkl100 commented 4 months ago

Hi @mitchallain, you are correct about the catkinization. We are planning to release an updated code drop shortly which will improve documentation and fix the build. Thanks for your interest, and stay tuned!

Hello, has the code been updated?