当前位置:网站首页>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
边栏推荐
- Applet - WXS
- The query type of MySQL is very inefficient.
- Database - MySQL -- Navicat import SQL error 1067 - invalid default value for 'paydate‘
- C abstract class
- Picture synthesis video
- Oracle query foreign keys contain comma separated data
- Download and configuration of idea
- Use the thread factory to set the thread name in the thread pool
- Idea debug debugging tutorial
- MySQL is completely uninstalled and MySQL service is cleaned up
猜你喜欢
Now is the best time to empower industrial visual inspection with AI
Create virtual machine
Translation of l1-7 matrix columns in 2022 group programming ladder Simulation Competition (20 points)
C interface
对象和类的概念
Common auxiliary classes
Database - MySQL -- Navicat import SQL error 1067 - invalid default value for 'paydate‘
Seekbar custom style details
[microservices] (x) -- Unified gateway
Openvino only supports Intel CPUs of generation 6 and above
随机推荐
Codeforces Round #784 (Div. 4)题解 (第一次AK cf (XD
Design and implementation of redis (3): persistence strategy RDB, AOF
Identificateur, mot - clé, type de données
[microservices] (x) -- Unified gateway
Punch in: 4.22 C language chapter - (1) first knowledge of C language - (11) pointer
Picture synthesis video
List interface of collection
抽象类、接口、常用关键字
2021-08-31
Three column layout (fixed width on both sides in the middle and fixed width on both sides in the middle)
Visual programming - drawing assignment
Unity knowledge points (ugui)
The art of concurrent programming (2): synchronized usage scenarios
What to pay attention to when writing the first code
Paddlepaddle model to onnx
Supersocket is Use in net5 - startup
Docker pulls MySQL and connects
Leetcode punch in diary day 01
PWA I'm here
Design and implementation of redis (5): master-slave replication strategy and optimization