树莓派ubuntu安装
ubuntu 18镜像:
提取码:resp
ubuntu 20镜像:
Ubuntu 20.04.5 LTS (Focal Fossa)
ubuntu 18 & 20没有提供官方desktop版本,ubuntu18有非官方的desktop版本,ubuntu20需要安装server版本,然后安装图形界面
烧录:
安装树莓派镜像烧录器:Raspberry Pi OS – Raspberry Pi
载入你需要的系统的镜像
>>设置主机名:respberry PI(改一个自己喜欢的名字)
>>开启SSH服务
>>设置username and password: (用来登录)
>>保存
>>烧录
烧录完毕 >> 插入树莓派启动
账号&&密码:username and password
安装图形界面:
sudo apt update && sudo apt install ubuntu-desktop
error:
Could not get lock /var/lib/dpkg/lock - open
解决方法:
reboot
ROS:
1.安装地址
ubuntu18 melodic:
melodic/Installation/Ubuntu - ROS Wikihttp://wiki.ros.org/melodic/Installation/Ubuntu
ubuntu20 noetic:
noetic/Installation/Ubuntu - ROS Wikihttp://wiki.ros.org/noetic/Installation/Ubuntu
2.Set up your keys错误
a) no valid OpenPGP data found:
gpg: no valid OpenPGP data found.
解决方法:
# 将curl -s https://raw.githubusercontent.com/ros/rosdistro/master/ros.asc | sudo apt-key add -
#分开两个运行
curl -s https://raw.githubusercontent.com/ros/rosdistro/master/ros.asc
sudo apt-key add ros.asc
b) 找不到ros.asc:
gpg: can't open 'ros.asc': No such file or directory
解决方法:
使用浏览器打开:https://raw.githubusercontent.com/ros/rosdistro/master/ros.asc.
or rosdistro/ros.asc at master · ros/rosdistro · GitHub
复制所有
sudo vim ros.asc
i >> 写入内容 >> ESC >> :wq
sudo apt-key add ros.asc
3.rosdep init error
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.
修改hosts Ubuntu,
sudo vi /etc/hosts
添加以下内容保存即可
199.232.28.133 raw.githubusercontent.com
然后输入sudo rosdep init就可以了
3.rosdep update error:
a) 无法处理源:
reading in sources list data from /etc/ros/rosdep/sources.list.d
ERROR: unable to process source [https://raw.githubusercontent.com/ros/rosdistro/master/rosdep/osx-homebrew.yaml]:
<urlopen error [Errno 111] Connection refused> (https://raw.githubusercontent.com/ros/rosdistro/master/rosdep/osx-homebrew.yaml)
ERROR: unable to process source [https://raw.githubusercontent.com/ros/rosdistro/master/rosdep/base.yaml]:
<urlopen error [Errno 111] Connection refused> (https://raw.githubusercontent.com/ros/rosdistro/master/rosdep/base.yaml)
ERROR: unable to process source [https://raw.githubusercontent.com/ros/rosdistro/master/rosdep/python.yaml]:
<urlopen error [Errno 111] Connection refused> (https://raw.githubusercontent.com/ros/rosdistro/master/rosdep/python.yaml)
ERROR: unable to process source [https://raw.githubusercontent.com/ros/rosdistro/master/rosdep/ruby.yaml]:
<urlopen error [Errno 111] Connection refused> (https://raw.githubusercontent.com/ros/rosdistro/master/rosdep/ruby.yaml)
Hit https://raw.githubusercontent.com/ros/rosdistro/master/releases/fuerte.yaml
Query rosdistro index https://raw.githubusercontent.com/ros/rosdistro/master/index-v4.yaml
Add distro "ardent"
ERROR: error loading sources list:
<urlopen error <urlopen error [Errno 111] Connection refused> (https://raw.githubusercontent.com/ros/rosdistro/master/ardent/distribution.yaml)>
处理办法:
sudo gedit /etc/resolv.conf
#将原有的nameserver这一行注释,并添加以下两行:
nameserver 8.8.8.8 #google域名服务器
nameserver 8.8.4.4 #google域名服务器
#保存退出,执行
sudo apt-get update
#再执行
rosdep update
b) 超时报错:
ERROR: error loading sources list:
The read operation timed out
连接手机热点,打开终端执行
sudo vim /etc/ros/rosdep/sources.list.d/20-default.list
修改内容
# os-specific listings first
yaml https://ghproxy.com/https://raw.githubusercontent.com/ros/rosdistro/master/rosdep/osx-homebrew.yaml osx
# generic
yaml https://ghproxy.com/https://raw.githubusercontent.com/ros/rosdistro/master/rosdep/base.yaml
yaml https://ghproxy.com/https://raw.githubusercontent.com/ros/rosdistro/master/rosdep/python.yaml
yaml https://ghproxy.com/https://raw.githubusercontent.com/ros/rosdistro/master/rosdep/ruby.yaml
gbpdistro https://ghproxy.com/https://raw.githubusercontent.com/ros/rosdistro/master/releases/fuerte.yaml fuerte
# newer distributions (Groovy, Hydro, ...) must not be listed anymore, they are being fetched from the rosdistro index.yaml instead
再运行rosdep update。失败的话再运行多几次试试。