一、概述
LCM是进行信息收发的工具。
“LCM is a set of libraries and tools 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 automatic marshalling/unmarshalling code generation with bindings for applications in a variety of programming languages.”
详见:http://lcm-proj.github.io/
二、安装
1、下载lcm源码(根据自己的需求选择版本,这里以lcm-1.3.0为例)
https://github.com/lcm-proj/lcm/releases
2、安装到指定路径:
sh ./configure --prefix=/home/your_login/Software/lcm-1.3.0/local #若不加--prefix,则安装到系统默认路径;这里不安装到系统默认路径,方便版本管理
make -j12
make install
备注:
如果想要在terminal中任意路径都可以通过命令行调用lcm-logger或lcm-logplayer工具,则只需要在/usr/bin路径下建立软链接即可。
安装后提示:
Libraries have been installed in:
/home/your_login/Software/lcm-1.3.0/local/lib/python2.7/site-packages/lcm
If you ever happen to want to link against installed libraries in a given directory, LIBDIR, you must either use libtool, and
specify the full pathname of the library, or use the `-LLIBDIR' flag during linking and do at least one of the following:
- add LIBDIR to the `LD_LIBRARY_PATH' environment variable during execution
- add LIBDIR to the `LD_RUN_PATH' environment variable during linking