How to receive/subscribe to unicast data with LCM?

211 views
Skip to first unread message

Carlos Galvez

unread,
May 11, 2016, 6:28:49 AM5/11/16
to Lightweight Communications and Marshalling
Hi,

We have this setup:

[Device A] ----> [Switch] ----> [Device B]

Device A can only send unicast data. Right now it is sending LCM data over UDP using a manually programmed a unicast version of publish().
Device B receives correctly the unicast data, as shown in Wireshark.

However, when we try to call lcm.handle() in device B, it keeps blocked all the time, so it's not correctly receiving the data.

Question: how do we need to configure Device B so that LCM can successfully handle data from device A? We are not experts in networking
and we cannot find a working solution for routing unicast traffic to multicast, which is what LCM expects.

Thank you very much.

Andy Barry

unread,
May 11, 2016, 7:36:41 AM5/11/16
to lcm-...@googlegroups.com

Depending on your requirements, a TCP tunnel might make things simpler:

https://github.com/RobotLocomotion/libbot

https://groups.google.com/forum/m/#!topic/lcm-users/VirOV0aj4Ww

--
You received this message because you are subscribed to the Google Groups "Lightweight Communications and Marshalling" group.
To unsubscribe from this group and stop receiving emails from it, send an email to lcm-users+...@googlegroups.com.
To post to this group, send email to lcm-...@googlegroups.com.
Visit this group at https://groups.google.com/group/lcm-users.
For more options, visit https://groups.google.com/d/optout.

Carlos Galvez

unread,
May 12, 2016, 9:52:08 AM5/12/16
to Lightweight Communications and Marshalling
Hi,

Unfortunately the TX computer is an embedded platform that we cannot install additional software to.

Is it possible to redirect the received unicast data into the multicast address that LCM expects? Maybe with iptables or similar? 

Best regards.

cbarto17

unread,
May 19, 2016, 11:20:54 AM5/19/16
to Lightweight Communications and Marshalling
You might try something like a servlet running in Tomcat or some other container.  Listen on the unicast port, receive and validate, then re-package and transmit to the LCM multicast address.

Carlos Galvez

unread,
May 20, 2016, 2:45:08 AM5/20/16
to Lightweight Communications and Marshalling
Yes, we ended up creating a simple Python program that runs on the background and redirects the data to the correct address.

Thanks everyone!
Reply all
Reply to author
Forward
0 new messages