我希望在ununtu22.04上安装ros1,但是失败了,以下是我的尝试过程,请给我在此基础上能成功安装ros1的一步步教程(base) casbot@casbot:~$ sudo sed -i 's|https://raw.githubusercontent.com/ros/rosdistro/master|https://mirrors.tuna.tsinghua.edu.cn/rosdistro|g' /etc/ros/rosdep/sources.list.d/20-default.list
sed: can't read /etc/ros/rosdep/sources.list.d/20-default.list: No such file or directory
(base) casbot@casbot:~$ sudo rosdep init
Wrote /etc/ros/rosdep/sources.list.d/20-default.list
Recommended: please run
rosdep update
(base) casbot@casbot:~$ ^C
(base) casbot@casbot:~$ rosdep update
reading in sources list data from /etc/ros/rosdep/sources.list.d
Hit https://raw.githubusercontent.com/ros/rosdistro/master/rosdep/osx-homebrew.yaml
Hit https://raw.githubusercontent.com/ros/rosdistro/master/rosdep/base.yaml
Hit https://raw.githubusercontent.com/ros/rosdistro/master/rosdep/python.yaml
Hit 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
Skip end-of-life distro "ardent"
Skip end-of-life distro "bouncy"
Skip end-of-life distro "crystal"
Skip end-of-life distro "dashing"
Skip end-of-life distro "eloquent"
Skip end-of-life distro "foxy"
Skip end-of-life distro "galactic"
Skip end-of-life distro "groovy"
Add distro "humble"
Skip end-of-life distro "hydro"
Skip end-of-life distro "indigo"
Skip end-of-life distro "iron"
Skip end-of-life distro "jade"
Add distro "jazzy"
Add distro "kilted"
Skip end-of-life distro "kinetic"
Skip end-of-life distro "lunar"
Skip end-of-life distro "melodic"
Skip end-of-life distro "noetic"
Add distro "rolling"
updated cache in /home/casbot/.ros/rosdep/sources.cache
(base) casbot@casbot:~$ cd ~/ros_catkin_ws
(base) casbot@casbot:~/ros_catkin_ws$ rosinstall_generator desktop_full --rosdistro noetic --deps \
--exclude roslisp \
--local index-v4.yaml \
> noetic-desktop.rosinstall
usage: rosinstall_generator [-h] [--debug] [--verbose] --rosdistro ROSDISTRO
[--from-path [FROM_PATH ...]]
[--repos [reponame ...]]
[--upstream | --upstream-development]
[--deps | --deps-up-to [DEPS_UP_TO ...]]
[--deps-depth N] [--deps-only]
[--wet-only | --dry-only | --catkin-only | --non-catkin-only]
[--exclude [EXCLUDE ...]]
[--exclude-path [EXCLUDE_PATH ...]] [--flat]
[--tar] [--format {rosinstall,repos}]
[pkgname ...]
rosinstall_generator: error: unrecognized arguments: --local index-v4.yaml
(base) casbot@casbot:~/ros_catkin_ws$ rosinstall_generator desktop_full --rosdistro noetic --deps > noetic-desktop.rosinstall
Traceback (most recent call last):
File "/usr/lib/python3/dist-packages/rosdistro/loader.py", line 43, in load_url
fh = urlopen(url, timeout=timeout)
File "/usr/lib/python3.10/urllib/request.py", line 216, in urlopen
return opener.open(url, data, timeout)
File "/usr/lib/python3.10/urllib/request.py", line 519, in open
response = self._open(req, data)
File "/usr/lib/python3.10/urllib/request.py", line 536, in _open
result = self._call_chain(self.handle_open, protocol, protocol +
File "/usr/lib/python3.10/urllib/request.py", line 496, in _call_chain
result = func(*args)
File "/usr/lib/python3.10/urllib/request.py", line 1391, in https_open
return self.do_open(http.client.HTTPSConnection, req,
File "/usr/lib/python3.10/urllib/request.py", line 1352, in do_open
r = h.getresponse()
File "/usr/lib/python3.10/http/client.py", line 1375, in getresponse
response.begin()
File "/usr/lib/python3.10/http/client.py", line 318, in begin
version, status, reason = self._read_status()
File "/usr/lib/python3.10/http/client.py", line 279, in _read_status
line = str(self.fp.readline(_MAXLINE + 1), "iso-8859-1")
File "/usr/lib/python3.10/socket.py", line 705, in readinto
return self._sock.recv_into(b)
File "/usr/lib/python3.10/ssl.py", line 1303, in recv_into
return self.read(nbytes, buffer)
File "/usr/lib/python3.10/ssl.py", line 1159, in read
return self._sslobj.read(len, buffer)
TimeoutError: The read operation timed out
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/usr/bin/rosinstall_generator", line 33, in <module>
sys.exit(load_entry_point('rosinstall-generator==0.1.23', 'console_scripts', 'rosinstall_generator')())
File "/usr/lib/python3/dist-packages/rosinstall_generator/cli.py", line 155, in main
rosinstall_data = generate_rosinstall(args.rosdistro, args.package_names,
File "/usr/lib/python3/dist-packages/rosinstall_generator/generator.py", line 267, in generate_rosinstall
wet_package_names, unreleased_repo_names = _get_packages_for_repos(distro_name, repo_names, source=upstream_source_version)
File "/usr/lib/python3/dist-packages/rosinstall_generator/generator.py", line 93, in _get_packages_for_repos
wet_distro = get_wet_distro(distro_name)
File "/usr/lib/python3/dist-packages/rosinstall_generator/generator.py", line 224, in get_wet_distro
_wet_distro = _get_wet_distro(distro_name)
File "/usr/lib/python3/dist-packages/rosinstall_generator/distro.py", line 45, in get_distro
index = get_index(get_index_url())
File "/usr/lib/python3/dist-packages/rosdistro/__init__.py", line 102, in get_index
yaml_str = load_url(url)
File "/usr/lib/python3/dist-packages/rosdistro/loader.py", line 56, in load_url
raise socket.timeout(str(e) + ' (%s)' % url)
TimeoutError: The read operation timed out (https://raw.githubusercontent.com/ros/rosdistro/master/index-v4.yaml)
(base) casbot@casbot:~/ros_catkin_ws$ wget https://ghproxy.com/https://raw.githubusercontent.com/ros/rosdistro/master/index-v4.yaml
--2025-07-22 15:09:11-- https://ghproxy.com/https://raw.githubusercontent.com/ros/rosdistro/master/index-v4.yaml
Resolving ghproxy.com (ghproxy.com)... 144.24.81.189
Connecting to ghproxy.com (ghproxy.com)|144.24.81.189|:443... connected.
Unable to establish SSL connection.
(base) casbot@casbot:~/ros_catkin_ws$ rosinstall_generator desktop_full --rosdistro noetic --deps \
--exclude roslisp \
--local index-v4.yaml \
> noetic-desktop.rosinstall
usage: rosinstall_generator [-h] [--debug] [--verbose] --rosdistro ROSDISTRO
[--from-path [FROM_PATH ...]]
[--repos [reponame ...]]
[--upstream | --upstream-development]
[--deps | --deps-up-to [DEPS_UP_TO ...]]
[--deps-depth N] [--deps-only]
[--wet-only | --dry-only | --catkin-only | --non-catkin-only]
[--exclude [EXCLUDE ...]]
[--exclude-path [EXCLUDE_PATH ...]] [--flat]
[--tar] [--format {rosinstall,repos}]
[pkgname ...]
rosinstall_generator: error: unrecognized arguments: --local index-v4.yaml
(base) casbot@casbot:~/ros_catkin_ws$ ^C
(base) casbot@casbot:~/ros_catkin_ws$
最新发布