mavros安装

2023-05-16

官方地址:

https://github.com/mavlink/mavros

 因为github有时侯不好上,所以我自己弄了个gitee

https://gitee.com/qq408007026/mavros/tree/master

installation 的官方源码安装步骤为

sudo apt-get install python-catkin-tools python-rosinstall-generator -y
# For Noetic use that:
# sudo apt install python3-catkin-tools python3-rosinstall-generator python3-osrf-pycommon -y

# 1. Create the workspace: unneeded if you already has workspace
mkdir -p ~/catkin_ws/src
cd ~/catkin_ws
catkin init
wstool init src

# 2. Install MAVLink
#    we use the Kinetic reference for all ROS distros as it's not distro-specific and up to date
rosinstall_generator --rosdistro kinetic mavlink | tee /tmp/mavros.rosinstall

# 3. Install MAVROS: get source (upstream - released)
rosinstall_generator --upstream mavros | tee -a /tmp/mavros.rosinstall
# alternative: latest source
# rosinstall_generator --upstream-development mavros | tee -a /tmp/mavros.rosinstall
# For fetching all the dependencies into your catkin_ws, just add '--deps' to the above scripts
# ex: rosinstall_generator --upstream mavros --deps | tee -a /tmp/mavros.rosinstall

# 4. Create workspace & deps
wstool merge -t src /tmp/mavros.rosinstall
wstool update -t src -j4
rosdep install --from-paths src --ignore-src -y

# 5. Install GeographicLib datasets:
./src/mavros/mavros/scripts/install_geographiclib_datasets.sh

# 6. Build source
catkin build

# 7. Make sure that you use setup.bash or setup.zsh from workspace.
#    Else rosrun can't find nodes from this workspace.
source devel/setup.bash

 就仿照示例,先建立一个工作区,把代码放进去

mkdir -p ~/work/mav_connection/src
cd ~/work/mav_connection/src
git clone https://gitee.com/qq408007026/mavros
cd ..
catkin init

报错 bash: catkin: command not found 

装一下catkin 

sudo apt-get install python-catkin-tools
wstool init src
rosinstall_generator --rosdistro melodic mavlink | tee /tmp/mavros.rosinstall
rosinstall_generator --upstream mavros | tee -a /tmp/mavros.rosinstall

如果报错ssl.SSLError: ('The read operation timed out',)就多尝试几次就OK了。  

wstool merge -t src /tmp/mavros.rosinstall
wstool update -t src -j4

 wstool update -t src -j4这句话一直报[mavlink,mavros] still active

解决mavros源码安装过程中wstool update -t src -j4报错(网络限制)问题_little han的博客-CSDN博客

找到src目录下.rosinstall文件 将原来的东西更换为

# THIS IS AN AUTOGENERATED FILE, LAST GENERATED USING wstool ON 2022-06-30
- git:
    local-name: mavlink
    uri: https://gitclone.com/github.com/mavlink/mavlink-gbp-release.git
    version: release/melodic/mavlink/2022.3.3-1
- git:
    local-name: mavros
    uri: https://gitclone.com/github.com/mavlink/mavros.git
    version: 1.13.0

 即可

rosdep install --from-paths src --ignore-src -y
sudo ./src/mavros/mavros/scripts/install_geographiclib_datasets.sh
catkin build

 编译到mavros报错c++: internal compiler error: Segmentation fault (program cc1plus)

解决方法:

1.重新安装系统

2.Ubuntu18编译卡壳, c++: internal compiler error: Segmentation fault (program cc1plus) · Issue #56 · RoboMaster/RoboRTS · GitHub

 sudo vim /etc/security/limits.conf

修改为

nvidia hard stack 10240
nvidia soft stack 10240
ubuntu hard stack 10240
ubuntu soft stack 10240
root hard stack 10240
root soft stack 10240

重启电脑

编译完事 

source devel/setup.bash

本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)

mavros安装 的相关文章

随机推荐

  • Git删除历史commit记录中的大文件

    在使用Git的过程中 xff0c 常常会出现不小心commit了没用作用的大文件 xff0c 导致无法push到远程的情况 xff0c 并且即使删除了该文件重新commit xff0c 该文件也已经保存在历史commit中 xff0c 仍然
  • realsense d435 刷固件后连接失败问题

    刷固件后提示 Backend in rs2 create device info list 000001B00E9DF470 index 0 source gt QueryInterface uuidof IKsTopologyInfo r
  • 用Stm32CubeMX在STM32F107上移植LWIP(PHY:DM9161A)

    背景 有一块吃灰7年的神州IV号开发板 xff0c 主控芯片STM32F107VCT6 xff0c PHY芯片DM9161A xff0c 配套的资料都是当年ST的标准库 这个开发板应该是因为当年上市太匆忙 xff0c 资料和代码的细节部分做
  • ROS_Python编程 之 案例代码核心解析(第一版)

    ROS Python编程 之 案例代码核心解析 xff08 第一版 xff09 通过Handsfree mini机器人平台配套的中级教程 xff0c 我对ros python编程实现 传感器数据读取 运动控制 的知识做以下归纳 xff1a
  • 一个结束,又是一个开始

    随着大一期终考试的结束 xff0c 我的C语言学习之旅算是暂告一段落 xff0c 盘点下来我最多就只是学习了一些最皮毛的语法之类的东西 xff01 我同时从各种渠道了解到C语言的特殊地位 是许多计算机语言的根本 xff0c 我也体会到其中的
  • 如何使用 Ubuntu 配置可视化桌面环境?

    https developer aliyun com article 727585 如何使用 Ubuntu 配置可视化桌面环境 xff1f 迪科斯彻 2019 11 20 1340浏览量 简介 xff1a Ubuntu 是一个世界领先的开源
  • 如何将电脑的代理网络以WIFI热点的方式共享

    文章目录 写在前面如何设置PC端连接代理设置共享1 打开win10自带的 移动热点 2 选择 更改适配器选项 3 连接代理4 右键连接 xff0c 打开属性页面 5 重新连接代理 xff0c 重启移动热点注意共享给有线网络 测试 由于各地甲
  • mavros坐标系转换与方向

    2021 05 04更新 xff1a 本文中提到的kinetic版本的mavros中body系的坐标系问题已经被修复为FLU坐标系 xff0c 只需要更新kinetic版本的mavros即可 xff01 sudo apt install r
  • qsort快速排序用法--完整版(解释了cmp)【转】

    原文地址 xff1a http hi baidu com xuhanqiu item 99505e41aeef4eae61d7b916 用qsort快两年的时候了 却一直没有真正弄懂cmp函数的返回值1 1 0的函数 今天在做凸包时 郁闷了
  • 通过 docker 镜像 vcs 进行仿真

    学习空白的贝塔 摸鱼范式公众号 安装docker 并拉取镜像 远程 进行 vcs 与 verdi 的联合仿真 我踩得的坑一一列举 1 直接按照教程安装docker wsl 但是出现问题 安装失败 首先我的账户是中文名字 可能直接导致我安装失
  • FreeRTOS卡在SVC_Handler

    FreeRTOS已经实现了SVC Handler 和PendSV Handler 两个函数的功能 xff0c 对应port c中的vPortSVCHandler 和xPortPendSVHandler 为了使用FreeRTOS的这两个函数
  • 【Git】实现Gitee和Github仓库的同步操作

    本篇博客的设置方法同样可以适用于gitlab等其他平台 不多bb xff0c 直入主题 实现两个仓库的同步 1 准备两个仓库 分别在两个平台创建一个相同名字的仓库 xff0c 当然 xff0c 你也可以在a平台上导入b平台已有的仓库 xff
  • [ROS官方教程] catkin/CMakeLists.txt的使用

    目录 1 概述2 整体结构和顺序3 CMake版本4 功能包名称 package name 5 发现CMake Packages5 1 find package 做了什么5 2 为何将catkin packages指定为Components
  • C++工程:总结 CMake 添加第三方库依赖方式

    代码依赖 这种方式是把第三方库的完整代码直接添加到我们的项目中 xff0c 当做项目代码的一部分进行编译 xff0c 这种方式会把第三方代码和我们的代码混在一起 xff0c 并不推荐使用 首先我们需要到 jsoncpp 下载需要的头文件和实
  • 四款好看实用的CSS表格样式分享

    文章参考 xff1a https www w3cschool cn css css sfrk2opy html https www php cn css tutorial 375461 html https www laozuo org 2
  • 线程与进程,你真得理解了吗

    线程与进程 xff0c 你真得理解了吗 1 进程与线程的关系和区别2 并行与并发3 线程共享了进程哪些资源 相信大家面试时一定没少被一个问题刁难 xff0c 那就是进程和线程的区别是什么 xff1f 这个问题延申开来并不像表面那么简单 xf
  • Ubuntu18.04安装librealsense和realsense-ros

    目录 一 librealsense 1 二进制安装 2 源码安装 xff08 个人推荐 xff09 3 测试运行 4 报错 二 realsense ros xff08 2 3 0 xff09 一 librealsense intel rea
  • KaLibr校准 双目相机和IMU realsense D455

    kalibr安装参考我的另一篇博客https mp csdn net mp blog creation editor 117604718 除此之外 xff0c 需要自己准备棋盘 xff0c 以及棋盘的配置文件april 6x6 50x50c
  • ubuntu系统屏幕分辨率只有一个无法修改

    新装好的ubuntu系统 xff0c 如果没有办法调节适当的分辨率和刷新率 xff0c 多半是没有装显卡驱动 安装方法也很简单 xff0c 在software amp Update里面选择Additional Drivers 选择自己显卡的
  • mavros安装

    官方地址 xff1a https github com mavlink mavros 因为github有时侯不好上 xff0c 所以我自己弄了个gitee https gitee com qq408007026 mavros tree ma