ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question
0

CMake Error when running catkin_make or catkin build

asked 2021-09-03 02:37:26 -0500

Flo7 gravatar image

updated 2021-09-03 03:55:36 -0500

gvdhoorn gravatar image

I am currently following these instructions to install the Franka Ros interface. I have to build it from source and am currently at the step where I need to install the Ros packages. When I get to this command:

catkin_make -DCMAKE_BUILD_TYPE=Release -DFranka_DIR:PATH=/path/to/libfranka/build

t throws the following Error Message:

Base path: /home/dxc/franka-ros/catkin_ws
Source space: /home/dxc/franka-ros/catkin_ws/src
Build space: /home/dxc/franka-ros/catkin_ws/build
Devel space: /home/dxc/franka-ros/catkin_ws/devel
Install space: /home/dxc/franka-ros/catkin_ws/install
####
#### Running command: "cmake /home/dxc/franka-ros/catkin_ws/src -DFranka_DIR:PATH=/path/to/libfranka/build -DCATKIN_DEVEL_PREFIX=/home/dxc/franka-ros/catkin_ws/devel -DCMAKE_INSTALL_PREFIX=/home/dxc/franka-ros/catkin_ws/install -G Unix Makefiles" in "/home/dxc/franka-ros/catkin_ws/build"
####
-- The C compiler identification is GNU 7.5.0
-- The CXX compiler identification is GNU 7.5.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/dxc/franka-ros/catkin_ws/devel
-- Using CMAKE_PREFIX_PATH: /opt/ros/melodic
-- This workspace overlays: /opt/ros/melodic
-- Found PythonInterp: /usr/bin/python2 (found suitable version "2.7.17", minimum required is "2") 
-- Using PYTHON_EXECUTABLE: /usr/bin/python2
-- Using Debian Python package layout
-- Using empy: /usr/bin/empy
-- Using CATKIN_ENABLE_TESTING: ON
-- Call enable_testing()
-- Using CATKIN_TEST_RESULTS_DIR: /home/dxc/franka-ros/catkin_ws/build/test_results
-- 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/python2 (found version "2.7.17") 
-- 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  
-- Using Python nosetests: /usr/bin/nosetests-2.7
-- catkin 0.7.29
-- BUILD_SHARED_LIBS is on
-- BUILD_SHARED_LIBS is on
-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-- ~~  traversing 9 packages in topological order:
-- ~~  - franka_description
-- ~~  - franka_ros (metapackage)
WARNING: The CMakeLists.txt of the metapackage 'franka_ros' contains non standard content. Use the content of the following file instead: /home/dxc/franka-ros/catkin_ws/build/catkin_generated/metapackages/franka_ros/CMakeLists.txt
-- ~~  - franka_msgs
-- ~~  - franka_gripper
-- ~~  - franka_visualization
-- ~~  - franka_hw
-- ~~  - franka_control
-- ~~  - franka_example_controllers
-- ~~  - franka_gazebo
-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
CMake Error at /opt/ros/melodic/share/catkin/cmake/catkin_workspace.cmake:100 (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:69 (catkin_workspace)


-- Configuring incomplete, errors occurred!
See also "/home/dxc/franka-ros/catkin_ws/build/CMakeFiles/CMakeOutput.log".
See also "/home/dxc/franka-ros/catkin_ws/build/CMakeFiles/CMakeError.log".
Invoking "cmake" failed

After a bit of research I found many answers that suggested using catkin build instead ... (more)

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
0

answered 2021-09-04 18:44:21 -0500

tryan gravatar image

It appears you're taking the mentioned command too literally. When the instructions say:

-DFranka_DIR:PATH=/path/to/libfranka/build

they intend for you to replace /path/to/libfranka/build with the path where that folder is on your computer. For example, if you cloned libfranka into your home directory (e.g., /home/dxc), the proper argument would be:

-DFranka_DIR:PATH=/home/dxc/libfranka/build

It's not clear to me where you initially installed libfranka, so the above may not be quite right for you. Once you set the correct path, catkin build should be able to find the package it needs.

edit flag offensive delete link more

Question Tools

Stats

Asked: 2021-09-03 02:37:26 -0500

Seen: 205 times

Last updated: Sep 04 '21