rotors simulator 安装方法与错误解决方案

平台:ubuntu16.04+ROS Kinetic+Gazebo7.14

ROS 安装

参考官网http://wiki.ros.org/cn在ubuntu16.04上安装ROS Kinetic,这里不再介绍

Rotors simulator安装

参考官网https://github.com/ethz-asl/rotors_simulator

错误解决方案

(1)rotors_hil_interface问题
rotors simulator 错误解决方法
参考https://github.com/ethz-asl/rotors_simulator/issues/523

或直接

https://github.com/ethz-asl/rotors_simulator/pull/522/files?fbclid=IwAR2SxViGule-u8S4A1kE0L6HCwW3cixtO7IgMBNTp9TILT62TGdXPlsxApw

在rotors_hil_interface/include/rotors_hil_interface/hil_interface.h中添加如下代码:

#include <mavros_msgs/HilControls.h>
#include <mavros_msgs/mavlink_convert.h>
#ifndef MAVLINK_H
  typedef mavlink::mavlink_message_t mavlink_message_t;
  #include <mavlink/v2.0/common/mavlink.h>
#endif 
#include <rotors_hil_interface/hil_listeners.h>
namespace rotors_hil {

(2)Could not find a package configuration file provided by “geographic_msgs”

sudo apt-get install ros-kinetic-geographic-msgs

(3)缺少furture:ImportError: No module named ‘future’

sudo apt-get install python-pip 
pip install --upgrade pip 
pip install future

如果还是出现错误 ,可尝试

 python2 -m pip install future

(4)Could NOT find GeographicLib

sudo apt-get install libgeographic-dev- 

参考自:[1]https://blog.csdn.net/qq_38019633/article/details/84074442

相关文章: