Ubuntu18.04 中编译 TI 官方的ros驱动包中 autonomous_robotics_ros 包所存在的问题及解决方案

环境:

安装有 ROS 系统的 Ubuntu18.04 环境,并且已将 TI 官方的毫米波雷达 ROS 驱动下载到Ubuntu18.04系统中,如需获取此代码请点击此链接根据教程下载即可。

代码下载链接:TI IWR6843ISK ROS驱动程序搭建-CSDN博客

问题1:

编译时出现没有 turtlebot_msgs 安装包的提示

解决方案:

将下面链接中的代码克隆或者下载zip文件到autonomous_robotics_ros/src/turtlebot/文件夹下

git clone https://github.com/turtlebot/turtlebot_msgs.git

将此 turtlebot_msgs 安装包克隆或者下载到autonomous_robotics_ros/src/turtlebot/文件夹下之后,再次执行 catkin_make 指令编译即可。

问题2:

#error This file was generated by an older version of protoc which is:

fecea42140f14207a4481f057d81da48.png

解决方法:

上述的问题主要是

error This file was generated by an older version of protoc which is:错误此文件是由旧版本的protoc生成的,我目前的版本为3.4.0,因此需要下载新版本的protoc才行。因为我的系统是Ubuntu18.04,此本版的gazebo对应的protoc版本为protoc 3.0.0.

根据如下步骤进行操作更新protoc文件

1)查看protoc文件版本

 protoc --version  

fe2fcc8550d54e549694d5934bdcde6d.png

2)首先移除原有的 protobuf 

cd /usr/local/include/google
sudo rm -rf protobuf

d460f7f594c942f6aaef92a64461f40f.png

3)下载protobuf文件,因为我自己的是protobuf 3.4.0,我这里就先下载了protobuf-v3.0.0

,按照所有步骤操作完成之后,如果还报版本不对的错误,说明这个v3.0.0 版本不对,需要根据下载更新的版本或者更旧的版本~~)

# 进入mmwave_ti_ros/autonomous_robotics_ros/src/文件下
cd mmwave_ti_ros/autonomous_robotics_ros/src/turtlebot/

# 克隆 protobuf v3.0.0 文件
git clone https://github.com/protocolbuffers/protobuf/tree/v3.0.0

下载完成后,执行如下操作编译 protobuf 3.0.0 文件,先进行自动配置,然后当前路径下会生成一个configure文件,指定安装路径

cd protobuf-3.0.0
./autogen.sh
./configure
make
make check
sudo make install
sudo ldconfig

至此 protobuf 3.0.0 安装完成,可以使用如下指令进行查询

protoc --version

2650cc9f075f4aed9c7f1a0a544bf84f.png

注意:执行 ./autogen.sh时,如果出现下面的问题

:~/third_library/protobuf-3.0.0$ ./autogen.sh 
Google Mock not present.  Fetching gmock-1.7.0 from the web...
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
  0     0    0     0    0     0      0      0 --:--:--  0:02:09 --:--:--     0
  curl: (7) Failed to connect to googlemock.googlecode.com port 443: 连接超时

解决方法是之间通过下载gmock 这个文件 ,链接:paulsapps/gmock-1.7.0首页 - GitCode,然后放到 protobuf-3.0.0/ 文件夹下,并且 将文件夹 gmock-1.7.0/改名为 gmock/ ,然后再次执行 ./autogen.sh 指令即可。

到此,protobuf问题已解决,在执行 catkin_make 指令编译之前,需要将刚刚下载的autonomous_robotics_ros/src/turtlebot/ protobuf-3.0.0/文件夹删除,然后再执行 catkin_make 指令编译,不然编译不了。

参考博客:

Turtlebot1入门教程-安装Turtlebot(Ubuntu18.04+Melodic)_sudo apt-get install ros-melodic-kobuki-CSDN博客

error This file was generated by an xxx version of protoc which is 解决方法_error: #error this file was generated by an older -CSDN博客

 Ubuntu 18.04 安装protobuf --- version 3.20.3_protobuf 3.20-CSDN博客

Gazebo需要的protoc版本与google-cartographer需要的版本不一致_protobuf 哪个版本与 gazebo 9 兼容-CSDN博客

This file was generated by an older version of protoc 解决方法_windows下#error: this file was generated by an olde-CSDN博客

 

最近更新

  1. TCP协议是安全的吗?

    2024-03-18 06:54:05       16 阅读
  2. 阿里云服务器执行yum,一直下载docker-ce-stable失败

    2024-03-18 06:54:05       16 阅读
  3. 【Python教程】压缩PDF文件大小

    2024-03-18 06:54:05       15 阅读
  4. 通过文章id递归查询所有评论(xml)

    2024-03-18 06:54:05       18 阅读

热门阅读

  1. python request pandas excel 接口自动化测试框架

    2024-03-18 06:54:05       18 阅读
  2. 【XML】xml转Freemind思维导图

    2024-03-18 06:54:05       18 阅读
  3. string和stringbuilder

    2024-03-18 06:54:05       18 阅读
  4. Unity转换字符串中文繁简体

    2024-03-18 06:54:05       20 阅读
  5. python图形化编程turtle小乌龟

    2024-03-18 06:54:05       17 阅读
  6. 大语言模型相关工具使用链接

    2024-03-18 06:54:05       21 阅读
  7. LLaMA-2 简介:开源大型语言模型的新篇章

    2024-03-18 06:54:05       20 阅读
  8. Linux初级知识大全(一)

    2024-03-18 06:54:05       21 阅读
  9. Spark 用AnyFunSuite单元测试Scala详细教程

    2024-03-18 06:54:05       17 阅读