Troubleshoot CMake Error

asked 2018-04-22 15:46:55 -0600

cipher813 gravatar image

updated 2018-04-22 17:55:17 -0600

Hello,

I am trying to set up the Quadrotor indoor SLAM demo on Ubuntu 16.04 and kinetic, and am running into a variety of issues.

Firstly, the ROS package repo does not seem to contain the sudo apt-get install ros-hydro-hector-quadrotor-demo package specified on the page.

Proceeding to install from source, I follow the directions as follows:

mkdir ~/hector_quadrotor_tutorial

cd ~/hector_quadrotor_tutorial

wstool init src https://raw.github.com/tu-darmstadt-ros-pkg/hector_quadrotor/hydro-devel/tutorials.rosinstall

catkin_make

Running catkin_make generates the following error:

Base path: /home/cipher813/hector_quadrotor_tutorial
Source space: /home/cipher813/hector_quadrotor_tutorial/src
Build space: /home/cipher813/hector_quadrotor_tutorial/build
Devel space: /home/cipher813/hector_quadrotor_tutorial/devel
Install space: /home/cipher813/hector_quadrotor_tutorial/install
Creating symlink "/home/cipher813/hector_quadrotor_tutorial/src/CMakeLists.txt" pointing to "/opt/ros/kinetic/share/catkin/cmake/toplevel.cmake"
####
#### Running command: "cmake /home/cipher813/hector_quadrotor_tutorial/src -DCATKIN_DEVEL_PREFIX=/home/cipher813/hector_quadrotor_tutorial/devel -DCMAKE_INSTALL_PREFIX=/home/cipher813/hector_quadrotor_tutorial/install -G Unix Makefiles" in "/home/cipher813/hector_quadrotor_tutorial/build"
####
-- The C compiler identification is GNU 5.4.0
-- The CXX compiler identification is GNU 5.4.0
-- Check for working C compiler: /usr/bin/cc
-- Check for working C compiler: /usr/bin/cc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Detecting C compile features
-- Detecting C compile features - done
-- Check for working CXX compiler: /usr/bin/c++
-- Check for working CXX compiler: /usr/bin/c++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Using CATKIN_DEVEL_PREFIX: /home/cipher813/hector_quadrotor_tutorial/devel
-- Using CMAKE_PREFIX_PATH: /home/cipher813/catkin_ws/devel;/opt/ros/kinetic
-- This workspace overlays: /home/cipher813/catkin_ws/devel;/opt/ros/kinetic
-- Found PythonInterp: /usr/bin/python (found version "2.7.12") 
-- Using PYTHON_EXECUTABLE: /usr/bin/python
-- Using Debian Python package layout
-- Using empy: /usr/bin/empy
-- Using CATKIN_ENABLE_TESTING: ON
-- Call enable_testing()
-- Using CATKIN_TEST_RESULTS_DIR: /home/cipher813/hector_quadrotor_tutorial/build/test_results
-- Found gmock sources under '/usr/src/gmock': gmock will be built
-- Looking for pthread.h
-- Looking for pthread.h - found
-- Looking for pthread_create
-- Looking for pthread_create - not found
-- Looking for pthread_create in pthreads
-- Looking for pthread_create in pthreads - not found
-- Looking for pthread_create in pthread
-- Looking for pthread_create in pthread - found
-- Found Threads: TRUE  
-- Found gtest sources under '/usr/src/gmock': gtests will be built
-- Using Python nosetests: /usr/bin/nosetests-2.7
-- catkin 0.7.11
-- BUILD_SHARED_LIBS is on
-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-- ~~  traversing 37 packages in topological order:
-- ~~  - hector_components_description
-- ~~  - hector_gazebo (metapackage)
-- ~~  - hector_gazebo_worlds
-- ~~  - hector_localization (metapackage)
-- ~~  - hector_models (metapackage)
-- ~~  - hector_quadrotor
-- ~~  - hector_quadrotor_demo
-- ~~  - hector_quadrotor_description
-- ~~  - hector_sensors_description
-- ~~  - hector_sensors_gazebo
-- ~~  - hector_slam (metapackage)
-- ~~  - hector_slam_launch
-- ~~  - hector_xacro_tools
-- ~~  - hector_uav_msgs
-- ~~  - hector_map_tools
-- ~~  - hector_nav_msgs
-- ~~  - hector_geotiff
-- ~~  - hector_geotiff_plugins
-- ~~  - hector_marker_drawing
-- ~~  - hector_quadrotor_controller
-- ~~  - hector_quadrotor_controller_gazebo
-- ~~  - hector_quadrotor_model
-- ~~  - hector_quadrotor_teleop
-- ~~  - hector_compressed_map_transport
-- ~~  - hector_gazebo_plugins
-- ~~  - hector_imu_attitude_to_tf
-- ~~  - hector_imu_tools
-- ~~  - hector_map_server
-- ~~  - hector_pose_estimation_core
-- ~~  - hector_pose_estimation
-- ~~  - hector_quadrotor_gazebo_plugins
-- ~~  - hector_quadrotor_pose_estimation
-- ~~  - hector_trajectory_server
-- ~~  - message_to_tf
-- ~~  - hector_mapping
-- ~~  - hector_gazebo_thermal_camera
-- ~~  - hector_quadrotor_gazebo
-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-- +++ processing catkin package: 'hector_components_description'
-- ==> add_subdirectory(hector_models/hector_components_description)
-- +++ processing catkin metapackage: 'hector_gazebo'
-- ==> add_subdirectory(hector_gazebo/hector_gazebo)
-- +++ processing catkin package: 'hector_gazebo_worlds'
-- ==> add_subdirectory(hector_gazebo/hector_gazebo_worlds)
-- +++ processing catkin metapackage: 'hector_localization'
-- ==> add_subdirectory(hector_localization/hector_localization)
-- +++ processing catkin metapackage: 'hector_models'
-- ==> add_subdirectory(hector_models/hector_models)
-- +++ processing catkin package: 'hector_quadrotor'
-- ==> add_subdirectory(hector_quadrotor/hector_quadrotor)
-- +++ processing catkin package: 'hector_quadrotor_demo'
-- ==> add_subdirectory(hector_quadrotor/hector_quadrotor_demo)
-- +++ processing catkin package: 'hector_quadrotor_description'
-- ==> add_subdirectory(hector_quadrotor/hector_quadrotor_description)
-- +++ processing catkin package: 'hector_sensors_description'
-- ==> add_subdirectory(hector_models/hector_sensors_description)
-- +++ processing catkin package: 'hector_sensors_gazebo'
-- ==> add_subdirectory ...
(more)
edit retag flag offensive close merge delete

Comments

You posted the wrong CMakeLists.txt... for anyone to help they would need to see this one: hector_quadrotor/hector_quadrotor_controller/CMakeLists.txt. From the errors, it looks like you have at least 2 problems. (1) you are missing the hardware_interface

jarvisschultz gravatar imagejarvisschultz ( 2018-04-22 17:58:34 -0600 )edit

package (may be possible to install from apt-get) (2) the version of hector_slam that you're using isn't finding Eigen properly.

jarvisschultz gravatar imagejarvisschultz ( 2018-04-22 18:00:22 -0600 )edit

What version of ROS are you using? On 16.04, it would seem likely you are on Kinetic (or at least not Hydro). Following directions for the wrong version of ROS is generally not a great idea. You definitely won't find ros-hydro-hector-quadrotor-demo if you are on 16.04. You could try installing...

jarvisschultz gravatar imagejarvisschultz ( 2018-04-22 18:02:50 -0600 )edit

... the hector quadrotor packages for your version of ROS from apt-get. E.g. sudo apt-get install ros-kinetic-hector-quadrotor. Easier than building from source if you don't have a good reason to build from source.

jarvisschultz gravatar imagejarvisschultz ( 2018-04-22 18:03:58 -0600 )edit

It looks like there were several dependencies that I was missing, rectified with sudo apt-get install ros-kinetic-<package> including hardware_interface controller-interface geographic_msgs gazebo-ros-pkgs gazebo-ros-control. Was able to load after dependencies installed - thanks!

cipher813 gravatar imagecipher813 ( 2018-04-22 20:39:31 -0600 )edit

And to clarify, there was no apt-get version of the sorftware so building from source was required. And am using kinetic on ubuntu 16.04.

cipher813 gravatar imagecipher813 ( 2018-04-22 20:40:15 -0600 )edit

@cipher813: installing dependencies manually is not the recommend way to do this.

Please see #q252478 for the general workflow and the use of rosdep.

gvdhoorn gravatar imagegvdhoorn ( 2018-04-23 01:01:33 -0600 )edit