Ask Your Question
1

Cannot build with catkin_make

asked 2018-07-13 12:29:27 -0500

Hellsgone gravatar image

updated 2018-07-16 04:52:25 -0500

Hi, I am working on the follower demo for TurtleBot 3 Burger and I came across with this problem. I have downloaded the required packages however I cannot build them or it does not allow me to. I tried to run in isolated but that didn't work as well. It has to do something with the cartopgraher. Here is the execution command for that.

ardadenker@ardadenker-VirtualBox:~$ cd ~/catkin_ws && catkin_make
Base path: /home/ardadenker/catkin_ws
Source space: /home/ardadenker/catkin_ws/src
Build space: /home/ardadenker/catkin_ws/build
Devel space: /home/ardadenker/catkin_ws/devel
Install space: /home/ardadenker/catkin_ws/install'
####
#### Running command: "cmake /home/ardadenker/catkin_ws/src -DCATKIN_DEVEL_PREFIX=/home/ardadenker/catkin_ws/devel -DCMAKE_INSTALL_PREFIX=/home/ardadenker/catkin_ws/install -G Unix Makefiles" in "/home/ardadenker/catkin_ws/build"
####
-- Using CATKIN_DEVEL_PREFIX: /home/ardadenker/catkin_ws/devel
-- Using CMAKE_PREFIX_PATH: /home/ardadenker/catkin_ws/devel;/opt/ros/kinetic
-- This workspace overlays: /home/ardadenker/catkin_ws/devel;/opt/ros/kinetic
-- 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/ardadenker/catkin_ws/build/test_results
-- Found gmock sources under '/usr/src/gmock': gmock will be built
-- 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 22 packages in topological order:
-- ~~  - cartographer (plain cmake)
-- ~~  - cartographer_ros_msgs
-- ~~  - turtlebot3 (metapackage)
-- ~~  - turtlebot3_applications (metapackage)
-- ~~  - turtlebot3_follow_filter
-- ~~  - turtlebot3_msgs
-- ~~  - turtlebot3_navigation
-- ~~  - turtlebot3_simulations (metapackage)
-- ~~  - turtlebot3_applications_msgs
-- ~~  - turtlebot3_automatic_parking
-- ~~  - turtlebot3_automatic_parking_vision
-- ~~  - turtlebot3_bringup
-- ~~  - turtlebot3_example
-- ~~  - turtlebot3_fake
-- ~~  - turtlebot3_follower
-- ~~  - turtlebot3_gazebo
-- ~~  - turtlebot3_panorama
-- ~~  - turtlebot3_slam
-- ~~  - turtlebot3_teleop
-- ~~  - cartographer_ros
-- ~~  - cartographer_rviz
-- ~~  - turtlebot3_description
-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
CMake Error at /opt/ros/kinetic/share/catkin/cmake/catkin_workspace.cmake:95 (message):
  This workspace contains non-catkin packages in it, and catkin cannot build
  a non-homogeneous workspace without isolation.  Try the
  'catkin_make_isolated' command instead.
Call Stack (most recent call first):
  CMakeLists.txt:63 (catkin_workspace)


-- Configuring incomplete, errors occurred!
See also "/home/ardadenker/catkin_ws/build/CMakeFiles/CMakeOutput.log".
See also "/home/ardadenker/catkin_ws/build/CMakeFiles/CMakeError.log".
Invoking "cmake" failed
ardadenker@ardadenker-VirtualBox:~/catkin_ws$

**************<<<<<<<<<<<<<<<<<<   And this is when I run isolated>>>>>>>>>>>>>>>>>>>>>>>>******************

ardadenker@ardadenker-VirtualBox:~/catkin_ws$ catkin_make_isolated
Base path: /home/ardadenker/catkin_ws
Source space: /home/ardadenker/catkin_ws/src
Build space: /home/ardadenker/catkin_ws/build_isolated
Devel space: /home/ardadenker/catkin_ws/devel_isolated
Install space: /home/ardadenker/catkin_ws/install_isolated
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
~~  traversing 22 packages in topological order:
~~  - cartographer (plain cmake)
~~  - cartographer_ros_msgs
~~  - cartographer_ros
~~  - cartographer_rviz
~~  - turtlebot3
~~  - turtlebot3_applications
~~  - turtlebot3_applications_msgs
~~  - turtlebot3_automatic_parking
~~  - turtlebot3_automatic_parking_vision
~~  - turtlebot3_description
~~  - turtlebot3_follow_filter
~~  - turtlebot3_follower
~~  - turtlebot3_gazebo
~~  - turtlebot3_msgs
~~  - turtlebot3_bringup
~~  - turtlebot3_example
~~  - turtlebot3_fake
~~  - turtlebot3_navigation
~~  - turtlebot3_panorama
~~  - turtlebot3_simulations
~~  - turtlebot3_slam
~~  - turtlebot3_teleop
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
The packages or cmake arguments have changed, forcing cmake invocation

==> Processing plain cmake package: 'cartographer'
==> cmake /home/ardadenker/catkin_ws/src/cartographer -DCMAKE_INSTALL_PREFIX=/home/ardadenker/catkin_ws/devel_isolated/cartographer -G Unix Makefiles in '/home/ardadenker/catkin_ws/build_isolated/cartographer/devel'
-- Build type: Release
-- Boost version: 1.58.0
-- Found the following Boost libraries:
--   iostreams
--   regex
-- Found required Ceres dependency: Eigen version 3.2.92 in /usr/include/eigen3
-- Found required Ceres dependency: glog
-- Found required Ceres dependency: gflags
-- Found Ceres version: 1.12.0 installed in: /usr with components: [LAPACK, SuiteSparse, SparseLinearAlgebraLibrary, CXSparse, SchurSpecializations, OpenMP]
-- Configuring done
-- Generating done
-- Build files have been written to: /home/ardadenker/catkin_ws/build_isolated/cartographer/devel
==> make -j2 -l2 in '/home ...
(more)
edit retag flag offensive close merge delete

Comments

Can you please format your text using the 101010 button? Right now the output from the terminal is completely unreadable.

jayess gravatar imagejayess ( 2018-07-13 13:09:46 -0500 )edit

I have updated the question, I'm sorry for the frustration I actually tried that but because of all the special characters and spaces it wouldn't work. Just use the link and I'm looking forward to your reply. Thanks :)

Hellsgone gravatar imageHellsgone ( 2018-07-13 13:30:18 -0500 )edit

It's actually quite easy to use once you know how. The easiest way to do it is to paste your code into the text box, highlight it, then press the 101010 button (or press Ctrl-k). We want to have questions be self-contained, and the way to do that is to keep all text/images in the question...

jayess gravatar imagejayess ( 2018-07-13 14:10:13 -0500 )edit

rather than be on an external site which can disappear.

jayess gravatar imagejayess ( 2018-07-13 14:10:34 -0500 )edit

It's my first time using this I apologies for my clumsiness. I understand, thank you for helping sorting the question in a very nice looking way :)

Hellsgone gravatar imageHellsgone ( 2018-07-13 14:32:02 -0500 )edit

No problem.

jayess gravatar imagejayess ( 2018-07-13 14:38:59 -0500 )edit

Try running catkin clean in your catkin_ws and then run a catkin_make. Also install the dependencies mentioned like gflags and glog.

nkhedekar gravatar imagenkhedekar ( 2018-07-13 18:02:20 -0500 )edit

I will try and let you know, thanks for the answer :)

Hellsgone gravatar imageHellsgone ( 2018-07-13 20:11:01 -0500 )edit

2 Answers

Sort by ยป oldest newest most voted
2

answered 2018-07-13 19:06:17 -0500

jayess gravatar image

updated 2018-07-13 20:13:43 -0500

The warning says that your workspace contains non-catkin packages and can't build your workspace without isolation.

This workspace contains non-catkin packages in it, and catkin cannot build
  a non-homogeneous workspace without isolation.  Try the
  'catkin_make_isolated' command instead.

Therefore, remove your build, devel, and install directories from the root of your workspace and do an isolated compile using

cd ~/catkin_ws
rm -rf build/ devel/ install/
catkin_make_isolated

where catkin_ws is whatever you named your workspace.

edit flag offensive delete link more

Comments

I will give this a shot however, could you tell me step by step how to remove those and install the directories. I actually found these type of answers by searching but I'm just confused how to do so.

Hellsgone gravatar imageHellsgone ( 2018-07-13 20:10:12 -0500 )edit

Updating your question with the answers that you found and saying what exactly confused you would be helpful.

jayess gravatar imagejayess ( 2018-07-13 20:19:40 -0500 )edit

I have the same problem and tried your suggestion. The result:

CMake Error: Error: generator : Unix Makefiles
Does not match the generator used previously: Ninja
Either remove the CMakeCache.txt file and CMakeFiles directory or choose a different binary directory.
<== Failed to process package 'cartographer_ros_msgs': 
  Command '['cmake', '/home/alan/spatial3/catkin_ws/src/cartographer_ros/cartographer_ros_msgs', '-DCATKIN_DEVEL_PREFIX=/home/alan/spatial3/catkin_ws/devel_isolated/cartographer_ros_msgs', '-DCMAKE_INSTALL_PREFIX=/home/alan/spatial3/catkin_ws/install_isolated', '

I've been struggling with these problems for two days -- NOTHING WORKS! How can I do a simple compile/link??

Alan8 gravatar imageAlan8 ( 2019-07-17 10:54:50 -0500 )edit

Please don't use a comment to ask a question, it's not the appropriate place for that. Please create a new question and reference this one instead.

jayess gravatar imagejayess ( 2019-07-17 11:55:01 -0500 )edit

Sorry. Replied here for the context.

Alan8 gravatar imageAlan8 ( 2019-07-17 12:22:33 -0500 )edit
0

answered 2018-07-16 00:25:16 -0500

Darby Lim gravatar image

Because The Cartographer packages does not support catkin make, you are supposed to use catkin_make_isolated and install some dependencies. The detailed installation instructions are already uploaded in section SLAM in TurtleBot3 Wiki

I copy and paste it below

$ sudo apt-get install ninja-build libceres-dev libprotobuf-dev protobuf-compiler libprotoc-dev
$ cd ~/catkin_ws/src
$ git clone https://github.com/googlecartographer/cartographer.git
$ git clone https://github.com/googlecartographer/cartographer_ros.git
$ cd ~/catkin_ws
$ src/cartographer/scripts/install_proto3.sh
$ rm -rf protobuf/
$ rosdep install --from-paths src --ignore-src -r -y --os=ubuntu:xenial
$ catkin_make_isolated --install --use-ninja

$ source ~/catkin_ws/install_isolated/setup.bash
$ roslaunch turtlebot3_slam turtlebot3_slam.launch slam_methods:=cartographer
edit flag offensive delete link more

Comments

Thank you for your answer, please check my updated question with the result.

Hellsgone gravatar imageHellsgone ( 2018-07-16 04:53:12 -0500 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

1 follower

Stats

Asked: 2018-07-13 12:29:27 -0500

Seen: 1,874 times

Last updated: Jul 16 '18