一、sudo apt update时报错
二、安装ros时出现:E: Unable to locate package ros-noetic-desktop-full
试了很多方法都没有办法解决,最后找了一个其他源加进去成了
sudo sh -c 'echo "deb http://mirrors.tuna.tsinghua.edu.cn/ros/ubuntu $(lsb_release -sc) main" > /etc/apt/sources.list.d/ros-latest.list'
sudo sh -c 'echo "deb http://packages.ros.org/ros/ubuntu $(lsb_release -sc) main" > /etc/apt/sources.list.d/ros-latest.list'
然后正常步骤:
三、执行sudo rosdep init时出现错误
1、出现ERROR: cannot download default sources list from:https://raw.githubusercontent.com/ros/rosdistro/master/rosdep/sources.list.d/20-default.list Website may be down.
解决办法:
sudo gedit /etc/hosts
/etc/hosts这个文件负责域名和IP地址快速解析
添加:
151.101.84.133 raw.githubusercontent.com
如果不行,重复执行sudo rosdep init
2、出现ERROR: default sources list file already exists:/etc/ros/rosdep/sources.list.d/20-default.list Please delete if you wish to re-initialize
解决办法
sudo rm /etc/ros/rosdep/sources.list.d/20-default.list
四、执行roscore时出现:Unable to contact my own server at [http://xxx.xxx.xxx.xxx:42809/].This usually means that the network is not configured properly.
输入:
export ROS_HOSTNAME=localhost
export ROS_MASTER_URI=http://localhost:11311