LCM on embedded systems

372 views
Skip to first unread message

tinito

unread,
Aug 23, 2010, 11:17:05 AM8/23/10
to Lightweight Communications and Marshalling
Hi all,

i'm working on low cost robotic systems, and i'm looking for a
lightweight communication library that can run on both PCs and
embedded systems (ranging from 8-bit PIC-like microcontrollers to 32-
bit ARM microcontrollers).
I'm wondering if LCM could fit on such a system, removing the glib
dependency and writing a provider for CAN bus or some similar link.
I've seen some posts about embedding LCM, has any progress been made?

Thanks,
Martino Migliavacca

Dave

unread,
Aug 23, 2010, 1:30:14 PM8/23/10
to Lightweight Communications and Marshalling

Hi,

I have some code I wrote for an embedded processor, but I was able to
use pthreads to get around glib. I had been toying around with getting
rid of pthreads by changing the system to use a loop, and interrupts,
but I didn't get around to it.

Its been a little while, but I think you might be able to compile a
lot of the individual files without glib, and get by with the standard
library alone.

Off the top of my head I think it boiled down to two parts that needs
to be ported.

1. modify lcm.c to not use glib: perhaps a "poll_lcm" function could
be called from the main loop to check up on things, or an ISR which
responds to new data coming in.
2. create a provider for the medium you want to use (UART, CAN...
whatever)

When I get off of work today I'll send you an email if your
interested.

Dave

Edwin Olson

unread,
Aug 23, 2010, 8:48:29 PM8/23/10
to Lightweight Communications and Marshalling
I've just committed lcm-lite, which is exactly what you're looking
for, I think. If your platform is reasonably common, we'd love for you
to contribute back your bindings (see posix and ios examples). Note
that you just use lcm-gen on a host machine.

This is new code, buyer beware :) That said, it seems to be working on
my systems.

Best,

-Ed

tinito

unread,
Aug 24, 2010, 5:03:03 AM8/24/10
to Lightweight Communications and Marshalling
Thanks for your fast replies. My platform is an STM32 ARM Cortex-M3,
so it is a quite common architecture.
I'll try to build lcm for that target in the next days, for sure i'll
post some feedback.

Thanks again,
Martino
Reply all
Reply to author
Forward
0 new messages