sudo apt-get install -y \
cmake \
g++ \
git \
google-mock \
libboost-all-dev \
libcairo2-dev \
libeigen3-dev \
libgflags-dev \
libgoogle-glog-dev \
liblua5.2-dev \
libsuitesparse-dev \
python-sphinx
1-protobuf
https://github.com/protocolbuffers/protobuf
2-ceres
https://github.com/ceres-solver/ceres-solver
3-abseil
https://github.com/abseil/abseil-cpp
1-gRPC(版本1.27.0)
https://github.com/grpc/grpc/tree/v1.27.0
2-async_gprc
https://github.com/cartographer-project/async_grpc
3-cartographer
https://github.com/cartographer-project/cartographer
step-1: 建議先cmake 、make 、make install 一波流。
然後你會發現系統沒有安裝gRPCTargets.cmake,接著step-2和step-3可以解決
step-2: 編譯靜態庫
cmake -DgRPC_INSTALL=ON -DgRPC_ZLIB_PROVIDER=package -DgRPC_CARES_PROVIDER=package -DgRPC_PROTOBUF_PROVIDER=package -DgRPC_SSL_PROVIDER=package -DgRPC_ABSL_PROVIDER=package ..
step-3: 編譯動態庫
cmake -DgRPC_INSTALL=ON -DBUILD_SHARED_LIBS=ON -DgRPC_ZLIB_PROVIDER=package -DgRPC_CARES_PROVIDER=package -DgRPC_PROTOBUF_PROVIDER=package -DgRPC_SSL_PROVIDER=package -DgRPC_ABSL_PROVIDER=package ..
編譯完後sudo ldconfig。
參考官方網址,或者https://blog.csdn.net/windxf/article/details/108792753
沒啥注意事項,因為之前gRPC用的版本不對,走了些彎路,記得用gRPC-1.27.0或稍前的版本。
記得在CmakeList.txt中把grpc開啟,
option(BUILD_GRPC "build Cartographer gRPC support" true) #default is false
如果你安裝過cartographer,也沒啥注意事項,對了新版本要手動安裝abseil,這個要安裝靜態庫和動態庫(-DBUILD_SHARED_LIBS=ON)
參考網址https://blog.csdn.net/windxf/article/details/108827649
cartographer_ros中記得在CmakeList.txt中把grpc開啟
option(BUILD_GRPC "build features that require Cartographer gRPC support" true) #default is false
catkin_make之後執行grpc demo
roslaunch cartographer_ros grpc_demo_backpack_2d.launch bag_filename:=/home/peak/Downloads/ros_bag/carto/cartographer_paper_deutsches_museum.bag
由於系統版本和庫版本的關係,你可能不能很好的執行,我這裡把百度連結附上,其中protobuf和abseil可以在grpc的third_party中找到
https://pan.baidu.com/s/1_6ID7ebEGkELV6OHwFX95A 提取碼: xrku
我使用的是ubuntu16.04.7 amd版本,cmake版本3.6.0
不敢相信居然跑起來了 localhost:11311