Ask Your Question
0

How to listen to a port with UDP transmitted data

asked 2018-05-26 12:50:53 -0500

XenoNaij gravatar image

Hey everyone,

i am currently doing a project which involves collecting sensor data from a mobile phone and do some processing with the collected data on a linux machine.

I searched on the web for possibilities to stream IMU sensor data from an iPhone to my linux pc using WiFi connection, and i came across the app Sensor Stream, which is quite suited for this purpose. Within the app, one can specify the IP and Port of the client machine, which should receive the sensor datas. I think the app implements UDP for streaming data. I tried connecting my phone and linux pc to the same network and start streaming data from the phone to the pc. By using the tcpdump package on my linux machine, i could verify that data are sent to the linux machine on the specified port. So what's missing now is a convenient way to listen to the port and extract the sensor datas each time they appear at the port. Does anyone know how one can write a ROS node listening to the port, extract the streamed data and republish them on new topics in the ROS network for other nodes to listen to?

Any help is appreciated.

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
1

answered 2018-05-27 04:15:00 -0500

gvdhoorn gravatar image

updated 2018-05-27 04:16:30 -0500

The general question (open UDP socket 'in ROS') has been asked before, see #q223345 and #q190611 fi.

I searched on the web for possibilities to stream IMU sensor data from an iPhone to my linux pc using WiFi connection, and i came across the app Sensor Stream, which is quite suited for this purpose.

If you're referring to Sensor Stream published by FNI, then this turns into receiving data from a specific application and converting that to ROS messages. Someone could have written something for that already, but you'd have to search for it.

A quick Google doesn't turn up anything.

This is all possible, but you'll probably have to write something yourself. The store page for this app shows a screenshot (Data Packet Format) which would help in that case.


Edit: according to Miscellaneous - Sensor Stream Server, something called EZ-Builder has built-in support for this application. If there is some open-source aspect to that tool, you might be able to learn how to deserialise the incoming traffic from it.

I haven't used this myself at all, so I cannot help you with it.

edit flag offensive delete link more

Your Answer

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

Add Answer

Question Tools

1 follower

Stats

Asked: 2018-05-26 12:50:53 -0500

Seen: 302 times

Last updated: May 27 '18