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

Subscriber's messages transport through UDP

asked 2016-01-01 02:27:51 -0500

Terry Su gravatar image

updated 2016-01-01 11:29:35 -0500

Hello ROS users,

Is there a possiblity to send Data through UDP from a ROS Node to the other non-ROS PC?

To specify my question : I have used the subscriber to subscribe the lidar's scan topic successfully,

and I want to pass the messages of the scanning data from my subscriber through the UDP protocol to the other one non-ROS computer.

I see this page regarding UDPROS but there seems to be little, new information.

Does anyone know or have used this before? I would be thankful if someone can direct me.

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted

answered 2016-01-01 15:50:06 -0500

ahendrix gravatar image

updated 2016-01-01 15:51:17 -0500

UDPROS can only be used for sending data over ROS topics.

If you want to send data to a non-ROS computer, you should create a normal UDP socket and write data to it. Using raw UDP sockets isn't within the scope of this forum, and there are already lots of other good examples of how to use UDP from Python or C++ on the internet.

The first few links on Google all look like good places to start:

edit flag offensive delete link more


@ahendrix, If I need to use UDP to transport the data of subscriber, do I just need to put the UDP code in the subscriber's roscpp? Sorry I'm not familiar about the C code and I'm a ROS newbie, hope you can help me about these questions. Thanks in advanced.

Terry Su gravatar image Terry Su  ( 2016-01-03 02:15:55 -0500 )edit

Yes. If you want to use UDP you'll need to write the UDP code in your subscriber.

ahendrix gravatar image ahendrix  ( 2016-01-03 02:51:02 -0500 )edit

Question Tools

1 follower


Asked: 2016-01-01 02:27:51 -0500

Seen: 1,454 times

Last updated: Jan 01 '16