ROS 遇到问题及解决——汇总

1  ImportError: No module named future

Traceback (most recent call last):
  File "/home/b/MMC_ArduPilot/modules/mavlink/pymavlink/tools/mavgen.py", line 16, in <module>
    from pymavlink.generator import mavgen
  File "/home/b/MMC_ArduPilot/modules/mavlink/pymavlink/generator/mavgen.py", line 12, in <module>
    from future import standard_library
ImportError: No module named future

解决方法:

手动安装缺少依赖,sudo pip install future

from:https://blog.csdn.net/hanjuefu5827/article/details/81868431

2  在运行ROS-GAZEBO的时候: roslaunch mbot_gazebo view_mbot_gazebo_play_ground.launch

Traceback (most recent call last):
  File "/opt/ros/kinetic/lib/python2.7/dist-packages/roslaunch/__init__.py", line 308, in main
    p.start()
 
    full_path = _get_executable_path(rp.get_path(args[0]), path)
  File "/usr/lib/python2.7/dist-packages/rospkg/rospack.py", line 207, in get_path
    raise ResourceNotFound(name, ros_paths=self._ros_paths)
ResourceNotFound: gazebo_ros
ROS path [0]=/opt/ros/kinetic/share/ros
ROS path [1]=/home/wang/catkin_ws/src/mav_comm/mav_comm

ROS path [17]=/opt/ros/kinetic/share

解决方法:sudo apt-get install ros-kinetic-gazebo-ros

https://blog.csdn.net/weixin_41281801/article/details/83856849?utm_medium=distribute.pc_relevant.none-task-blog-BlogCommendFromMachineLearnPai2-14.control&depth_1-utm_source=distribute.pc_relevant.none-task-blog-BlogCommendFromMachineLearnPai2-14.control

3  not find a package configuration file provided by “gazebo_ros_control“

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

    gazebo_ros_controlConfig.cmake
    gazebo_ros_control-config.cmake

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

1.安装解决:sudo apt-get install -y libgazebo7-dev

https://blog.csdn.net/weixin_39059031/article/details/84036479

4  ROS运行rosdep init错误

$ rosdep init
ERROR: cannot download default sources list from:
https://raw.githubusercontent.com/ros/rosdistro/master/rosdep/sources.list.d/20-default.list
Website may be down.

解决方法:https://blog.csdn.net/c417469898/article/details/106382727/

5  ubuntu16.04安装 catkin_tools

https://blog.csdn.net/anlaiji6783/article/details/101122956

6  在ROS编译过程中经常会遇到找不到ROS包的情况,如下所示

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

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

http://www.360doc.com/content/18/0824/20/40416686_780948485.shtml

7 fatal error: ignition/math/Inertial.hh: No such file or directory解决方法

/usr/include/gazebo-7/gazebo/msgs/msgs.hh:24:37: fatal error: ignition/math/Inertial.hh: No such file or directory
原因:升级gazebo后缺少依赖库

解决:sudo apt-get install libignition-math2-dev

https://blog.csdn.net/qq_32115419/article/details/82744653

8  some warning

This looks like just a warning; it shouldn't prevent your code from compiling and running.

The warning in question is telling you that you're asking it to print an unsigned type with a signed format string:

warning: format ‘%d’ expects argument of type ‘int’, but argument 8 has type ‘std::queue<int>::size_type {aka long unsigned int}’

Instead of using the %d type specifier, you should use an unsigned specifier like %ud, or the dedicated specifier for size_t: %zd

https://answers.ros.org/question/233107/why-doesnt-ros_info-allow-calling-stdqueuesize-inside-as-a-param/

9  Gazebo和Protobuf版本冲突

/usr/include/gazebo-7/gazebo/msgs/msgs.hh:24:37: fatal error: ignition/math/Inertial.hh: No such file or directory
原因:升级gazebo后缺少依赖库

解决:sudo apt-get install libignition-math2-dev

https://zhuanlan.zhihu.com/p/116013599

10  旋翼飞行器 ROS - Gazebo 仿真环境搭建

https://blog.csdn.net/otter1010/article/details/90694312?utm_medium=distribute.pc_relevant.none-task-blog-BlogCommendFromBaidu-1.control&depth_1-utm_source=distribute.pc_relevant.none-task-blog-BlogCommendFromBaidu-1.control

11  Asctec 四轴飞行器 Gazebo 仿真

https://blog.csdn.net/junshen1314/article/details/53348096

 

 

  • 2
    点赞
  • 7
    收藏
    觉得还不错? 一键收藏
  • 2
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论 2
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值