电脑配置

Ubuntu 16.04+ROS kinetic

相关背景

我最近看到github上已经有大牛把rotor_simulation代码放出来了,想用来仿真学习一下无人机,但是苦于配置问题困扰了一段时间,最近跑通了分享一下配置的方法和遇到配置问题的解决办法。

准备工作

1. 下载好ROS相关功能包、wstool、catkin-tools.

$ sudo sh -c 'echo "deb http://packages.ros.org/ros/ubuntu `lsb_release -sc` main" > /etc/apt/sources.list.d/ros-latest.list'
$ wget http://packages.ros.org/ros.key -O - | sudo apt-key add -
$ sudo apt-get update
$ sudo apt-get install ros-kinetic-joy ros-kinetic-octomap-ros ros-kinetic-mavlink python-wstool python-catkin-tools protobuf-compiler libgoogle-glog-dev ros-kinetic-control-toolbox
$ sudo rosdep init
$ rosdep update
$ source /opt/ros/kinetic/setup.bash

2. 在一个src文件夹中编译(文件夹可以自己定,这里以初学者catkin_ws的为例)

$ mkdir -p ~/catkin_ws/src
$ cd ~/catkin_ws/src
$ catkin_init_workspace  # initialize your catkin workspace
$ wstool init
$ wget https://raw.githubusercontent.com/ethz-asl/rotors_simulator/master/rotors_hil.rosinstall
$ wstool merge rotors_hil.rosinstall
$ wstool update

3. 用python_catkin_tools编译你的工作空间

$ cd ~/catkin_ws/
$ catkin build

如果没有python_catkin_tools,先执行下面一步配置,然后在执行上面操作

sudo apt-get install python-catkin-tools 

4. 添加路径(如果是在catkin_ws一般都有添加过了,可以不用这一步骤)

永久添加

$ echo "source ~/catkin_ws/devel/setup.bash" >> ~/.bashrc
$ source ~/.bashrc

参考资料

https://github.com/ethz-asl/rotors_simulator

编译过程中各种可能出现问题以及解决方法

(本过程涉及到修改文件的,其具体路径请参照错误提示的查找)

1. Could not find a package configuration file provided by "geographic_msgs"

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

2. from future import standard_library
ImportError: No module named future

sudo pip install future

3. Could not find a package configuration file provided by "geographic_msgs"

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

4. Could NOT find GeographicLib (missing: GeographicLib_LIBRARIES
  GeographicLib_INCLUDE_DIRS)

sudo apt-get install libgeographic-devsudo apt-get install libgeographic14

参考https://packages.ubuntu.com/source/xenial/geographiclib

5. Could not find a package configuration file provided by "octomap_ros"

sudo apt-get install ros-kinetic-octomap-ros

6. Failed to find glog - Could not find glog include directory, set
  GLOG_INCLUDE_DIR to directory containing glog/logging.h

sudo apt-get install libgoogle-glog-dev

7. Errors     << rotors_hil_interface:make

在hil_interface.h 加入代码

#include <mavros_msgs/HilControls.h>
#include <mavros_msgs/mavlink_convert.h>
#ifndef MAVLINK_Htypedef 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 {

具体添加的代码是上面的第3~6段,列出周围行代码方便找位置。

参考https://github.com/ethz-asl/rotors_simulator/pull/522/files

8. odom.cpp:234:51: error: ‘struct mavlink::common::msg::ODOMETRY’ has no member named ‘twist_covariance’
   ftf::covariance_urt_to_mavlink(cov_vel_map, msg.twist_covariance);

将odom.cpp的234行注释掉

//ftf::covariance_urt_to_mavlink(cov_vel_map, msg.twist_covariance);

如果要使用此cpp再具体解决

9. make[2]: *** No rule to make target '/home/dale/rotor/src/rotors_simulator/rotors_gazebo_plugins/PROTOBUF_PROTOC_EXECUTABLE-NOTFOUND', needed by 'PoseWithCovarianceStamped.pb.cc'.  Stop.

删除build文件夹里面的

rotors_gazebo_plugins

重新编译

参考https://blog.csdn.net/qq_27474467/article/details/80506882

参考资料

https://blog.csdn.net/qq_38019633/article/details/84074442

ROS无人机仿真rotor_simulations配置篇相关推荐

  1. 联想R7000 2020双系统+无人机仿真环境配置

    Ubuntu18.04 无人机仿真环境搭建 背景 电脑配置 一.启动盘制作 二.电脑设置 (一)创建硬盘空白分区 1.打开此电脑->管理->磁盘管理 (二)设置BIOS 1.重启打开BIO ...

  2. Ubuntu PX4无人机仿真环境配置

     目录 一.VM虚拟机安装ubuntu18.04 1.VMware安装 2.新建虚拟机 二.Ubuntu系统配置 1.更改软件安装源 2.安装中文输入法 三.PX4环境搭建 1.安装git 2.下载p ...

  3. Ubuntu18.04下基于ROS和PX4的无人机仿真平台的基础配置搭建(XTDrone的)

    摘自:https://www.ngui.cc/51cto/show-23557.html Ubuntu18.04下基于ROS和PX4的无人机仿真平台的基础配置搭建 编程学习 · 2020/7/12 1 ...

  4. Ubuntu18.04基于ROS和PX4的仿真平台配置

    1.前言 作者只是一名双非本科院校飞控专业的大二学生,想以此记录一下自学飞控的经历,也希望能给刚刚入门的同学一些微薄的帮助. 这个环境的安装可以说是西天取经一般,但安装完后发现如果有领路的人,其实花费 ...

  5. PX4无人机ROS下仿真开发

    PX4无人机ROS下仿真开发 Overview Simulation Px4_control Slam Map Image_process Planning Volans 项目地址volans 注:有 ...

  6. 四旋翼无人机仿真之hector_quadrotor无人机(ROS + Gazebo)(一)

    这里写自定义目录标题 应用环境 hector_quadrotor 功能包结构简介 hector_quadrotor 功能包安装 1. 安装所需依赖库 2. 下载.安装hector_quadrotor ...

  7. ROS + Parrot-Sphinx进行Bebop无人机仿真

    ROS + Parrot-Sphinx进行Bebop无人机仿真 测试环境 一.安装Parrot-Sphinx 二.初步使用 1. 启动并检查firmwared服务 2. 检查WiFi接口名 3. 初步 ...

  8. 无人机仿真之搭建仿真平台-SITL、gazebo、ROS

    文章目录 无人机仿真之仿真平台搭建 前言 ardupilot-SITL---APM飞控 安装 启动仿真 简单仿真 结合gazebo仿真软件的3D环境仿真 环境安装 示例 多无人机仿真 终端操作无人机的 ...

  9. 四旋翼无人机仿真之hector_quadrotor无人机(ROS + Gazebo)(三)传感器数据读取与复现(IMU、GPS)

    系列文章目录 文章1:四旋翼无人机仿真之hector_quadrotor无人机(ROS + Gazebo) 文章2:四旋翼无人机仿真之hector_quadrotor(二)键盘teleop_twist ...

最新文章

  1. springboot 线程池_Spring boot 2 线程池怎么配置
  2. python中字典的练习
  3. 用FFT求信号相位谱
  4. 手写简版spring --4--注入属性和依赖对象
  5. 部署war文件到服务器,war包怎么部署到云服务器
  6. 大厂必备!阿里、字节跳动、京东、腾讯、小米等名企高频面试
  7. 连接mysql的各种方式
  8. 单纯学python能干啥_如何高效学习Python编程,转行的朋友可以过来看看,单纯的经验分享...
  9. 高质量病毒——暴风一号(BoyFine)代码.vbs
  10. 湖南大学ACM程序设计新生杯大赛(同步赛)L - Liao Han
  11. 2019 计蒜之道 初赛 第一场 A-商汤的AI伴游小精灵
  12. 大数据薪水大概多少_大数据工程师工资待遇一般多少?高吗
  13. 操作系统13章(个人笔记)
  14. 图片识别项目 是商品包装识别分类
  15. 使用opengl实现爆炸特效
  16. 远程工具TeamViewer 移动端和PC端连接
  17. 计算机电脑桌面文字虚,字体模糊怎么调节 解决电脑字体模糊的方法大全详细图解...
  18. 听说蚂蚁金服上市,但是实现财务自由的只是那些架构师?
  19. Ubtun16.04 配置baxter机器人
  20. 如何实现沉浸式视频体验?

热门文章

  1. 神码路由器交换机telnet配置
  2. 九州云开放“边缘云”能力 助力中国联通延展业务边界
  3. 简单的实现轮播图和RecyclerView效果
  4. 我的初恋女友与我的现任女友的区别
  5. vscode 翻译神器
  6. 孝义职中计算机类升学,孝义职中问题
  7. tiup cluster reload
  8. ubuntu下音频播放器
  9. 对接钉钉审批_钉钉审批接口调用
  10. 电子针阀在便携式真空计校准装置中的应用