tu-darmstadt-ros-pkg / hector_navigation

hector_navigation provides packages related to navigation of unmanned vehicles in USAR environments.
126 stars 90 forks source link

Help with installing hector_navigation and ceres_catkin #33

Closed KCMercado closed 3 years ago

KCMercado commented 3 years ago

Hi! I am new to ROS and I am trying to create a robot car that can autonomously drive using RPLidar A1 and Hector Slam. I have installed both packages and read that people are using the hector_navigation package to have their robot car autonomously drive to a destination goal.

I tried to clone the hector_navigation repository (noetic devel) but got an error when I did the catkin_make command. The error was that I was missing the cere_catkin package. I was able to find the ceres_catkin package at this link: https://github.com/tu-darmstadt-ros-pkg/ceres_catkin. I once again clone this repository and use the catkin_make command. However, I got another error stating that I was missing the simple_catkin package. I was able to find the simple_catkin package at this link: https://github.com/catkin/catkin_simple. Again, I clone this repository and used catkin_make command. This time, everything looked like it worked!

So I went back and clone the ceres_catkin repository and used catkin_make command. However, I ran into another error during the process. The error was: Invoking "make -j2 -l2" failed

Could anyone please help me to figure out how to get the hector_navigation package? I feel like I am currently in a goose chase. Thank you!!!

In case anyone needs the full code from my terminal here it is:

kenny@kenny-virtual-machine:~/catkin_ws$ catkin_make
Base path: /home/kenny/catkin_ws
Source space: /home/kenny/catkin_ws/src
Build space: /home/kenny/catkin_ws/build
Devel space: /home/kenny/catkin_ws/devel
Install space: /home/kenny/catkin_ws/install
####
#### Running command: "cmake /home/kenny/catkin_ws/src -DCATKIN_DEVEL_PREFIX=/home/kenny/catkin_ws/devel -DCMAKE_INSTALL_PREFIX=/home/kenny/catkin_ws/install -G Unix Makefiles" in "/home/kenny/catkin_ws/build"
####
-- Using CATKIN_DEVEL_PREFIX: /home/kenny/catkin_ws/devel
-- Using CMAKE_PREFIX_PATH: /home/kenny/catkin_ws/devel;/opt/ros/noetic
-- This workspace overlays: /home/kenny/catkin_ws/devel;/opt/ros/noetic
-- Found PythonInterp: /usr/bin/python3 (found suitable version "3.8.5", minimum required is "3") 
-- Using PYTHON_EXECUTABLE: /usr/bin/python3
-- Using Debian Python package layout
-- Using empy: /usr/lib/python3/dist-packages/em.py
-- Using CATKIN_ENABLE_TESTING: ON
-- Call enable_testing()
-- Using CATKIN_TEST_RESULTS_DIR: /home/kenny/catkin_ws/build/test_results
-- Forcing gtest/gmock from source, though one was otherwise available.
-- Found gtest sources under '/usr/src/googletest': gtests will be built
-- Found gmock sources under '/usr/src/googletest': gmock will be built
-- Found PythonInterp: /usr/bin/python3 (found version "3.8.5") 
-- Using Python nosetests: /usr/bin/nosetests3
-- catkin 0.8.8
-- BUILD_SHARED_LIBS is on
-- BUILD_SHARED_LIBS is on
-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-- ~~  traversing 16 packages in topological order:
-- ~~  - catkin_simple
-- ~~  - ceres_catkin
-- ~~  - hector_slam (metapackage)
-- ~~  - hector_slam_launch
-- ~~  - hector_map_tools
-- ~~  - hector_nav_msgs
-- ~~  - hector_geotiff
-- ~~  - hector_geotiff_plugins
-- ~~  - hector_marker_drawing
-- ~~  - hector_compressed_map_transport
-- ~~  - rplidar_ros
-- ~~  - hector_imu_attitude_to_tf
-- ~~  - hector_imu_tools
-- ~~  - hector_map_server
-- ~~  - hector_trajectory_server
-- ~~  - hector_mapping
-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-- +++ processing catkin package: 'catkin_simple'
-- ==> add_subdirectory(catkin_simple)
-- +++ processing catkin package: 'ceres_catkin'
-- ==> add_subdirectory(ceres_catkin)
-- +++ processing catkin metapackage: 'hector_slam'
-- ==> add_subdirectory(hector_slam/hector_slam)
-- +++ processing catkin package: 'hector_slam_launch'
-- ==> add_subdirectory(hector_slam/hector_slam_launch)
-- +++ processing catkin package: 'hector_map_tools'
-- ==> add_subdirectory(hector_slam/hector_map_tools)
-- Using these message generators: gencpp;geneus;genlisp;gennodejs;genpy
-- +++ processing catkin package: 'hector_nav_msgs'
-- ==> add_subdirectory(hector_slam/hector_nav_msgs)
-- Using these message generators: gencpp;geneus;genlisp;gennodejs;genpy
-- hector_nav_msgs: 0 messages, 5 services
-- +++ processing catkin package: 'hector_geotiff'
-- ==> add_subdirectory(hector_slam/hector_geotiff)
-- Using these message generators: gencpp;geneus;genlisp;gennodejs;genpy
-- +++ processing catkin package: 'hector_geotiff_plugins'
-- ==> add_subdirectory(hector_slam/hector_geotiff_plugins)
-- Using these message generators: gencpp;geneus;genlisp;gennodejs;genpy
-- +++ processing catkin package: 'hector_marker_drawing'
-- ==> add_subdirectory(hector_slam/hector_marker_drawing)
-- +++ processing catkin package: 'hector_compressed_map_transport'
-- ==> add_subdirectory(hector_slam/hector_compressed_map_transport)
-- Using these message generators: gencpp;geneus;genlisp;gennodejs;genpy
-- +++ processing catkin package: 'rplidar_ros'
-- ==> add_subdirectory(rplidar_ros)
-- +++ processing catkin package: 'hector_imu_attitude_to_tf'
-- ==> add_subdirectory(hector_slam/hector_imu_attitude_to_tf)
-- Using these message generators: gencpp;geneus;genlisp;gennodejs;genpy
-- +++ processing catkin package: 'hector_imu_tools'
-- ==> add_subdirectory(hector_slam/hector_imu_tools)
-- Using these message generators: gencpp;geneus;genlisp;gennodejs;genpy
-- +++ processing catkin package: 'hector_map_server'
-- ==> add_subdirectory(hector_slam/hector_map_server)
-- Using these message generators: gencpp;geneus;genlisp;gennodejs;genpy
-- +++ processing catkin package: 'hector_trajectory_server'
-- ==> add_subdirectory(hector_slam/hector_trajectory_server)
-- Using these message generators: gencpp;geneus;genlisp;gennodejs;genpy
-- +++ processing catkin package: 'hector_mapping'
-- ==> add_subdirectory(hector_slam/hector_mapping)
-- Using these message generators: gencpp;geneus;genlisp;gennodejs;genpy
-- hector_mapping: 2 messages, 0 services
-- Configuring done
-- Generating done
-- Build files have been written to: /home/kenny/catkin_ws/build
####
#### Running command: "make -j2 -l2" in "/home/kenny/catkin_ws/build"
####
[  1%] Performing configure step for 'ceres_src'
-- Detected Ceres version: 1.12.0 from /home/kenny/catkin_ws/build/ceres_catkin/ceres_src-prefix/src/ceres_src/include/ceres/version.h
-- Found Eigen version 3.3.7: /usr/include/eigen3

   ===============================================================
   Disabling the use of Eigen as a sparse linear algebra library.
   This does not affect the covariance estimation algorithm 
   which can still use the EIGEN_SPARSE_QR algorithm.
   ===============================================================

[  1%] Built target _hector_nav_msgs_generate_messages_check_deps_GetRecoveryInfo
[  1%] Built target std_msgs_generate_messages_nodejs
[  1%] Built target nav_msgs_generate_messages_nodejs
-- Found LAPACK library: /usr/lib/x86_64-linux-gnu/liblapack.so;/usr/lib/x86_64-linux-gnu/libblas.so
[  1%] Built target _hector_nav_msgs_generate_messages_check_deps_GetRobotTrajectory
-- Found BLAS library: /usr/lib/x86_64-linux-gnu/libblas.so
-- Building without SuiteSparse.
-- Building without CXSparse.
   ===============================================================
   Compiling without any sparse library: SuiteSparse, CXSparse 
   & Eigen (Sparse) are all disabled or unavailable.  No sparse 
   linear solvers (SPARSE_NORMAL_CHOLESKY & SPARSE_SCHUR)
   will be available when Ceres is used.
   ===============================================================
-- No preference for use of exported gflags CMake configuration set, and no hints for include/library directories provided. Defaulting to preferring an installed/exported gflags CMake configuration if available.
-- Failed to find installed gflags CMake configuration, searching for gflags build directories exported with CMake.
-- Failed to find an installed/exported CMake configuration for gflags, will perform search for installed gflags components.
-- Failed to find gflags - Could not find gflags include directory, set GFLAGS_INCLUDE_DIR to directory containing gflags/gflags.h
-- Did not find Google Flags (gflags), Building without gflags - no tests or tools will be built!
-- No preference for use of exported glog CMake configuration set, and no hints for include/library directories provided. Defaulting to preferring an installed/exported glog CMake configuration if available.
-- Failed to find installed glog CMake configuration, searching for glog build directories exported with CMake.
-- Failed to find an installed/exported CMake configuration for glog, will perform search for installed glog components.
-- Failed to find glog - Could not find glog include directory, set GLOG_INCLUDE_DIR to directory containing glog/logging.h
CMake Error at CMakeLists.txt:385 (message):
  Can't find Google Log (glog).  Please set either: glog_DIR (newer CMake
  built versions of glog) or GLOG_INCLUDE_DIR & GLOG_LIBRARY or enable
  MINIGLOG option to use minimal glog implementation.

-- Configuring incomplete, errors occurred!
See also "/home/kenny/catkin_ws/build/ceres_catkin/ceres_src-prefix/src/ceres_src-build/CMakeFiles/CMakeOutput.log".
See also "/home/kenny/catkin_ws/build/ceres_catkin/ceres_src-prefix/src/ceres_src-build/CMakeFiles/CMakeError.log".
make[2]: *** [ceres_catkin/CMakeFiles/ceres_src.dir/build.make:108: ceres_catkin/ceres_src-prefix/src/ceres_src-stamp/ceres_src-configure] Error 1
make[1]: *** [CMakeFiles/Makefile2:834: ceres_catkin/CMakeFiles/ceres_src.dir/all] Error 2
make[1]: *** Waiting for unfinished jobs....
[  1%] Built target _hector_nav_msgs_generate_messages_check_deps_GetDistanceToObstacle
make: *** [Makefile:141: all] Error 2
Invoking "make -j2 -l2" failed
Moises981 commented 3 years ago

Hi , did you solve it? , I have the same problem now but in Melodic devel.

StefanFabian commented 3 years ago

You're missing glog_catkin. You may be missing more packages, you can check with rosdep install PACKAGE where PACKAGE is the name of the ros package you're trying to build. This will install all requirements and print errors for the packages it could not install which you will have to find and build from source yourself. Alternatively, you can use rosdep install --from-paths . -i to install the dependencies for all packages in the current directory or a subfolder. The -i tells it to ignore package keys that are available as source in your workspace.

KCMercado commented 3 years ago

@Moises981 Hi! I couldn't solve it but instead took a different route by using ROS's move_base package.

@StefanFabian Hi! Thank you for the tip! I will try to install glog_catkin when I get a chance. Hopefully, it goes well!