ROS Resources: Documentation | Support | Discussion Forum | Service Status | Q&A answers.ros.org
Ask Your Question
0

Export a CMake project into Catkin(ROS)

asked 2015-09-22 11:18:31 -0500

Saracerno gravatar image

Hi, i had a library compiled with cMake , and a .cpp executable that use this library. The building and running is made without the use of catkin or ros architecture. I would like to import this project in a ros package in order to use it to take data and publish them through a node.

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
0

answered 2015-09-22 12:48:11 -0500

Could you pose a specific question?

As for how to create package, try http://wiki.ros.org/catkin/Tutorials/...

You should be able to make additions to your existing CMakeLists.txt file to add support for building with ROS. Consult http://wiki.ros.org/catkin/CMakeLists...

If you want to provide the capability to build with and without ROS in the same CMakeLists.txt, try switching based on the definition of CATKIN_ENV, e.g.,

if (CATKIN_ENV)
  message (STATUS "Building for ROS")
  # ...
else (CATKIN_ENV)
  message (STATUS "Building without catkin")
  # ...
endif (CATKIN_ENV)
edit flag offensive delete link more

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: 2015-09-22 11:18:31 -0500

Seen: 89 times

Last updated: Sep 22 '15