Giter Site home page Giter Site logo

waitingdeng / zcm Goto Github PK

View Code? Open in Web Editor NEW

This project forked from zerocm/zcm

0.0 1.0 0.0 3.44 MB

Zero Communications and Marshalling

Home Page: http://zerocm.github.io/zcm/

License: GNU Lesser General Public License v2.1

Python 2.32% C++ 51.92% C 27.89% Shell 0.54% Java 15.59% JavaScript 1.00% Julia 0.73%

zcm's Introduction

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

Features

  • Type-safe and version-safe message serialization
  • A useful suite of tools for logging, log-playback, and real-time message inspection (spy)
  • A wide set of optionally built-in transports including UDP Multicast, IPC, In-Process, Serial, and ZeroMQ
  • A well-defined interface for building custom transports
  • Strong support for embedded applications. The core embedded code is restricted to C89.
  • Only one true dependency: A modern C++11 compiler for the non-embedded code.

Supported platforms and languages

  • Platforms
  • GNU/Linux
  • Web browsers supporting the Websocket API
  • Any C89 capable embedded system
  • Languages
  • C89 and greater
  • C++
  • Java
  • MATLAB (using Java)
  • NodeJS and Client-side Javascript
  • Python
  • Julia (v0.6.4)

Roadmap

  • Platform Support
    • Windows
    • OS X
    • Any POSIX-1.2001 system (e.g., Cygwin, Solaris, BSD, etc.)
  • Consider porting the rest of the LCM languages
    • C#
    • Lua
  • Explore alternative messaging paradigms using ZCM Types (e.g. those found in ZeroMQ)
  • Break from the original LCM APIs to improve API consistency
    • Goal for v2.0
    • v1.0 will always strive for API compatibility

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:

  • zcm_get_fileno() is not supported
  • zcm_handle_timeout() is not supported
  • Any applications using GLib via LCM may have build errors
    • ZCM does not depend on GLib
  • ZCMType drops support for the LCMType-style enums

zcm's People

Contributors

jbendes avatar olsoni avatar ajbonkoski avatar rdeits avatar bradthom avatar tkbrady avatar dissing avatar duam avatar spschul avatar timetoprogram avatar snip3rnick avatar

Watchers

James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.