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

Specify TCP port communication between a ROS node and a none ROS exe

asked 2013-07-11 22:54:35 -0500

this post is marked as community wiki

This post is a wiki. Anyone with karma >75 is welcome to improve it.

Hello!

I have currently a software which is a black box! I can only connect to it through TCP/IP in localhost port 5000. My question is very simple : How can I create a node in which I could create a connection to the port 5000 in localhost ? Do you have a sample which do this stuff ? Thanks

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
2

answered 2013-07-12 01:36:12 -0500

this post is marked as community wiki

This post is a wiki. Anyone with karma >75 is welcome to improve it.

Simple answer: In the same way you would do it with any other non-ROS node. It's just an executable that you program. ROS shouldn't limit you as it's just "some other" connection.

The maker of your box should provide such a sample.

That code should be easy to merge with ROS, in either direction, as ROS is basically just a few method calls and does not replace your main method. The only thing to look out for is if there are blocking calls involved.

edit flag offensive delete link more

Comments

Correct me if I'm wrong, but ROS uses TCP underneath right? In that case, wouldn't there be a chance of a port clash?

Samuel Anudeep gravatar image Samuel Anudeep  ( 2013-10-30 20:12:23 -0500 )edit

Yep, it does. I know what you mean, but I'm no networking expert. As this is no ROS specific issue the internet might know the answer.

felix k gravatar image felix k  ( 2013-10-31 01:51:44 -0500 )edit

Question Tools

Stats

Asked: 2013-07-11 22:54:35 -0500

Seen: 676 times

Last updated: Jul 16 '13