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

communicate between ros and non-ros program

asked 2015-05-16 06:23:13 -0500

cros gravatar image

updated 2015-05-16 06:24:18 -0500

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.

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted

answered 2015-05-16 06:56:00 -0500

Tom Moore gravatar image

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.

edit flag offensive delete link more


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 ?

cros gravatar image cros  ( 2015-05-16 07:28:37 -0500 )edit

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.

Tom Moore gravatar image Tom Moore  ( 2015-05-16 08:04:40 -0500 )edit

Question Tools

1 follower


Asked: 2015-05-16 06:23:13 -0500

Seen: 503 times

Last updated: May 16 '15