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

How to use ROS without Catkin or rosbuild

asked 2015-10-31 20:34:59 -0600

DamnItROS gravatar image

My project currently uses our own build system. We just want some functionality from ROS such as urdf loading. Can I do that without switching the whole project to the catkin/rosbuild building system. Is there any guide on this topic?

edit retag flag offensive close merge delete

Comments

1

You can find a similar question (and answer) here

Gary Servin gravatar image Gary Servin  ( 2015-11-01 10:21:15 -0600 )edit

1 Answer

Sort by ยป oldest newest most voted
1

answered 2015-11-01 14:46:08 -0600

Dirk Thomas gravatar image

A catkin package is basically a CMake project which can be built without the catkin specific tools. Simply invoke the same commands as for any CMake project:

  • mkdir build
  • cd build
  • cmake .. (you might want to pass flags to a) build tests, b) build in release/debug mode, c) choose a custom install prefix)
  • make
  • make install
edit flag offensive delete link more

Comments

Not sure this fully answers the question. Yes, it is straightforward to replace the catkin command line tools. But what about the catkin macros in the CMakeLists.txt itself? E.g. catkin_package(), catkin_python_setup(), etc.

robarnes gravatar image robarnes  ( 2018-08-30 12:58:58 -0600 )edit

Almost every ROS package uses CMake functionality provided by catkin. Replacing those with plain CMake would be possible but a lot of effort. I don't see why you would want to do that. It would be similar to "how can we get rid of CMake in these packages and build everything using Makefiles".

Dirk Thomas gravatar image Dirk Thomas  ( 2018-08-30 13:04:02 -0600 )edit

Agreed. So let's say my codebase uses a different build system (bazel). I'd like to introduce a dependency on a catkin package Foo. Bazel can build cmake projects, but I'm not sure how catkin fits in. Could I just create a bazel target to build catkin from source, and then have Foo depend on that?

robarnes gravatar image robarnes  ( 2018-08-30 13:26:31 -0600 )edit

catkin is simply providing some CMake syntactic sugar. For building you can treat a catkin package just like any other CMake package.

Dirk Thomas gravatar image Dirk Thomas  ( 2018-08-30 13:43:24 -0600 )edit

Question Tools

1 follower

Stats

Asked: 2015-10-31 20:34:59 -0600

Seen: 3,123 times

Last updated: Nov 01 '15