在使用gazebo仿真机械臂的过程中,由于需要添加夹爪,因此需要下载robotiq官方的夹爪包,但是该夹爪包在gazebo环境里会出现无法合在一起的问题,大概率是因为驱动包的原因,下载官方的驱动包后进行编译,出错:
error: no matching function for call to ‘google::protobuf::internal::ArenaStringPtr::GetNoArena(const string*) const’
这个时候应该是protof的版本需要更新
首先需要把旧版本都进行卸载:
sudo apt-get clean
sudo apt-get autoclean
sudo apt-get autoremove
sudo apt-get remove --purge protobuf-compiler
然后再重新进行安装:
sudo dpkg -P protobuf-compiler
sudo apt-get install libprotobuf-dev protobuf-compiler
wget https://github.com/google/protobuf/archive/v3.0.0.zip
unzip v3.0.0.zip
cd protobuf-3.0.0
进入到protobuf-3.0.0文件夹后,找到autogen.sh进行编辑:
注释掉autogen.sh下的
# echo "Google Mock not present. Fetching gmock-1.7.0 from the web..."
# curl $curlopts -O https://googlemock.googlecode.com/files/gmock-1.7.0.zip
去github上下载gmock-1.7.0.zip放在protobuf-3.0.0文件夹中
执行
./autogen.sh
./configure
make
make check
sudo make install
重新编译通过
版权声明:本文为qq_60566155原创文章,遵循 CC 4.0 BY-SA 版权协议,转载请附上原文出处链接和本声明。