Ask Your Question
1

Server and ROS communication

asked 2011-07-11 21:53:08 -0500

soetommy gravatar image

updated 2014-04-20 14:09:49 -0500

ngrennan gravatar image

Hi,

Which package is suitable or how shall I implement inside roscpp or in any language to set up a connection between a tcpip server and the ROS system. I would like to transport a message, which is published onto a topic, between a server and the ROS system.

Thank you.

Soe

edit retag flag offensive close merge delete

1 Answer

Sort by » oldest newest most voted
4

answered 2011-07-11 22:08:48 -0500

Do you have any special restrictions? If your server is running Linux, and you have some program written in Python/C++/Java, just install ROS and publish the topic from your program. The beginner tutorials show you how to do that. ROS nodes can easily be distributed across multiple machines, and all the communication is handled for you by ROS.

edit flag offensive delete link more

Comments

The server is running linux and has ROS installed. As far as I understand from those tutorials, I can simply edit ROS_MASTER_URI to connect to roscore on another pc. I believe it is a possible method? However, what if the server running linux does not have ROS installed on t? Thanks
soetommy gravatar imagesoetommy ( 2011-07-11 22:17:01 -0500 )edit
What exactly do you want to do? Do you want a connection between two ROS programs via ROS (i.e. ROS's tcp/ip), then you will need ROS or do you want a connection between a ROS program and a custom built TCP/IP server with custom data?
dornhege gravatar imagedornhege ( 2011-07-11 22:30:33 -0500 )edit
1. Yes, simply go through the tutorial to get it running. 2. If there is no way to install any ROS client library, you would have to re-implement a large part of ROS by yourself, so it's always much easier to install ROS wherever possible.
Martin Günther gravatar imageMartin Günther ( 2011-07-11 22:32:16 -0500 )edit
Hi dornhege, Yes, I would just like to do similar to the second option: to form a connection and send a message between a custom built TCP/IP server and a client program (which is not a ROS program) on another computer first, and then relay that message to the ROS system.
soetommy gravatar imagesoetommy ( 2011-07-12 02:44:18 -0500 )edit
Following up the above comment, the client will be operating as a generic client which is not ROS by itself, but will communicate with ROS. I'm sorry if I have been confusing, because I don't have much experience with it. Thanks!
soetommy gravatar imagesoetommy ( 2011-07-12 02:46:08 -0500 )edit
So the communication between the server and the client runs over some custom protocol based on TCP/IP; ROS isn't involved there. Then you want to publish it from the client on a ROS topic. Just include ros.h and create nodehandle and publisher (follow the tutorials). It's that easy!
Martin Günther gravatar imageMartin Günther ( 2011-07-12 20:38:42 -0500 )edit
Follow-up: "a generic client which is not ROS by itself, but will communicate with ROS" -- you probably think ROS is more complicated than it is. ROS topics are really easy to publish from almost any program. You can still do whatever you want, just add some ROS classes and that's it.
Martin Günther gravatar imageMartin Günther ( 2011-07-12 20:42:46 -0500 )edit
Thanks, Martin!
soetommy gravatar imagesoetommy ( 2011-07-13 04:28:18 -0500 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

Stats

Asked: 2011-07-11 21:53:08 -0500

Seen: 736 times

Last updated: Jul 11 '11