How to use bot-lcm-tunnel

1,141 views
Skip to first unread message

Titusgroan

unread,
Jun 8, 2011, 6:29:03 PM6/8/11
to Lightweight Communications and Marshalling
Hi All

I have been using LCM to fire images from a Point Grey Research camera
through an embedded system over my University network to a PC to
process the images: this is all using ethernet connections and works
very well with an excellent frame rate. Now I want the embedded system
(mobile robot) to use Wifi and I have found that LCM no longer works.
Using netcat on my PC I can see packets coming into my PC but they are
not being interpreted as LCM messages - I am guessing this is due to
packet loss garbling things up. This is backed by this post:

http://groups.google.com/group/lcm-users/browse_thread/thread/3e0135985812ed42

I have checked out the following

svn co https://svn.csail.mit.edu/libbot2

as suggested in the above post in order to use the program "bot-lcm-
tunnel". I have been playing around with this program for hours but am
no closer to understanding how to use it...Does anyone know how to use
this program? On which side do I run this; the embedded system
(connected to the camera) or PC or both? I hope I've posted this in
the right place

Cheers


Titusgroan

Abe Bachrach

unread,
Jun 8, 2011, 6:48:28 PM6/8/11
to lcm-...@googlegroups.com
You need to run it on both ends... each instance can act as both a client and a server. One of the instances needs to be told to connect to the other.

on the embedded system run: 
# ./bot-lcm-tunnel

on the desktop:
# ./bot-lcm-tunnel <ip-of-server>

this will forward all LCM sent on either system to the other. See the usage for other message filtering channels.


Also, for transporting images over wireless, we've found UDP with forward error correction (-f option) to work better than the default TCP.

-=Abe



--
You received this message because you are subscribed to the Google Groups "Lightweight Communications and Marshalling" group.
To post to this group, send email to lcm-...@googlegroups.com.
To unsubscribe from this group, send email to lcm-users+...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/lcm-users?hl=en.


Titusgroan

unread,
Jun 30, 2011, 10:39:39 AM6/30/11
to Lightweight Communications and Marshalling
Hi Abe

Thanks for your response. I now have this working but with the warning
message

Warning: send queue is too big (16MB), dropping messages

being displayed on the server side - I am currently transmitting raw
640x480 grayscale images. Initially the stream is good then is
suddenly slows right down when this message appears. This occurs over
TCP after executing the commands

on the embedded system run:
# ./bot-lcm-tunnel

on the desktop:
# ./bot-lcm-tunnel <ip-of-server>

I don't see a way of expanding the queue buffer from the bot-lcm-
tunnel options. Is there a way round this? I have also tried the -f
option as you suggested with an f value of 1.5 but nothing seems to
get through to the client....

Cheers

Titusgroan


On Jun 8, 11:48 pm, Abe Bachrach <abachr...@gmail.com> wrote:
> You need to run it on both ends... each instance can act as both a client
> and a server. One of the instances needs to be told to connect to the other.
>
> on the embedded system run:
> # ./bot-lcm-tunnel
>
> on the desktop:
> # ./bot-lcm-tunnel <ip-of-server>
>
> this will forward all LCM sent on either system to the other. See the usage
> for other message filtering channels.
>
> Also, for transporting images over wireless, we've found UDP with forward
> error correction (-f option) to work better than the default TCP.
>
> -=Abe
>
> On Wed, Jun 8, 2011 at 6:29 PM, Titusgroan <titusgro...@gmail.com> wrote:
> > Hi All
>
> > I have been using LCM to fire images from a Point Grey Research camera
> > through an embedded system over my University network to a PC to
> > process the images: this is all using ethernet connections and works
> > very well with an excellent frame rate. Now I want the embedded system
> > (mobile robot) to use Wifi and I have found that LCM no longer works.
> > Using netcat on my PC I can see packets coming into my PC but they are
> > not being interpreted as LCM messages - I am guessing this is due to
> > packet loss garbling things up. This is backed by this post:
>
> >http://groups.google.com/group/lcm-users/browse_thread/thread/3e01359...
>
> > I have checked out the following
>
> > svn cohttps://svn.csail.mit.edu/libbot2

Abe Bachrach

unread,
Jun 30, 2011, 11:22:29 AM6/30/11
to lcm-...@googlegroups.com
The que isn't configurable... Feel free to send a patch if you think
it will help....

That being said, It sounds to me like the problem
is that you are overloading Your wireless link... You'll probably
either need to downsample, or compress your data.

-=Abe

Pradeep

unread,
Sep 16, 2016, 2:05:32 PM9/16/16
to Lightweight Communications and Marshalling
Hi 

I working on a LCM Java application, where I need to run the server on the development board and the client on the windows or Macbook. Can you please let me know the procedure on how to get these two to work ? When I am executing both of them on the same machine, it works fine. But when I run them on two separate machines, I do not get any response.

Thanks & Regards,
Pradeep

Patrick Carmody

unread,
Sep 19, 2016, 9:39:00 AM9/19/16
to lcm-...@googlegroups.com
Pradeep,

Chances are that this is a TTL issue. The UDP multicast framework includes a parameter called time-to-live (TTL), which determines how many network hops a UDP message will survive. This prevents messages from getting rebroadcast indefinitely. The default LCM URL has a TTL set to 0, which means packets will not leave the host machine. When you call lcm_create(), you can specify a URL in which you encode a TTL value greater than 0, e.g. "udpm://239.255.76.67:7667?ttl=1". This will allow messages from the one component to communicate with other LCM components across the network.

See this link for a more detailed explanation: https://lcm-proj.github.io/multicast_setup.html


 - Patrick


--
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+unsubscribe@googlegroups.com.

To post to this group, send email to lcm-...@googlegroups.com.

Pradeep

unread,
Sep 19, 2016, 9:53:10 AM9/19/16
to Lightweight Communications and Marshalling
Hi Patrick,

This is what I gave in the code lcm  = new LCM("udpm://239.255.76.67:7667?ttl=1");. I'm able to execute them successfully within the same machine, but when I try to run client and the server programs on different machines(target board and windows/Mac book), they aren't communicating between each other. I connected the ethernet cable between the board and the laptop as well. Can you please help me out in this regard by providing some inputs ?

Thanks & Regards,
Pradeep
To unsubscribe from this group and stop receiving emails from it, send an email to lcm-users+...@googlegroups.com.

Pradeep

unread,
Sep 19, 2016, 12:05:17 PM9/19/16
to Lightweight Communications and Marshalling
Hi 

I working on a LCM Java application, where I need to run the server on the development board and the client on the windows or Macbook. Can you please let me know the procedure on how to get these two to work ? When I am executing both of them on the same machine, it works fine. But when I run them on two separate machines, I do not get any response. I've connected the board and the the laptop via Ethernet cable.

Thanks & Regards,
Pradeep

On Wednesday, June 8, 2011 at 6:29:03 PM UTC-4, Titusgroan wrote:

Patrick Carmody

unread,
Sep 19, 2016, 5:35:31 PM9/19/16
to lcm-...@googlegroups.com
You can use lcm-spy to determine whether the data is getting across the network. If you do not see the LCM messages on the destination side, then it is probably a network configuration issue, such as an incorrect or missing multicast route.

 - Patrick

--
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+unsubscribe@googlegroups.com.

Pradeep

unread,
Sep 19, 2016, 6:06:18 PM9/19/16
to Lightweight Communications and Marshalling
Hi Patrick,

Could you please tell how to use lcm-spy ? Do I need to run on windows and development board ? Has this to be used when I am running the application ? I'm new to LCM and do not have any idea on how to use lcm-spy ? 

Sorry for the inconvenience.

Thanks & Regards,
Pradeep
To unsubscribe from this group and stop receiving emails from it, send an email to lcm-users+...@googlegroups.com.

Patrick Carmody

unread,
Sep 19, 2016, 9:52:32 PM9/19/16
to lcm-...@googlegroups.com
lcm-spy is a program which will be built with LCM. On Linux it is installed in /usr/local/bin. I'm not familiar with the Windows installation. The Visual Studio project should contain information on where it is created/installed.

 - Patrick


To unsubscribe from this group and stop receiving emails from it, send an email to lcm-users+unsubscribe@googlegroups.com.

Pradeep

unread,
Oct 18, 2016, 9:31:57 AM10/18/16
to Lightweight Communications and Marshalling

Hi abachrac,

I have a .jar file running on a Linux machine, and a pcap file running on another Linux machine. The jar file is a GUI. I'm using lcm-logplayer to run the pcap file. I'm using a router and not connected to internet. 
The pcap file should configure the graphics of the UI when I execute both of them separately. I'm using the default LCM url "udpm://239.255.76.67:7667?ttl=1". But I'm not able to see the changes in the graphics. 

I'm not able to see any debug messages which I gave in /lcm-1.3.0/lcm-java/lcm.lcm/UDPMulticastProvider.java in class ReaderThread extends Thread.

Do I need to update anything else with respect to LCM ? Any insights on this is much appreaciated.

Thanks & Regards,
Pradeep
Reply all
Reply to author
Forward
0 new messages