在 Ubuntu 16.04 上安装 zcm 通信中间件

Steps for install the ZCM on Ubuntu 16.04

  1. Prepare python-pip
    sudo apt-get install python-pip # if pip not installed
    sudo easy_install pip # if not upgraded to newer version than default, which is needed by ZCM.
    
  2. Download the official tarball from master branch or specific version from github.
  3. Extract it and install the dependencies automatically
    $ tar -xzf ZeroCM-zcm-<hash>.tar.gz # you got to substitute the <hash>
    $ cd ZeroCM-zcm-<hash>
    $ sudo ./scripts install-deps.sh # grab yourself a cup of coffee, because this may cost a while, and if you meet an error with pip, try `sudo easy_install pip` again.
    
  4. Configure environment
    $ ./waf configure --use-all 
    
    or something like
    $ ./waf configure --use-java --use-python --python=/usr/bin/python3.6 --use-zmq  --use-elf  --use-third-party  --use-ipc --use-inproc --use-udpm --use-serial
    
  5. it may ask for a setting of JAVA_HOME environment variable, try to add this to your ~/.bashrc and then source it:
    export JAVA_HOME=/usr/lib/jvm/java-8-openjdk-amd64 # you should find something similar under /usr/lib/jvm/.
    export PATH=$JAVA_HOME/bin:$PATH
    
  6. run ./waf build, and you should see the notice “‘build’ finished successfully”. Then run sudo ./waf install and you are fine.

After installation, commonly you can find your library in /usr/local/lib/libzcm.so and headers in /usr/local/include/zcm/. Use -lzcm with g++, include_directories(...) and target_link_libraries(target zcm) in CMake.

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值