ROS下载缓慢

如果是在国内安装,建议在安装之前先配置国内的镜像源,在软件和更新进行更改即可

在这里插入图片描述

参考:Ubuntu18.04下安装ROS

由于没有公钥,无法验证下列签名

安装ROS时报错:

W: GPG 错误:http://mirrors.ustc.edu.cn/ros/ubuntu bionic InRelease: 由于没有公钥,无法验证下列签名: NO_PUBKEY F42ED6FBAB17C654
E: 仓库 “http://mirrors.ustc.edu.cn/ros/ubuntu bionic InRelease” 没有数字签名。
N: 无法安全地用该源进行更新,所以默认禁用该源。

解决方法:

sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-key F42ED6FBAB17C654

其中F42ED6FBAB17C654要替代为报错时NO_PUBKEY后的序列号

fatal error: ros/ros.h: 没有那个文件或目录

使用VScode配置ROS开发环境时报错

fatal error: ros/ros.h: 没有那个文件或目录

解决方法为在创建ROS包时,要选择roscpp依赖项

find_package(catkin REQUIRED COMPONENTS
  roscpp
  rospy
)

tf时间戳出现警告

Warning: TF_OLD_DATA ignoring data from the past for frame base_link at time 1.59764e+09 according to authority unknown_publisher

解决方法

rosparam set use_sim_time true

安装Realsense的ROS功能包报错

CMake Error at /opt/ros/melodic/share/catkin/cmake/catkinConfig.cmake:83 (find_package):
  Could not find a package configuration file provided by
  "ddynamic_reconfigure" with any of the following names:

    ddynamic_reconfigureConfig.cmake
    ddynamic_reconfigure-config.cmake

  Add the installation prefix of "ddynamic_reconfigure" to CMAKE_PREFIX_PATH
  or set "ddynamic_reconfigure_DIR" to a directory containing one of the
  above files.  If "ddynamic_reconfigure" provides a separate development
  package or SDK, be sure it has been installed.

从https://github.com/pal-robotics/ddynamic_reconfigure/tree/kinetic-devel下载ddynamic_reconfigure,放到/src文件夹下,重新编译即可

运行时报错:undefined symbol
报错信息:

devel/lib//libsampling_planner_lib.so: undefined symbol: _ZN18base_local_planner12CostmapModelC1ERKN10costmap_2d9Costmap2DE

使用以下指令查看具体报错信息:

c++filt _ZN18base_local_planner12CostmapModelC1ERKN10costmap_2d9Costmap2DE

返回:

base_local_planner::CostmapModel::CostmapModel(costmap_2d::Costmap2D const&)

可以看出是找不到base_local_planner依赖项
解决方法:在CMakeList的find_package字段中加入base_local_planner