# Hector_navigaton on ROS Melodic error

I'm a newbie on robotics, and currently, I'm working on a project to make an autonomous robot that can mapping the surrounding environment and decide the shortest route towards the goal while avoiding the obstacles along the way. The sensor that I used for this project is RPLidar A1M8. I'm working using Ubuntu Mate 18.04 on my Raspberry Pi, but right now I'm testing it using my computer.

I use the hector_slam for mapping, and everything works fine. After that, I try to clone the hector_navigation from https://github.com/tu-darmstadt-ros-pkg/hector_navigation on my catkin workspace, but there's the problem began. When I try to catkin_make, the system found an error in the CMakeLists file. The error I'm getting is below

-- +++ processing catkin package: 'hector_gps_calibration' -- ==> add_subdirectory(hector_navigation/hector_gps_calibration) -- Using these message generators: gencpp;geneus;genlisp;gennodejs;genpy CMake Error at /home/foriansyah/catkin_ws/devel/share/ceres_catkin/cmake/ceres_catkinConfig.cmake:173 (message): Project 'hector_gps_calibration' tried to find library 'ceres'. The library is neither a target nor built/installed properly. Did you compile project 'ceres_catkin'? Did you find_package() it before the subdirectory containing its code is included? Call Stack (most recent call first): /opt/ros/melodic/share/catkin/cmake/catkinConfig.cmake:76 (find_package) hector_navigation/hector_gps_calibration/CMakeLists.txt:10 (find_package)

-- Configuring incomplete, errors occurred! See also "/home/foriansyah/catkin_ws/build/CMakeFiles/CMakeOutput.log". See also "/home/foriansyah/catkin_ws/build/CMakeFiles/CMakeError.log". Makefile:4632: recipe for target 'cmake_check_build_system' failed make: * [cmake_check_build_system] Error 1 Invoking "make cmake_check_build_system" failed


What should I do about this? Any references that maybe I can use for this problem? Thank in advance.

• i also tried your solution sir franky, but i kept getting the same error. Which part should i add into the ceres_catkin so that it can read the glog? – Chronz Nov 27 '20 at 5:50

Actually, the HECTOR_NAVIGATION package depends on other packages and one of them is ceres_catkin (https://github.com/tu-darmstadt-ros-pkg/ceres_catkin) which you need to clone and build in your catkin workspace. However, this ceres_catkin further depends on catkin_simple (https://github.com/catkin/catkin_simple), glog_catkin (https://github.com/ethz-asl/glog_catkin), gflags(https://github.com/gflags/gflags/blob/master/INSTALL.md).

After you clone all these in your workspace, I would recommend to run, >>sudo apt-get install python-catkin-tools python-rosdep

and then from your catkin workspace >> rosdep install -r -y --from-paths src --ignore-src that will install all the missing dependencies of your catkin workspace packages.

Once you are done with the above, then try to run catkin_make.

• Hi, thanks for your answer. I try to follow your instructions above, but there's still an error on my catkin_make.The error I'm getting is below, Project 'ceres_catkin' tried to find library 'glog'. The library is neither a target nor built/installed properly. Did you compile project 'glog_catkin'? Did you find_package() it before the subdirectory containing its code is included? What should I do with this? – Chris Putra Nov 24 '20 at 6:40
• You have to add your catkin workspace include folder in CMakeLists.txt of ceres_catkin package since glog is build in your catkin workspace. Edit the line like this include_directories(include \${Eigen_INCLUDE_DIRS}) And please accept the answer if it all works. – Franky Nov 24 '20 at 10:29