ZCM: Zero Communications and Marshalling

Build Status

ZCM is a micro-framework for message-passing and data-marshalling, designed originally for robotics systems where high-bandwidth and low-latency are critical and the variance in compute platforms is large.

ZCM is a publish/subscribe message-passing system with automatic message type-checking and serialization. It provides bindings for a variety of programming languages, and generates language-specific message serialization routines. Using a ZCM message feels natural in each language.

ZCM is transport-agnostic. There is no required built-in transport. Every transport is first-class. This is achieved by defining strict blocking and non-blocking transport APIs. As long as a transport implementation conforms to this API, it should work flawlessly with ZCM. This design allows ZCM to work well on anything from a high-end posix-based compute cluster with thousands of nodes to a low-end real-time embedded-system with no operating system.

ZCM is a derivation of the LCM project created in 2006 by the MIT DARPA Urban Challenge team. The core message-type system, publish/subscribe APIs, and basic tools are ported directly from LCM and remain about 95% compatible. While there are a handful of subtle differences between the two, the core distinguishing feature is ZCM's transport agnosticism. LCM is designed completely around UDP Multicast. This transport makes a lot of sense for LAN connected compute clusters (such the original 2006 MIT DGC Vechicle). However, there are many other applications that are interesting targets for ZCM messaging. These include: local system messaging (IPC), multi-threaded messaging (in-process), embedded-system peripherals (UART, I2C, etc), and web applications (Web Sockets). By refusing to make hard assumptions about the transport layer, ZCM opens the door to a wide set of use-cases that were neither possible nor practical with LCM.

To learn more about what ZCM tries to be, and its guiding principles, check out the Project Philosphy.

To dive, in and see some examples, check out the Tutorial.

If you have previously used LCM, check out From LCM to ZCM.

To learn how you can contribute to this project, check out Contributing

Quick Links


Supported platforms and languages


Subtle differences to LCM

ZCM is approximately 95% API compatible with LCM. Porting existing Unix-based LCM programs to ZCM is very easy in many cases. A quick sed -i 's/lcm/zcm/g' works for most applications. ZCM uses the same binary-compatible formats for UDP Multicast, Logging, and ZCMType encodings. Thus LCM and ZCM applications can communicate flawlessly. This allows LCM users to gradually migrate to ZCM.

Known incompatibilities: