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

Using catkin without ROS

asked 2014-10-22 11:06:45 -0500

EEngineer gravatar image

updated 2022-01-22 16:16:29 -0500

Evgeny gravatar image

So I like the catkin build system and am interesting in using it outside ROS, and working with people that don't want to install ROS. Is this possible?

I've tried installing catkin with pip but am getting errors like unable to find catkinConfig.cmake. Before I start going down this rabbit hole and try copying just that file, has anyone tried this?

edit: I built from source and when I run catkin_make after sourcing /usr/local/setup.sh, I get this:

Base path: workspace
Source space: workspace/src
Build space: workspace/build
Devel space: workspace/devel
Install space: workspace/install
####
#### Running command: "cmake workspace/src -DCATKIN_DEVEL_PREFIX=workspace/devel -DCMAKE_INSTALL_PREFIX=workspace/ins\
tall" in "workspace/build"
####
CMake Error at CMakeLists.txt:59 (message):
  find_package(catkin) failed.  catkin was neither found in the workspace nor
  in the CMAKE_PREFIX_PATH.  One reason may be that no ROS setup.sh was
  sourced before.

I've tried setting /usr/local/share/catkin/cmake/ as CMAKE_PREFIX_PATH.

edit: ok, appears to have been a permissions issue and now catkin_make is working, but the directories created appear to be incompatible with catkin build now, which fails on its own. Is that command deprecated? It is how I create eclipse projects.

edit retag flag offensive close merge delete

Comments

How did you build it from source?

Dirk Thomas gravatar image Dirk Thomas  ( 2014-10-22 14:56:39 -0500 )edit

What do you mean with "catkin build"? rosbuild or catkin_tools?

Dirk Thomas gravatar image Dirk Thomas  ( 2014-10-22 15:24:35 -0500 )edit

in order to get catkin working I needed to pip install catkin_pkg, and I also installed catkin_tools, which has the catkin (not catkin_make) commands. I used this to make separate eclipse projects for each module, while catkin_make -G"Eclipse CDT4 - Unix Makefiles" puts them in one big project.

EEngineer gravatar image EEngineer  ( 2014-10-22 16:52:55 -0500 )edit

catkin_tools has not officially been announced and is still in development. You might want to stick to the commands coming with catkin: namely catkin_make / catkin_make_isolated.

Dirk Thomas gravatar image Dirk Thomas  ( 2014-10-22 17:16:43 -0500 )edit

There is nothing wrong with catkin_tools, but you cannot mix usage of catkin build and catkin_make in the same workspace. You must use one or the other.

William gravatar image William  ( 2014-10-22 18:11:54 -0500 )edit

Fair enough, is there a way to make catkin_make build separate eclipse projects like catkin build does?

EEngineer gravatar image EEngineer  ( 2014-10-22 21:42:35 -0500 )edit

You might want to try catkin_make_isolated which invokes CMake for each package (the same way as catkin_tools).

Dirk Thomas gravatar image Dirk Thomas  ( 2014-10-22 22:07:32 -0500 )edit

You can either use catkin_make_isolated or use catkin_tools but with different build, devel, and install folders.

William gravatar image William  ( 2014-10-23 13:17:29 -0500 )edit

2 Answers

Sort by ยป oldest newest most voted
3

answered 2014-10-22 11:57:48 -0500

Dirk Thomas gravatar image

You can't install catkin via PIP. While it does have a setup.py file it is not a pure Python package.

You can either clone the repository and use catkin from source (and build it from source) or install the Debian package from the ROS apt repo. It only depends on CMake and a handful of Python packages but nothing ROS specific.

edit flag offensive delete link more
0

answered 2017-07-31 11:27:36 -0500

hamzamerzic gravatar image

It seems that downloading catkin and placing it in the source directory allows using catkin_tools without ROS.

edit flag offensive delete link more

Question Tools

1 follower

Stats

Asked: 2014-10-22 11:06:45 -0500

Seen: 2,958 times

Last updated: Jul 31 '17