鱼香ROS社区
    • 版块
    • 最新
    • 未解决
    • 已解决
    • 群组
    • 注册
    • 登录
    紧急通知:禁止一切关于政治&VPN翻墙等话题,发现相关帖子会立马删除封号
    提问前必看的发帖注意事项: 社区问答规则(小鱼个人)更新 | 高质量帖子发布指南

    没法一键安装ros1

    已定时 已固定 已锁定 已移动 已解决
    一键安装
    安装ros1 ubuntu24.04
    5
    8
    1.5k
    正在加载更多帖子
    • 从旧到新
    • 从新到旧
    • 最多赞同
    回复
    • 在新帖中回复
    登录后回复
    此主题已被删除。只有拥有主题管理权限的用户可以查看。
    • 5427273635
      Galen
      最后由 编辑

      2af99983-36a1-45ea-87d8-fe51f9d0e87c-image.png

      电脑环境为amd64, ubuntu 24.04

      小鱼小 1 条回复 最后回复 回复 引用 0
      • 小伊小
        机器人小伊
        最后由 编辑

        在Ubuntu 24.04环境下安装ROS 1(如Noetic版本)时,由于ROS 1的官方支持可能随着新版本的发布而有所变化,因此一键安装的方法可能不总是可用或最新。不过,你可以按照以下步骤手动安装ROS 1 Noetic版本:

        1. 配置Ubuntu软件和更新

        首先,确保你的Ubuntu系统已经更新到最新版本,并且配置了合适的软件源。你可以通过Ubuntu的“软件和更新”设置来检查和更新你的系统。

        2. 设置ROS软件源

        由于ROS的官方源可能不是最快的,你可以选择使用国内的镜像源来加速下载过程。例如,你可以使用中国科学技术大学(USTC)或清华大学(Tsinghua)的ROS镜像源。

        以使用USTC的ROS镜像源为例,你可以通过以下命令添加ROS软件源到/etc/apt/sources.list.d/目录下:

        sudo sh -c '. /etc/lsb-release && echo "deb https://mirrors.ustc.edu.cn/ros/ubuntu/ $DISTRIB_CODENAME main" > /etc/apt/sources.list.d/ros-latest.list'
        

        如果你选择使用清华大学的ROS镜像源,可以使用类似的命令,但将URL替换为清华大学的地址。

        3. 添加密钥

        为了验证ROS软件包的签名,你需要添加ROS的密钥到你的apt密钥环中。这可以通过以下命令完成:

        sudo apt-key adv --keyserver 'hkp://keyserver.ubuntu.com:80' --recv-key C1CF6E31E6BADE8868B172B4F42ED6FBAB17C654
        

        请注意,密钥可能会随着ROS版本的更新而更改,因此请确保你使用的是当前ROS版本的正确密钥。

        4. 更新软件源

        在添加了ROS软件源并添加了密钥之后,你需要更新你的apt软件源列表以确保所有新的软件包信息都被下载:

        sudo apt update
        

        5. 安装ROS

        现在,你可以安装ROS 1 Noetic版本了。根据你的需求,你可以选择安装完整的桌面版本(包含RVIZ、rqt等图形界面工具)或基础版本。以下命令将安装完整的桌面版本:

        sudo apt install ros-noetic-desktop-full
        

        如果你只需要基础版本,可以替换desktop-full为desktop或base等。

        6. 初始化rosdep

        rosdep是ROS的一个工具,用于安装系统依赖项。在安装ROS之后,你需要初始化rosdep:

        sudo rosdep init
        rosdep update
        

        7. 设置环境变量

        为了使ROS命令在你的终端中可用,你需要将ROS的环境变量添加到你的bash配置文件中(如.bashrc或.bash_profile):

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

        8. 安装构建依赖

        如果你打算从源代码构建ROS包,你还需要安装构建依赖:

        sudo apt install python3-rosdep python3-rosinstall python3-vcstools build-essential
        

        9. 验证安装

        最后,你可以通过运行roscore来验证ROS是否已正确安装:

        roscore
        

        如果roscore成功启动,并且没有显示任何错误消息,那么你的ROS安装应该是成功的。

        请注意,由于ROS和Ubuntu的版本都在不断更新,因此上述步骤中的某些细节(如密钥、软件源URL等)可能会随时间而变化。如果你在安装过程中遇到问题,请参考ROS的官方文档或搜索相关的社区论坛和问答网站以获取帮助。


        以上为生成回答,仅供参考~

        我是小伊,已接入ChatGpt,所有回复,仅供参考~

        1 条回复 最后回复 回复 引用 0
        • 小鱼小
          小鱼 技术大佬 @542727363
          最后由 编辑

          @542727363 怎么不能安装了

          新书配套视频:https://www.bilibili.com/video/BV1GW42197Ck/

          5427273635 3 Q 3 条回复 最后回复 回复 引用 0
          • 5427273635
            Galen @小鱼
            最后由 编辑

            @小鱼

            galen@galen:~$ sudo cp /etc/apt/sources.list.bak /etc/apt/sources.list
            galen@galen:~$
            galen@galen:~$
            galen@galen:~$ 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'
            galen@galen:~$ sudo apt-key adv --keyserver 'hkp://keyserver.ubuntu.com:80' --recv-key C1CF6E31E6BADE8868B172B4F42ED6FBAB17C654
            Warning: apt-key is deprecated. Manage keyring files in trusted.gpg.d instead (see apt-key(8)).
            Executing: /tmp/apt-key-gpghome.FCnt9oNrsI/gpg.1.sh --keyserver hkp://keyserver.ubuntu.com:80 --recv-key C1CF6E31E6BADE8868B172B4F42ED6FBAB17C654
            gpg: key F42ED6FBAB17C654: "Open Robotics <info@osrfoundation.org>" not changed
            gpg: Total number processed: 1
            gpg:              unchanged: 1
            galen@galen:~$ sudo apt update
            Ign:1 http://deb.repo.autolabor.com.cn jammy InRelease
            Get:2 http://mirrors.tuna.tsinghua.edu.cn/ros2/ubuntu noble InRelease [4,670 B]
            Ign:3 http://deb.repo.autolabor.com.cn jammy Release
            Ign:4 http://mirrors.tuna.tsinghua.edu.cn/ros/ubuntu noble InRelease
            Ign:5 http://deb.repo.autolabor.com.cn jammy/main amd64 Packages
            Err:6 http://mirrors.tuna.tsinghua.edu.cn/ros/ubuntu noble Release
              404  Not Found [IP: 2402:f000:1:400::2 80]
            Ign:7 http://deb.repo.autolabor.com.cn jammy/main all Packages
            Hit:8 https://mirrors.tuna.tsinghua.edu.cn/ubuntu focal InRelease
            Hit:9 https://mirrors.ustc.edu.cn/ros2/ubuntu noble InRelease
            Ign:10 http://deb.repo.autolabor.com.cn jammy/main Translation-en_US
            Hit:11 https://mirrors.tuna.tsinghua.edu.cn/ubuntu focal-updates InRelease
            Ign:12 http://deb.repo.autolabor.com.cn jammy/main Translation-en
            Hit:13 https://mirrors.tuna.tsinghua.edu.cn/ubuntu focal-backports InRelease
            Ign:14 http://deb.repo.autolabor.com.cn jammy/main all Components
            Hit:15 https://mirrors.tuna.tsinghua.edu.cn/ubuntu focal-security InRelease
            Ign:16 http://deb.repo.autolabor.com.cn jammy/main amd64 Components
            Ign:17 http://deb.repo.autolabor.com.cn jammy/main Icons (48x48)
            Ign:18 http://deb.repo.autolabor.com.cn jammy/main Icons (64x64)
            Ign:19 http://deb.repo.autolabor.com.cn jammy/main Icons (64x64@2)
            Ign:20 http://deb.repo.autolabor.com.cn jammy/main amd64 c-n-f Metadata
            Ign:21 http://deb.repo.autolabor.com.cn jammy/main all c-n-f Metadata
            Ign:5 http://deb.repo.autolabor.com.cn jammy/main amd64 Packages
            Ign:7 http://deb.repo.autolabor.com.cn jammy/main all Packages
            Ign:10 http://deb.repo.autolabor.com.cn jammy/main Translation-en_US
            Ign:12 http://deb.repo.autolabor.com.cn jammy/main Translation-en
            Ign:14 http://deb.repo.autolabor.com.cn jammy/main all Components
            Ign:16 http://deb.repo.autolabor.com.cn jammy/main amd64 Components
            Ign:17 http://deb.repo.autolabor.com.cn jammy/main Icons (48x48)
            Ign:18 http://deb.repo.autolabor.com.cn jammy/main Icons (64x64)
            Ign:19 http://deb.repo.autolabor.com.cn jammy/main Icons (64x64@2)
            Ign:20 http://deb.repo.autolabor.com.cn jammy/main amd64 c-n-f Metadata
            Ign:21 http://deb.repo.autolabor.com.cn jammy/main all c-n-f Metadata
            Ign:5 http://deb.repo.autolabor.com.cn jammy/main amd64 Packages
            Ign:7 http://deb.repo.autolabor.com.cn jammy/main all Packages
            Ign:10 http://deb.repo.autolabor.com.cn jammy/main Translation-en_US
            Ign:12 http://deb.repo.autolabor.com.cn jammy/main Translation-en
            Ign:14 http://deb.repo.autolabor.com.cn jammy/main all Components
            Ign:16 http://deb.repo.autolabor.com.cn jammy/main amd64 Components
            Ign:17 http://deb.repo.autolabor.com.cn jammy/main Icons (48x48)
            Ign:18 http://deb.repo.autolabor.com.cn jammy/main Icons (64x64)
            Ign:19 http://deb.repo.autolabor.com.cn jammy/main Icons (64x64@2)
            Ign:20 http://deb.repo.autolabor.com.cn jammy/main amd64 c-n-f Metadata
            Ign:21 http://deb.repo.autolabor.com.cn jammy/main all c-n-f Metadata
            Hit:5 http://deb.repo.autolabor.com.cn jammy/main amd64 Packages
            Ign:7 http://deb.repo.autolabor.com.cn jammy/main all Packages
            Ign:10 http://deb.repo.autolabor.com.cn jammy/main Translation-en_US
            Ign:12 http://deb.repo.autolabor.com.cn jammy/main Translation-en
            Ign:14 http://deb.repo.autolabor.com.cn jammy/main all Components
            Ign:16 http://deb.repo.autolabor.com.cn jammy/main amd64 Components
            Ign:17 http://deb.repo.autolabor.com.cn jammy/main Icons (48x48)
            Ign:18 http://deb.repo.autolabor.com.cn jammy/main Icons (64x64)
            Ign:19 http://deb.repo.autolabor.com.cn jammy/main Icons (64x64@2)
            Ign:20 http://deb.repo.autolabor.com.cn jammy/main amd64 c-n-f Metadata
            Ign:21 http://deb.repo.autolabor.com.cn jammy/main all c-n-f Metadata
            Ign:7 http://deb.repo.autolabor.com.cn jammy/main all Packages
            Ign:10 http://deb.repo.autolabor.com.cn jammy/main Translation-en_US
            Ign:12 http://deb.repo.autolabor.com.cn jammy/main Translation-en
            Ign:14 http://deb.repo.autolabor.com.cn jammy/main all Components
            Ign:16 http://deb.repo.autolabor.com.cn jammy/main amd64 Components
            Ign:17 http://deb.repo.autolabor.com.cn jammy/main Icons (48x48)
            Ign:18 http://deb.repo.autolabor.com.cn jammy/main Icons (64x64)
            Ign:19 http://deb.repo.autolabor.com.cn jammy/main Icons (64x64@2)
            Ign:20 http://deb.repo.autolabor.com.cn jammy/main amd64 c-n-f Metadata
            Ign:21 http://deb.repo.autolabor.com.cn jammy/main all c-n-f Metadata
            Ign:7 http://deb.repo.autolabor.com.cn jammy/main all Packages
            Ign:10 http://deb.repo.autolabor.com.cn jammy/main Translation-en_US
            Ign:12 http://deb.repo.autolabor.com.cn jammy/main Translation-en
            Ign:14 http://deb.repo.autolabor.com.cn jammy/main all Components
            Ign:16 http://deb.repo.autolabor.com.cn jammy/main amd64 Components
            Ign:17 http://deb.repo.autolabor.com.cn jammy/main Icons (48x48)
            Ign:18 http://deb.repo.autolabor.com.cn jammy/main Icons (64x64)
            Ign:19 http://deb.repo.autolabor.com.cn jammy/main Icons (64x64@2)
            Ign:20 http://deb.repo.autolabor.com.cn jammy/main amd64 c-n-f Metadata
            Ign:21 http://deb.repo.autolabor.com.cn jammy/main all c-n-f Metadata
            Ign:7 http://deb.repo.autolabor.com.cn jammy/main all Packages
            Ign:10 http://deb.repo.autolabor.com.cn jammy/main Translation-en_US
            Ign:12 http://deb.repo.autolabor.com.cn jammy/main Translation-en
            Ign:14 http://deb.repo.autolabor.com.cn jammy/main all Components
            Ign:16 http://deb.repo.autolabor.com.cn jammy/main amd64 Components
            Ign:17 http://deb.repo.autolabor.com.cn jammy/main Icons (48x48)
            Ign:18 http://deb.repo.autolabor.com.cn jammy/main Icons (64x64)
            Ign:19 http://deb.repo.autolabor.com.cn jammy/main Icons (64x64@2)
            Ign:20 http://deb.repo.autolabor.com.cn jammy/main amd64 c-n-f Metadata
            Ign:21 http://deb.repo.autolabor.com.cn jammy/main all c-n-f Metadata
            Reading package lists... Done
            E: The repository 'http://mirrors.tuna.tsinghua.edu.cn/ros/ubuntu noble Release' does not have a Release file.
            N: Updating from such a repository can't be done securely, and is therefore disabled by default.
            N: See apt-secure(8) manpage for repository creation and user configuration details.
            galen@galen:~$ cat /etc/apt/sources.list.d/ros-latest.list
            deb http://mirrors.tuna.tsinghua.edu.cn/ros/ubuntu/ noble main
            galen@galen:~$ cat /etc/apt/sources.list
            deb 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 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
            
            galen@galen:~$
            
            
            1. 使用一键安装脚本,发现没有ros1的选项,见上一条回复里的截图;
            2. 以上贴上的是我手动的操作步骤,使用清华源也安装不了。
            5427273635 1 条回复 最后回复 回复 引用 0
            • 5427273635
              Galen @542727363
              最后由 编辑

              galen@galen:~$ lsb_release -cs
              No LSB modules are available.
              noble
              galen@galen:~$ lsb_release -a
              No LSB modules are available.
              Distributor ID: Ubuntu
              Description:    Ubuntu 24.04.1 LTS
              Release:        24.04
              Codename:       noble
              galen@galen:~$
              
              

              以上是我系统里的信息

              小鱼小 1 条回复 最后回复 回复 引用 0
              • 小鱼小
                小鱼 技术大佬 @542727363
                最后由 编辑

                @542727363 这个系统本来就没有ROS1,ROS1在ubuntu20就已经结束了

                新书配套视频:https://www.bilibili.com/video/BV1GW42197Ck/

                1 条回复 最后回复 回复 引用 0
                • 3
                  3097302032 @小鱼
                  最后由 编辑

                  @小鱼 鱼老师,22.04不用docker可以安装ros1嘛?尝试了好几天了一直没安好

                  1 条回复 最后回复 回复 引用 0
                  • Q
                    Qiankang @小鱼
                    最后由 编辑

                    @小鱼 老师您好,现在Ubuntu18版本安装ros的教程有么

                    1 条回复 最后回复 回复 引用 1
                    • 小伊小 小伊 将这个主题转为问答主题,在
                    • 小伊小 小伊 将这个主题标记为已解决,在
                    • 第一个帖子
                      最后一个帖子
                    皖ICP备16016415号-7
                    Powered by NodeBB | 鱼香ROS