解决ros-foxy打包package为deb安装包问题
解决ros-foxy打包package为deb安装包问题
安装依赖
1 |
|
rosdep init失败
打开host及相关文件进行修改1
2sudo gedit /etc/hosts
在ipv4的部分加入1
2
3
4
5
6
7
8185.199.108.133 raw.githubusercontent.com
185.199.109.133 raw.githubusercontent.com
185.199.110.133 raw.githubusercontent.com
185.199.111.133 raw.githubusercontent.com
再次运行sudo rosdep init,需要多尝试几次
rosdep update报错
通过git clone将安装包下载1
2git clone https://github.com/ros/rosdistro.git
修改rep3.py
进入路径1
cd /usr/lib/python3/dist-packages
修改文件1
sudo gedit rosdep2/rep3.py
将原来的 REP3_TARGETS_URL = ‘https://raw.githubusercontent.com/ros/rosdistro/master/releases/targets.yaml’用 # 注释掉,修改成以下代码,主要是把你的文件路径进行替换,下面的文件路径是我装的时候的路径
将1
REP3_TARGETS_URL = 'https://raw.githubusercontent.com/ros/rosdistro/master/releases/targets.yaml'
替换为1
2REP3_TARGETS_URL = 'file:///home/qiang/Documents/rosdistro/releases/targets.yaml'
其中/home/qiang/Documents/rosdistro为rosdistro文件所在路径,根据文件所在位置改成自己的路径
修改sources_list.py
1 |
|
将1
DEFAULT_SOURCES_LIST_URL = 'https://raw.githubusercontent.com/ros/rosdistro/master/rosdep/sources.list.d/20-default.list'
替换为1
2DEFAULT_SOURCES_LIST_URL = 'file:///home/qiang/Documents/rosdistro/rosdep/sources.list.d/20-default.list'
修改init.py
1 |
|
将1
DEFAULT_INDEX_URL = 'https://raw.githubusercontent.com/ros/rosdistro/master/index-v4.yaml'
替换为1
2DEFAULT_INDEX_URL = 'file:///home/qiang/Documents/rosdistro/index-v4.yaml'
修改20-default.list
1 |
|
1 |
|
将1
2
3
4
5
6
7
8
9
10
11# os-specific listings first
yaml https://raw.githubusercontent.com/ros/rosdistro/master/rosdep/osx-homebrew.yaml osx
# generic
yaml https://raw.githubusercontent.com/ros/rosdistro/master/rosdep/base.yaml
yaml https://raw.githubusercontent.com/ros/rosdistro/master/rosdep/python.yaml
yaml https://raw.githubusercontent.com/ros/rosdistro/master/rosdep/ruby.yaml
gbpdistro 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
替换为1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
# os-specific listings first
yaml file:///home/qiang/Documents/rosdistro/rosdep/osx-homebrew.yaml osx
# generic
yaml file:///home/qiang/Documents/rosdistro/rosdep/base.yaml
yaml file:///home/qiang/Documents/rosdistro/rosdep/python.yaml
yaml file:///home/qiang/Documents/rosdistro/rosdep/ruby.yaml
gbpdistro file:///home/qiang/Documents/rosdistro/releases/fuerte.yaml fuerte
修改另一处init.py
1 |
|
将1
DEFAULT_INDEX_URL = 'https://raw.githubusercontent.com/ros/rosdistro/master/index-v4.yaml'
替换为1
DEFAULT_INDEX_URL = 'file:///home/qiang/Documents/rosdistro/index-v4.yaml'
rosdep update
1 |
|
Build the debian from the package
1 |
|