0
$\begingroup$

Rosanswers logo

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.

This code block was moved to the following github gist: https://gist.github.com/answers-se-migration-openrobotics/c03ab810301ec26d4141e1238d2ff5ff

Any clues? I am fairly new to ROS so any help will be appreciated. I am using Ubuntu 16.04 Xenial and ros kinetic

Update: I have tried what @jayess suggested unfortunately it did not work. Here is the result, in short.

   ==> Generating an env.sh
<== Finished processing package [1 of 22]: 'cartographer'

==> Processing catkin package: 'cartographer_ros_msgs'
==> Building with env: '/home/ardadenker/catkin_ws/devel_isolated/cartographer/env.sh'
==> cmake /home/ardadenker/catkin_ws/src/cartographer_ros/cartographer_ros_msgs -DCATKIN_DEVEL_PREFIX=/home/ardadenker/catkin_ws/devel_isolated/cartographer_ros_msgs -DCMAKE_INSTALL_PREFIX=/home/ardadenker/catkin_ws/install_isolated -G Unix Makefiles in '/home/ardadenker/catkin_ws/build_isolated/cartographer_ros_msgs'
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 '['/home/ardadenker/catkin_ws/devel_isolated/cartographer/env.sh', 'cmake', '/home/ardadenker/catkin_ws/src/cartographer_ros/cartographer_ros_msgs', '-DCATKIN_DEVEL_PREFIX=/home/ardadenker/catkin_ws/devel_isolated/cartographer_ros_msgs', '-DCMAKE_INSTALL_PREFIX=/home/ardadenker/catkin_ws/install_isolated', '-G', 'Unix Makefiles']' returned non-zero exit status 1

Reproduce this error by running:
==> cd /home/ardadenker/catkin_ws/build_isolated/cartographer_ros_msgs && /home/ardadenker/catkin_ws/devel_isolated/cartographer/env.sh cmake /home/ardadenker/catkin_ws/src/cartographer_ros/cartographer_ros_msgs -DCATKIN_DEVEL_PREFIX=/home/ardadenker/catkin_ws/devel_isolated/cartographer_ros_msgs -DCMAKE_INSTALL_PREFIX=/home/ardadenker/catkin_ws/install_isolated -G 'Unix Makefiles'

Command failed, exiting.
ardadenker@ardadenker-VirtualBox:~/catkin_ws$

Update: I have tried what @nikhil364 said by using catkin clean in catkin_ws, however it tells me this,

 [clean] Error: The current or desired workspace could not be determined. Please run `catkin clean` from within a catkin workspace or specify the workspace explicitly with the `--workspace` option.

After this I tried running catkin clean --all since I didn't know which workspace to write and how so if you could tell me using 101010 that would be fantastic. Still the result is same. Should I delete the cartographer packages if so how can I do it and how to reinstall again, sorry for being too beginner like but I can't deny I am new to this and this way it would be less confusing trying to find the commands. Thank you for your understanding and looking forward to your further analysis on this problem.



Update: I was pretty sure I did what @DarbyLim said because I follow the emanuel but I gave it another go and the result is pretty much the same. I really want to use the follower demo but this is so frustrating.

This code block was moved to the following github gist: https://gist.github.com/answers-se-migration-openrobotics/7bdd9aba17f6ac2a948e68995b15cee5

However, when I run catkin_make_isolated again, the same result comes up.

==> Generating an env.sh
<== Finished processing package [1 of 22]: 'cartographer'

==> Processing catkin package: 'cartographer_ros_msgs'
==> Building with env: '/home/ardadenker/catkin_ws/devel_isolated/cartographer/env.sh'
==> cmake /home/ardadenker/catkin_ws/src/cartographer_ros/cartographer_ros_msgs -DCATKIN_DEVEL_PREFIX=/home/ardadenker/catkin_ws/devel_isolated/cartographer_ros_msgs -DCMAKE_INSTALL_PREFIX=/home/ardadenker/catkin_ws/install_isolated -G Unix Makefiles in '/home/ardadenker/catkin_ws/build_isolated/cartographer_ros_msgs'
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 '['/home/ardadenker/catkin_ws/devel_isolated/cartographer/env.sh', 'cmake', '/home/ardadenker/catkin_ws/src/cartographer_ros/cartographer_ros_msgs', '-DCATKIN_DEVEL_PREFIX=/home/ardadenker/catkin_ws/devel_isolated/cartographer_ros_msgs', '-DCMAKE_INSTALL_PREFIX=/home/ardadenker/catkin_ws/install_isolated', '-G', 'Unix Makefiles']' returned non-zero exit status 1

Reproduce this error by running:
==> cd /home/ardadenker/catkin_ws/build_isolated/cartographer_ros_msgs && /home/ardadenker/catkin_ws/devel_isolated/cartographer/env.sh cmake /home/ardadenker/catkin_ws/src/cartographer_ros/cartographer_ros_msgs -DCATKIN_DEVEL_PREFIX=/home/ardadenker/catkin_ws/devel_isolated/cartographer_ros_msgs -DCMAKE_INSTALL_PREFIX=/home/ardadenker/catkin_ws/install_isolated -G 'Unix Makefiles'

Command failed, exiting.
ardadenker@ardadenker-VirtualBox:~/catkin_ws$

I would love to know what the solution will be because It seems something simple yet complicated. Thank you for the answers I really appreciate them. I hope you understand why I shorten the terminal output, just to reduce the massive text crowd which is already very long at this point.

Originally posted by Hellsgone on ROS Answers with karma: 1 on 2018-07-13

Post score: 0

$\endgroup$

1 Answer 1

0
$\begingroup$

Rosanswers logo

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.


Originally posted by jayess with karma: 6155 on 2018-07-13

This answer was ACCEPTED on the original site

Post score: 2


Original comments

Comment by Hellsgone on 2018-07-13:
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.

Comment by jayess on 2018-07-13:
Updating your question with the answers that you found and saying what exactly confused you would be helpful.

Comment by Alan8 on 2019-07-17:
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??

Comment by jayess on 2019-07-17:
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.

Comment by Alan8 on 2019-07-17:
Sorry. Replied here for the context.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.