Ask Your Question
1

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

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

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 -0600

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 imageSamuel Anudeep ( 2013-10-30 20:12:23 -0600 )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 imagefelix k ( 2013-10-31 01:51:44 -0600 )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: 2013-07-11 22:54:35 -0600

Seen: 449 times

Last updated: Jul 16 '13