0
$\begingroup$

Rosanswers logo

I want to communicate ros program(just we write usually) and non-ros program(that means the program dosen't include the head file ros.h and anyother relate to the ros),I want the two programs can send and receive the date from each other. Are there any methods can do this work,or some ros API can be used to make the work easier. if you konw anyting about this please tell me ,thank you.


Originally posted by cros on ROS Answers with karma: 3 on 2015-05-16

Post score: 0

$\endgroup$

1 Answer 1

0
$\begingroup$

Rosanswers logo

How does the other program communicate now? A ROS program has access to all the ROS infrastructure, but it's just a process like any other and can communicate with any other process using whatever other means you have at your disposal. If you just have some ROS-agnostic classes that you want to use and they don't need to be an independent process, then include them, link against them, and use them as you would for any other program. If you want to communicate with some non-ROS process from a ROS node, then you have any number of options available to you, e.g., ActiveMQ, shared memory, etc.


Originally posted by Tom Moore with karma: 13689 on 2015-05-16

This answer was ACCEPTED on the original site

Post score: 1


Original comments

Comment by cros on 2015-05-16:
thank you,I want to communicate with some non-ROS process from a ROS node, are there some built-in ros api I can use ?

Comment by Tom Moore on 2015-05-16:
I don't think so. Is this an existing process/program, or just a non-ROS class? You can always wrap your non-ROS classes in ROS if you want to pass data to them.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.