当前位置:网站首页>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
边栏推荐
- Using jsonserialize to realize data type conversion gracefully
- Variable definition and use
- PYMOL-note
- Openvino only supports Intel CPUs of generation 6 and above
- Variables, constants, operators
- Applet - canvas drawing Poster
- Leetcode 617 merge binary tree
- What to pay attention to when writing the first code
- Codeforces Round #784 (Div. 4)题解 (第一次AK cf (XD
- Problem B: small challenge
猜你喜欢

变量、常量、运算符

Section 1 array and slicing in Chapter 6

Unity knowledge points (common core classes)

Build websocket server in. Net5 webapi

Wechat applet canvas draws a simple asymptotic color of the dashboard

Redis(17) -- Redis缓存相关问题解决

Mechanical design knowledge point planning

Unity games and related interview questions

Redis (17) -- redis cache related problem solving

Development record of primary sensitive word detection
随机推荐
批量下載文件----壓縮後再下載
2022 group programming ladder simulation l2-1 blind box packaging line (25 points)
C abstract class
File upload vulnerability summary and upload labs shooting range documentary
C interface
The content of the website is prohibited from copying, pasting and saving as JS code
Create virtual machine
2021-08-31
Now is the best time to empower industrial visual inspection with AI
QT uses drag and drop picture to control and mouse to move picture
集合之List接口
MySQL is completely uninstalled and MySQL service is cleaned up
Oracle query foreign keys contain comma separated data
Punch in: 4.23 C language chapter - (1) first knowledge of C language - (12) structure
Unity basics 2
MySQL query specifies that a row is sorted to the first row
7-2 Tushare
Use the thread factory to set the thread name in the thread pool
The principle and solution of not allowing pasting in an English Network
2022 group programming ladder simulation match 1-8 are prime numbers (20 points)