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

Rospy and udp sockets

asked 2017-07-19 03:54:00 -0500

Muda gravatar image


I want to send data (x,y and yaw values) over UDP to a system that isn't running ROS (a myRIO or any other micro-controller) I am using a code written in in python (ROSpy) by someone in else that processess the data from the camera. What I have read online is that I can't send data over udp. Can I not create a socket like this?

If not, is it possible to change the code from python to c++ so that I can use UDP?

I'm sorry if the question seem stupid but this is my first experience with python and ROS.

edit retag flag offensive close merge delete


What I have read online is that I can't send data over udp.

Without knowing where you've read this or why that is claimed this is a bit of a dangerous statement, but I would say that is untrue.

There is no magic to rospy, ROS Python programs are just regular programs, so UDP should work.

gvdhoorn gravatar image gvdhoorn  ( 2017-07-19 06:03:10 -0500 )edit

This is from #q28322.

I understand that they are normal codes, that is why I am confused.

If I post a code would you be able to have a look at it quickly, (the code is only 49 lines)??

Muda gravatar image Muda  ( 2017-07-19 06:10:48 -0500 )edit

1 Answer

Sort by ยป oldest newest most voted

answered 2017-07-19 06:14:45 -0500

gvdhoorn gravatar image

That question is specifically about whether the rospy and rosjava client libraries (ie: the Python and Java code that implements the ROS networking and other infrastructure parts) can use UDP.

It is not about whether general use of UDP is possible in rospy.

edit flag offensive delete link more


I must of misunderstood the question. Thanks for clearing it up.

I'm going to assume that sending the data obtained by ROS using UDP is possible.


Muda gravatar image Muda  ( 2017-07-19 06:21:57 -0500 )edit

Question Tools

1 follower


Asked: 2017-07-19 03:54:00 -0500

Seen: 912 times

Last updated: Jul 19 '17