Robotics StackExchange | Archived questions

Use ROS libraries in a non-ROS project

I have been working on a large project which uses OpenCV and Boost libraries (not using ROS). Now my manager asked me to include ROS libraries into the project. The only use for ROS will be to send and receive messages within a single robot. I will need to receive an operation code and send a respond. I was wondering if there is a way to configure a ROS project with only a "talker" and "listener" and then somehow include these in my main project and use them there? This could be the best way, another option is to compile my whole project using ROS (add all the libraries and dependencies) but I have tried this many times and I get multiple errors. Another way I thought would be creating a class inside my project which will use the terminal read/write from/to a topic.. Is the first option possible? Thanks!

Asked by jdorfsman on 2015-02-01 03:46:42 UTC

Comments

Answers

Typically, I think the best work around for this would be to create an lean API for the most basic calls you need of your existing code base. Then put your existing project into a shared library and call into your library from a very tiny ROS talker/listener exectuable that sets up the communication to the ROS world via publishers/subscribers,

Asked by Wolf on 2015-02-02 07:49:01 UTC

Comments

Is there a manual to do this, I'm trying but not succeeding to create this shared library..

Asked by jdorfsman on 2015-02-03 09:46:35 UTC

As an alternative to @Wolf's answer, you might be interested in ros_bridge. That would allow interaction between a ROS node graph and a stand-alone system, but would remove the need to link against any ROS libraries.

Asked by gvdhoorn on 2015-02-02 08:45:18 UTC

Comments

I will try this option, thanks!

Asked by jdorfsman on 2015-02-03 08:50:53 UTC