ROS学习中遇到问题及解决

1. 当使用apt-get安装功能包时出现“E:无法定位软件包”

参照: https://blog.csdn.net/baidu_41858278/article/details/87564544?utm_medium=distribute.pc_relevant_t0.none-task-blog-BlogCommendFromMachineLearnPai2-1.channel_param&depth_1-utm_source=distribute.pc_relevant_t0.none-task-blog-BlogCommendFromMachineLearnPai2-1.channel_param

2. robot_state_publisher启动失败处理方法

参照:https://www.freesion.com/article/5864411774/

3. Gazebo [Err] [REST.cc:205] Error in REST request 问题的解决

首先 sudo gedit ~/.ignition/fuel/config.yaml
然后将url : https://api.ignitionfuel.org 用 # 注释掉,添加 url: https://api.ignitionrobotics.org

4. 在catkin_make时出现

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

    move_base_msgsConfig.cmake
    move_base_msgs-config.cmake

  Add the installation prefix of "move_base_msgs" to CMAKE_PREFIX_PATH or set
  "move_base_msgs_DIR" to a directory containing one of the above files.  If
  "move_base_msgs" provides a separate development package or SDK, be sure it
  has been installed.
Call Stack (most recent call first):
  mbot_navigation/CMakeLists.txt:10 (find_package)

这个问题是由于move_base_msgs功能包缺失引起的,我们可以用rospack find命令尝试去寻找这个功能包rospack find move_base_msgs
若找不到则需要安装sudo apt-get install ros-kinetic-navigation

5. Gazebo退出时出现[gazebo_gui-3] escalating to SIGTERM [gazebo-2] escalating to SIGTERM

目前暂时用解决方案(并不能根本解决):运行ros节点执行ctrl+c后进程会转而执行rosspin()后面的程序,但是如果在一定时间内程序没有执行完毕,进程会强制退出,并抛出”escalating to SIGTERM“错误,为了解决此问题,可以修改/opt/ros/kinetic/lib/python2.7/dist-packages/roslaunch路径下的nodeprocess.py文件,将该文件第48行的“_TIMEOUT_SIGINT = 15.0 #seconds”中的15秒改为您期望运行的最大时间。
本问题几乎在所有Gazebo运行结束后都会出现,可能为Gazebo本身的问题,可不必理会。

6. 在添加新的路径到.bashrc文件之后

需要进行source ~/.bashrc

7. Ubuntu18.04 + Windows10 双系统时间显示问题解决方法

解决方法:
①、将硬件时间UTC改为CST,双系统时间保持一致。
sudo timedatectl set-local-rtc 1
重启电脑进入Ubuntu系统中。
②、在ubuntu下更新一下时间,确保时间无误:
sudo apt-get install ntpdate
sudo ntpdate time.windows.com
③、然后将时间更新到硬件上:
sudo hwclock --localtime --systohc
重新进入windows系统,时间就恢复正常了。

你可能感兴趣的:(ROS学习中遇到问题及解决)