首页 > 系统相关 >ubuntu下ROS noetic安装

ubuntu下ROS noetic安装

时间:2022-11-27 11:44:35浏览次数:63  
标签:noetic ROS sudo list https ubuntu rosdistro ros

1.ubuntu | 镜像站使用帮助 | 清华大学开源软件镜像站 | Tsinghua Open Source Mirror

sudo gedit /etc/apt/sources.list
deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ focal main restricted universe multiverse
# deb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ focal main restricted universe multiverse
deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ focal-updates main restricted universe multiverse
# deb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ focal-updates main restricted universe multiverse
deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ focal-backports main restricted universe multiverse
# deb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ focal-backports main restricted universe multiverse
deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ focal-security main restricted universe multiverse
# deb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ focal-security main restricted universe multiverse
2.noetic/Installation/Ubuntu - ROS Wiki
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'

3.

sudo apt install curl # if you haven't already installed curl
curl -s https://raw.githubusercontent.com/ros/rosdistro/master/ros.asc | sudo apt-key add -

4.

sudo apt update

5.

sudo apt install ros-noetic-desktop-full

6.

echo "source /opt/ros/noetic/setup.bash" >> ~/.bashrc
source ~/.bashrc

7.

sudo apt install python3-rosdep python3-rosinstall python3-rosinstall-generator python3-wstool build-essential

8.

sudo rosdep init
rosdep updater

一般情况下回报错,解决办法:

1.

rm -rf /etc/ros/rosdep/sources.list.d/20-default.list

2.直接修改源码文件

(1)sudo vi /usr/lib/python3.7/dist-packages/rosdep2/sources_list.py 其中/usr/lib/python3.7为自己安装python的路径,根据自己版本以及安装路径更换。

原文件内容:

DEFAULT_SOURCES_LIST_URL = 'https://raw.githubusercontent.com/ros/rosdistro/master/rosdep/sources.list.d/20-default.list'

更改为:

DEFAULT_SOURCES_LIST_URL='https://gitee.com/ssonic/rosdistro/raw/master/rosdep/sources.list.d/20-default.list'

(2)sudo vi /usr/lib/python3.7/dist-packages/rosdep2/gbpdistro_support.py 其中/usr/lib/python3.7为自己安装python的路径,根据自己版本以及安装路径更换。

原文件内容:

FUERTE_GBPDISTRO_URL = 'https://raw.githubusercontent.com/ros/rosdistro/master/releases/fuerte.yaml'

更改为:

FUERTE_GBPDISTRO_URL = 'https://gitee.com/ssonic/rosdistro/raw/master/releases/fuerte.yaml'

(3)sudo vi /usr/lib/python3.7/dist-packages/rosdep2/rep3.py 其中/usr/lib/python3.7为自己安装python的路径,根据自己版本以及安装路径更换。

REP3_TARGETS_URL = 'https://raw.githubusercontent.com/ros/rosdistro/master/releases/targets.yaml'

更改为:

REP3_TARGETS_URL = 'https://gitee.com/ssonic/rosdistro/raw/master/releases/targets.yaml'

(4)sudo vi /usr/lib/python3.7/dist-packages/rosdistro/__init__.py 其中/usr/lib/python3.7为自己安装python的路径,根据自己版本以及安装路径更换。

原文件内容:

DEFAULT_INDEX_URL = 'https://raw.githubusercontent.com/ros/rosdistro/master/index-v4.yaml'

更改为:

DEFAULT_INDEX_URL = 'https://gitee.com/ssonic/rosdistro/raw/master/index-v4.yaml'

最后

sudo rosdep init
rosdep updater

 

 

 

 

标签:noetic,ROS,sudo,list,https,ubuntu,rosdistro,ros
From: https://www.cnblogs.com/bboy110/p/16929363.html

相关文章