LCM is a library for message passing and data marshalling targeted at real-time systems where high-bandwidth and low latency are critical. It provides a publish/subscribe message passing model and an XDR-style message specification language with bindings for applications in C, Java, and Python. It was originally designed and used by the MIT DARPA Urban Challenge Team as its message passing system.
LCM is designed for tightly-coupled systems connected via a dedicated local-area network. It is not intended for message passing over the Internet. LCM has been developed for soft real-time systems: its default messaging model permits dropping messages in order to minimize the latency of new messages.
Features
- Low-latency inter-process communication
- Efficient broadcast mechanism using UDP Multicast
- Provides type-safe message marshaling that automatically detects most types of errors (such as version mismatches between different modules)
- User-friendly logging and playback
- Essentially unlimited packet size
- No centralized "database" or "hub" -- peers communicate directly
- No daemons
- Supports C/C++, Java, Python, and MATLAB
Requirements
- POSIX.1-2001 system (GNU/Linux, OS X, Cygwin, Solaris, etc.)
- GLib >= 2.0
Java >= 1.5 is strongly recommended, as several important utilities distributed with LCM are written in Java.
Documentation
See here: Documentation
News
Jun 29, 2009
Release 0.3.0:
- Java
- Faster serialization classes that provide a 4x-5x speedup. This introduces a backwards-incompatible change to the LCM Java API. Specifically, the messageReceived() method of the LCMSubscriber interface has changed from:
public void messageReceived(LCM lcm, String channel, DataInputStream ins)
to:public void messageReceived(LCM lcm, String channel, LCMDataInputStream ins)
LCMDataInputStream has an almost identical API to DataInputStream, and migration of source code to the new API should only require changing implementations of LCMSubscriber in the manner described above.
- C
- warn on Linux if large packets are being received but the kernel rbuf is small
- Python
- bugfix for decoding arrays of bytes
Apr 15, 2009
Release 0.2.2
- logger
- fixed internal counting bug
- lcm-gen
- C bugfix: append "LL" to int64_t constants
- Python optimization: consolidate calls to struct.pack/unpack if possible
- Python uses --lazy flag now
- C/Python
- fix minor memory leak
Feb 16, 2009
Released version 0.2.1
- fix major logger regression (would log empty packets)
Feb 14, 2009
Released version 0.2.0
- C
- make some error messages a bit more user-friendly
- Python
- remove some extraneous print statements
- minor bugfixes
- Java
- better handle windows path separator
- force .class files to be backwards compatible with Java 1.5
- add MessageAggregator class
- add {type_t} (byte data) decode constructor for generated code.
- minor bugfixes for generated code
- documentation improvements
- MATLAB
- now supported via Java bindings.
- example code added
- logplayer-gui
- fix race WRT single-stepping. UI tweaks.
- logger
- add memory buffer to better handle intermittent high disk latencies
- configure
- add --without-java and --without-python options