Debug 记录:vrpn_cliernt 环境配置

做实验需要用到动捕数据,之前配置好运行环境的电脑开不了机,只能再重新配置一遍环境,过程中遇到了些问题,记录以下供大家参考。

从 github 上获取源码,并根据自己的 ros 版本安装 vrpn_ros_client:

cd ~/catkin_ws/src
git clone https://github.com/clearpathrobotics/vrpn_client_ros.git
# ubuntu20.04--ros1--noetic 
# ubuntu18.04--ros1--meloti
sudo apt-get install ros-noetic-vrpn
cd ~/catkin_ws
catkin_make
source devel/setup.bash

报错1:catkin_make 无法通过

undefined reference to `gflags::FlagRegisterer
……
Makefile:138: recipe for target 'all' failed
make: *** [all] Error 2
Invoking "make -j6 -l6" failed
重新安装 gflags & glog 库
  1. 卸载之前的版本
sudo apt-get remove sudo apt-get remove libgoogle-glog-dev
sudo apt-get remove libgflags-dev
  1. 安装 gflags
git clone https://github.com/gflags/gflags.git
cd gflags && mkdir build
# 编译时打开动态库和静态库的选项,不然编译glog时会报错
cmake -DBUILD_SHARED_LIBS=ON -DBUILD_STATIC_LIBS=ON -DINSTALL_HEADERS=ON -DINSTALL_SHARED_LIBS=ON -DINSTALL_STATIC_LIBS=ON ..
make # 编译
sudo make install # 安装
  1. 安装 glog
gitclone https://github.com/google/glog.git
cd glog && mkdir build
cmake -DBUILD_SHARED_LIBS=ON -DBUILD_STATIC_LIBS=ON -DINSTALL_HEADERS=ON -DINSTALL_SHARED_LIBS=ON -DINSTALL_STATIC_LIBS=ON ..
make # 编译
sudo make install # 安装

报错2:安装完成后 catkin_make 报错找不到 glog 库

CMake Error at /usr/local/lib/cmake/Ceres/CeresConfig.cmake:85 (message):
Failed to find Ceres - Missing required Ceres dependency: glog.

因为之前卸载了 glog,所以现在需要重新安装 glog 依赖库。

sudo apt-get install libgoogle-glog-dev

参考博客

链接: natnet/vrpn_cliernt环境配置

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值