当前位置:网站首页>ROS series (I): rapid installation of ROS
ROS series (I): rapid installation of ROS
2022-04-23 03:37:00 【Yi Lanjun】
Ubuntu After installation , Can be installed ROS The operating system , The general steps are as follows :
- To configure ubuntu Software and updates for ;
- Set installation source ;
- Set up key;
- install ;
- Configure environment variables .
1 To configure ubuntu Software and updates for
To configure ubuntu Software and updates for , Allow installation of non certified software .
Start by opening “ Software and updates ” Dialog box , The details can be found in Ubuntu Search... In the search button .
After opening, configure according to the following figure ( Make sure that... Is checked "restricted", “universe,” and “multiverse.”)
2 Set installation source
Official default installation source :
sudo sh -c 'echo "deb http://packages.ros.org/ros/ubuntu $(lsb_release -sc) main" > /etc/apt/sources.list.d/ros-latest.list'
Or the installation source from Tsinghua University in China
sudo sh -c '. /etc/lsb-release && echo "deb http://mirrors.tuna.tsinghua.edu.cn/ros/ubuntu/ `lsb_release -cs` main" > /etc/apt/sources.list.d/ros-latest.list'
PS:
- After returning , You may need to enter the administrator password
- It is recommended to use domestic resources , Faster installation .
3 Set up key
sudo apt-key adv --keyserver 'hkp://keyserver.ubuntu.com:80' --recv-key C1CF6E31E6BADE8868B172B4F42ED6FBAB17C654
4 install
First, it needs to be updated apt( It used to be apt-get, Official recommended use apt Instead of apt-get),apt It is used to search from Internet warehouse 、 install 、 upgrade 、 Tools for uninstalling software or operating system .
sudo apt update
wait for …
then , Then install the required type of ROS:ROS Multiple types :Desktop-Full、Desktop、ROS-Base. Here are some commonly used Desktop-Full( The official recommendation ) install : ROS, rqt, rviz, robot-generic libraries, 2D/3D simulators, navigation and 2D/3D perception.
sudo apt install ros-noetic-desktop-full
wait for …( More time-consuming )
Friendship tips : Because of the Internet , Cause connection timeout , Installation may fail , As shown below :
Can be called multiple times to update and Installation command , Until success .
5 Configure environment variables
Configure environment variables , Convenient at any time Used in terminal ROS.
echo "source /opt/ros/noetic/setup.bash" >> ~/.bashrc
source ~/.bashrc
6 uninstall
sudo apt remove ros-noetic-*
Be careful : stay ROS edition noetic There is no need to build package dependencies in , No, rosdep Related installation and configuration of .
7 Installation build depends on
stay noetic When originally released , Slightly different from other historical versions : No installation build depends on this step . With noetic Continuously improve , The official complemented this operation .
- First, install the relevant tools that the build depends on
sudo apt install python3-rosdep python3-rosinstall python3-rosinstall-generator python3-wstool build-essential
- initialization rosdep
sudo rosdep init
rosdep update
If all goes well ,rosdep The print results of initialization and update are as follows :
however , stay rosdep On initialization , Most of them throw exceptions .
reason :
Overseas resources are blocked .
solve :
Baidu or google Search for , There are many solutions (https://github.com/ros/rosdistro/issues/9721), It's a pity that ubuntu20.04 Next , Collective failure .
New ideas : Back up relevant resources to gitee, modify rosdep Source code , Relocate resources .
Realization :
1. First open the resource backup path :https://gitee.com/zhao-xuzuo/rosdistro, open rosdistro/rosdep/sources.list.d/20-default.list Keep the file for standby ( Mainly reuse URL Part of :gitee.com/zhao-xuzuo/rosdistro/raw/master).
2. Get into "/usr/lib/python3/dist-packages/" lookup rosdep neutralization raw.githubusercontent.com Related content , Call the command :
find . -type f | xargs grep "raw.githubusercontent"
3. Modify related documents , There are mainly : ./rosdistro/init.py、./rosdep2/gbpdistro_support.py、./rosdep2/sources_list.py 、./rosdep2/rep3.py. have access to sudo gedit Command to modify the file :
In the document URL Content , If it is :raw.githubusercontent.com/ros/rosdistro/master Replace with steps 1 Prepared in gitee.com/zhao-xuzuo/rosdistro/raw/master that will do .
The modification is complete , Execute the command again :
sudo rosdep init
rosdep update
It can be realized normally rosdep Initialization and update of .
版权声明
本文为[Yi Lanjun]所创,转载请带上原文链接,感谢
https://yzsam.com/2022/04/202204220602231931.html
边栏推荐
- Unity basics 2
- Variables, constants, operators
- Codeforces round 784 (Div. 4) (AK CF (XD) for the first time)
- Build websocket server in. Net5 webapi
- Learn about I / O flow and file operations
- Supersocket is Use in net5 - concept
- [microservices] (x) -- Unified gateway
- MySQL zip installation tutorial
- The art of concurrent programming (6): explain the principle of reentrantlock in detail
- 2022 group programming ladder simulation l2-1 blind box packaging line (25 points)
猜你喜欢
File upload vulnerability summary and upload labs shooting range documentary
When migrating tslib_ setup: No such file or directory、ts_ open: No such file or director
Instructions for fastmock
[microservices] (x) -- Unified gateway
浅学一下I/O流和File类文件操作
Install PaddlePaddle on ARM
L3-011 直捣黄龙 (30 分)
Key point detection of human hand based on mediapipe
you need to be root to perform this command
抽象类、接口、常用关键字
随机推荐
VS Studio 修改C语言scanf等报错
2022 团体程序设计天梯赛 模拟赛 L2-3 浪漫侧影 (25 分)
Design and implementation of redis (4): what is the event driver of redis
Section 2 map and structure in Chapter 6
JS - accuracy issues
Idea debug debugging tutorial
QT uses drag and drop picture to control and mouse to move picture
The principle and solution of not allowing pasting in an English Network
L3-011 direct attack Huanglong (30 points)
Paddlepaddle does not support arm64 architecture.
C-11 problem I: find balloon
标识符、关键字、数据类型
Database SQL -- simulate inserting a large amount of data, importing / exporting database scripts, timestamp conversion and database basics
2022 团体程序设计天梯赛 模拟赛 L2-4 哲哲打游戏 (25 分)
Abstract classes, interfaces and common keywords
Visual programming - drawing assignment
Talent Plan 学习营初体验:交流+坚持 开源协作课程学习的不二路径
淺學一下I/O流和File類文件操作
Unity games and related interview questions
Development record of primary sensitive word detection