Ubuntu 18.04文件下载

2023-05-16

ubuntu_sim_ros_melodic.sh

链接: link.

下面为打开后的具体情况

// 
#!/bin/bash

## Bash script for setting up ROS Melodic (with Gazebo 9) development environment for PX4 on Ubuntu LTS (18.04).
## It installs the common dependencies for all targets (including Qt Creator)
##
## Installs:
## - Common dependencies libraries and tools as defined in `ubuntu_sim_common_deps.sh`
## - ROS Melodic (including Gazebo9)
## - MAVROS

if [[ $(lsb_release -sc) == *"xenial"* ]]; then
  echo "OS version detected as $(lsb_release -sc) (16.04)."
  echo "ROS Melodic requires at least Ubuntu 18.04."
  echo "Exiting ...."
  return 1;
fi

echo "Downloading dependent script 'ubuntu_sim_common_deps.sh'"
# Source the ubuntu_sim_common_deps.sh script directly from github
common_deps=$(wget https://raw.githubusercontent.com/PX4/Devguide/master/build_scripts/ubuntu_sim_common_deps.sh -O -)
wget_return_code=$?
# If there was an error downloading the dependent script, we must warn the user and exit at this point.
if [[ $wget_return_code -ne 0 ]]; then echo "Error downloading 'ubuntu_sim_common_deps.sh'. Sorry but I cannot proceed further :("; exit 1; fi
# Otherwise source the downloaded script.
. <(echo "${common_deps}")

# ROS Melodic
## Gazebo simulator dependencies
sudo apt-get install protobuf-compiler libeigen3-dev libopencv-dev -y

## ROS Gazebo: http://wiki.ros.org/melodic/Installation/Ubuntu
## Setup keys
sudo sh -c 'echo "deb http://packages.ros.org/ros/ubuntu $(lsb_release -sc) main" > /etc/apt/sources.list.d/ros-latest.list'
sudo apt-key adv --keyserver 'hkp://keyserver.ubuntu.com:80' --recv-key C1CF6E31E6BADE8868B172B4F42ED6FBAB17C654
## For keyserver connection problems substitute hkp://pgp.mit.edu:80 or hkp://keyserver.ubuntu.com:80 above.
sudo apt-get update
## Get ROS/Gazebo
sudo apt install ros-melodic-desktop-full -y
## Initialize rosdep
sudo rosdep init
rosdep update
## Setup environment variables
rossource="source /opt/ros/melodic/setup.bash"
if grep -Fxq "$rossource" ~/.bashrc; then echo ROS setup.bash already in .bashrc;
else echo "$rossource" >> ~/.bashrc; fi
eval $rossource

## Install rosinstall and other dependencies
sudo apt install python-rosdep python-rosinstall python-rosinstall-generator python-wstool build-essential -y



# MAVROS: https://dev.px4.io/en/ros/mavros_installation.html
## Install dependencies
sudo apt-get install python-catkin-tools python-rosinstall-generator -y

## Create catkin workspace
mkdir -p ~/catkin_ws/src
cd ~/catkin_ws
catkin init
wstool init src


## 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

## Build MAVROS
### Get source (upstream - released)
rosinstall_generator --upstream mavros | tee -a /tmp/mavros.rosinstall

### Setup workspace & install deps
wstool merge -t src /tmp/mavros.rosinstall
wstool update -t src
if ! rosdep install --from-paths src --ignore-src -y; then
    # (Use echo to trim leading/trailing whitespaces from the unsupported OS name
    unsupported_os=$(echo $(rosdep db 2>&1| grep Unsupported | awk -F: '{print $2}'))
    rosdep install --from-paths src --ignore-src --rosdistro melodic -y --os ubuntu:bionic
fi

if [[ ! -z $unsupported_os ]]; then
    >&2 echo -e "\033[31mYour OS ($unsupported_os) is unsupported. Assumed an Ubuntu 18.04 installation,"
    >&2 echo -e "and continued with the installation, but if things are not working as"
    >&2 echo -e "expected you have been warned."
fi

#Install geographiclib
sudo apt install geographiclib-tools -y
echo "Downloading dependent script 'install_geographiclib_datasets.sh'"
# Source the install_geographiclib_datasets.sh script directly from github
install_geo=$(wget https://raw.githubusercontent.com/mavlink/mavros/master/mavros/scripts/install_geographiclib_datasets.sh -O -)
wget_return_code=$?
# If there was an error downloading the dependent script, we must warn the user and exit at this point.
if [[ $wget_return_code -ne 0 ]]; then echo "Error downloading 'install_geographiclib_datasets.sh'. Sorry but I cannot proceed further :("; exit 1; fi
# Otherwise source the downloaded script.
sudo bash -c "$install_geo"

## Build!
catkin build
## Re-source environment to reflect new packages/build environment
catkin_ws_source="source ~/catkin_ws/devel/setup.bash"
if grep -Fxq "$catkin_ws_source" ~/.bashrc; then echo ROS catkin_ws setup.bash already in .bashrc;
else echo "$catkin_ws_source" >> ~/.bashrc; fi
eval $catkin_ws_source

common_deps

https://raw.githubusercontent.com/PX4/Devguide/master/build_scripts/ubuntu_sim_common_deps.sh

#!/bin/bash

## Bash script for setting up a PX4 development environment on Ubuntu LTS (16.04).
## It can be used for installing simulators (only) or for installing the preconditions for Snapdragon Flight or Raspberry Pi.
##
## Installs:
## - Common dependencies and tools for all targets (including: Ninja build system, pyulog)
## - jMAVSim simulator dependencies
## - PX4/Firmware source (to ~/src/Firmware/)

# Preventing sudo timeout https://serverfault.com/a/833888
trap "exit" INT TERM; trap "kill 0" EXIT; sudo -v || exit $?; sleep 1; while true; do sleep 60; sudo -nv; done 2>/dev/null &

# Ubuntu Config
echo "Remove modemmanager"
sudo apt-get remove modemmanager -y
echo "Add user to dialout group for serial port access (reboot required)"
sudo usermod -a -G dialout $USER

# Common dependencies
echo "Installing common dependencies"
sudo apt-get update -y
sudo apt-get install git zip cmake build-essential genromfs ninja-build exiftool astyle -y
# make sure xxd is installed, dedicated xxd package since Ubuntu 18.04 but was squashed into vim-common before
which xxd || sudo apt install xxd -y || sudo apt-get install vim-common --no-install-recommends -y
# Required python packages
sudo apt-get install python-argparse python-empy python-toml python-numpy python-dev python-pip -y
sudo -H pip install --upgrade pip
sudo -H pip install pandas jinja2 pyserial pyyaml
# optional python tools
sudo -H pip install pyulog

# jMAVSim simulator dependencies
echo "Installing jMAVSim simulator dependencies"
sudo apt-get install ant openjdk-8-jdk openjdk-8-jre -y

install_geo

https://raw.githubusercontent.com/mavlink/mavros/master/mavros/scripts/install_geographiclib_datasets.sh

#!/bin/bash
# Script to install the model datasets required
# to GeographicLib apply certain conversions

if [[ $UID != 0 ]]; then
	echo "This script require root privileges!" 1>&2
	exit 1
fi

# Install datasets
run_get() {
	local dir="$1"
	local tool="$2"
	local model="$3"

	files=$(shopt -s nullglob dotglob; echo /usr/share/GeographicLib/$dir/$model* /usr/local/share/GeographicLib/$dir/$model*)
	if (( ${#files} )); then
		echo "GeographicLib $tool dataset $model already exists, skipping"
		return
	fi

	echo "Installing GeographicLib $tool $model"
	geographiclib-get-$tool $model >/dev/null 2>&1
	
	files=$(shopt -s nullglob dotglob; echo /usr/share/GeographicLib/$dir/$model* /usr/local/share/GeographicLib/$dir/$model*)
	if (( ! ${#files} )); then
		echo "Error while installing GeographicLib $tool $model"
		return
	fi
}

# check which command script is available
if hash geographiclib-get-geoids; then
	run_get geoids geoids egm96-5
	run_get gravity gravity egm96
	run_get magnetic magnetic emm2015
elif hash geographiclib-datasets-download; then # only allows install the goid model dataset
	geographiclib-datasets-download egm96_5;
else
	echo "OS not supported! Check GeographicLib page for supported OS and lib versions." 1>&2
fi

仅供参考 如有侵权,请联系删除

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

Ubuntu 18.04文件下载 的相关文章

随机推荐

  • 使用Python调用C++库(基于pybind11)

    本文将用C 43 43 编写一个简单的向量运算库 xff0c 然后使用pybind11将其封装为python包 xff0c 再使用python调用 C 43 43 程序使用CMake构建 使用C 43 43 调用Python模块见 xff1
  • FTP实现Ubuntu与Windows文件互传

    FTP实现window与ubuntu文件互传 本文将介绍如何使用FTP实现Ubuntu和Windows间的文件互传 xff0c 基本方法是在Ubuntu主机上安装FTP服务端 xff0c 在其他设备 Windows 上安装FTP客户端 以下
  • KD-Tree详解: 从原理到编程实现

    C 43 43 实现链接 https gitee com ghowoght kd tree 在点云操作中 xff0c 常常需要从大量点云中找到距离输入点最近的点 xff0c 如果使用线性搜索 xff0c 逐个判断与输入点的距离 xff0c
  • FRP + NoMachine远程桌面开发指南

    在FRP内网穿透 远程ssh终端 43 rdp桌面配置 中介绍了如何远程使用FRP 43 RDP进行外网远程桌面访问 xff0c 但是实测很卡 在两台Ubuntu主机上进行了测试 xff0c 云服务器有8M带宽 xff0c 所以对这种远程桌
  • 升级!!!运用select实现一个简单的TCP通信!

    升级 xff01 xff01 xff01 运用select实现一个简单的TCP通信 多路转接模型select模型select模型的操作流程简介 TCP的实现封装一个TCP服务端封装一个select类main程序 多路转接模型 多路转接IO
  • 嵌入式部分BUG与解决方法记录(不定期更新)

    关闭串口缓存 在使用422转USB数据线采集IMU数据时 xff0c 上位机的USB驱动程序会对接收到的数据进行缓存 xff0c 表现在于IMU使用200Hz的频率发送IMU数据 xff0c 而采集到的IMU数据的时间戳间隔并不是5ms x
  • Windows的C++开发环境搭建(基于vcpkg+CMake)

    一直以来 xff0c 笔者都认为在windows中使用cmake开发C 43 43 是一件很难搞的事 xff0c windows不像linux那样能方便地对各种C 43 43 软件包进行管理 xff0c 直到发现了vcpkg这个包管理器 x
  • C++/Python文件读写

    C 43 43 为了方便开发 xff0c 写了一个文本读写程序 xff0c 能够读写二进制 文本格式的文件 xff0c 程序只由一个头文件组成 xff0c 可以很方便地加入到现有程序 完整程序如下 xff1a span class toke
  • 遥控小车日志

    上周六 xff0c 我的老师扔给我一台四轮普通直流电机小车 xff08 下图 xff0c 已组装好 xff09 xff0c 叫我实现无线控制功能 xff0c 由PC端或手机端发送指令 由于我曾经做过步进电机小车的控制 xff0c 同时最近学
  • 数值优化学习笔记(一)C++实现线性搜索的最速下降法(以Rosenbrock函数为例)

    Rosenbrock函数介绍 Rosenbrock是可导非凸函数 xff0c 二维情况下的函数值情况如下 xff1a 高维函数定义如下 xff1a f x 61
  • 软中断-小结

    1 软中断类型是静态定义的 xff0c 10种 2 软中断回调函数是在本地CPU开中断的情况下执行 因此能够被中断打断 xff0c 但是软中断无法抢占软中断 因为在irq exit的时候会判断是否在中断上下文 xff0c 如果在中断上下文不
  • slam中ceres的用法解析

    slam中ceres的常见用法总结 1 ceres 使用流程2 ICP实例2 1 优化状态参数化2 2 jacobian矩阵的求解 1 ceres 使用流程 ceres的使用过程基本可以总结为 1 创建优化问题与损失核函数 ceres Pr
  • Kalibr进行IMU+相机的标定

    环境 xff1a Ubuntu18 04 Kalibr代码连接 xff1a https github com ethz asl kalibr 1 安装依赖 ROSsudo apt get install python setuptools
  • Docker容器之镜像仓库详解

    Docker容器之镜像仓库详解 文章目录 Docker容器之镜像仓库详解1 什么是Docker Image xff1f 2 什么是Docker Registry 3 镜像相关的操作 本文将集中对镜像 仓库 容器的概念与三者之间的联系进行详细
  • Linux 中 rc.local、init.d、rc.x、init 这几个文件(夹)各有什么作用?启动执行的脚本应该均放在 rc.local 中吗?

    Linux 中 rc local init d rc x init 这几个文件 夹 各有什么作用 启动执行的脚本应该均放在 rc local 中吗 参考链接 1 https www zhihu com question 20126189 2
  • PX4 Offboard模式调试指南

    下载QGroundcontrol https docs qgroundcontrol com master en getting started quick start html 飞控初始化配置 按PX4基本配置指南走 https docs
  • PX4 PID调试指南

    PX4基本配置参考 xff1a https blog csdn net qq 42703283 article details 115214729 spm 61 1001 2014 3001 5501 本文仅供参考 xff0c 如有困惑的参
  • ROS:OpenCV的常用头文件解释

    1 include lt cv bridge cv bridge h gt include lt cv bridge cv bridge h gt cv bridge类 xff1a 这个类中提供的API主要功能是将图像从sensor msg
  • STM32介绍

    STM32 是意法半导体推出的 32 位 ARM Cortex M 内核微控制器系列 xff0c 具有高性能 低功耗 可靠性强等特点 xff0c 广泛应用于工业控制 智能家居 汽车电子 医疗设备等领域 本文将详细介绍 STM32 系列的特点
  • Ubuntu 18.04文件下载

    ubuntu sim ros melodic sh 链接 link 下面为打开后的具体情况 span class token comment span span class token operator span span class to