# ROS Installation Scripts **Repository Path**: LJN2017117574/ros_installation_scripts ## Basic Information - **Project Name**: ROS Installation Scripts - **Description**: 安装ROS的常用脚本仓库 - **Primary Language**: Unknown - **License**: Not specified - **Default Branch**: humble - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2026-07-04 - **Last Updated**: 2026-07-04 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README # ROS 2 Humble 安装脚本 一键安装 ROS 2 Humble Hawksbill (Debian/Ubuntu) 及常用开发工具的脚本。 ## 系统要求 - Ubuntu 22.04 (Jammy) 或兼容的 Debian 系统 - `sudo` 权限 ## 使用方式 ```bash chmod +x install_ros_humble.sh ./install_ros_humble.sh ``` ## 选项 | 选项 | 说明 | |------|------| | `--base` | 安装无 GUI 的 `ros-humble-ros-base` | | `--desktop` | 安装 `ros-humble-desktop`(默认) | | `--use-proxy [URL]` | 启用代理,默认 `http://127.0.0.1:7890` | | `--proxy URL` | 同 `--use-proxy URL` | | `--no-upgrade` | 跳过 `apt upgrade` | | `--no-auto-yes` | 不自动传 `-y` 给 apt | | `-h, --help` | 显示帮助 | ## 示例 默认安装(Desktop 版): ```bash ./install_ros_humble.sh ``` 使用代理: ```bash ./install_ros_humble.sh --use-proxy ``` 指定代理地址: ```bash ./install_ros_humble.sh --use-proxy http://127.0.0.1:7890 ``` 只安装 ROS Base(无 GUI): ```bash ./install_ros_humble.sh --base ``` ## 安装内容 除 ROS 2 本身外,脚本还会安装以下开发工具: - `build-essential`、`cmake`、`git` - `python3-colcon-common-extensions` — colcon 构建工具 - `python3-rosdep` — 依赖管理 - `python3-vcstool` — 版本化仓库管理 - `ros-dev-tools` — ROS 官方开发工具集 ## 安装完成后 打开新终端,或手动 source 环境: ```bash source /opt/ros/humble/setup.bash ``` 验证安装: ```bash ros2 run demo_nodes_cpp talker ros2 run demo_nodes_py listener ``` ## 代理配置清理 脚本会在 `/etc/apt/apt.conf.d/99ros-proxy` 写入 apt 代理配置,安装完成后如需移除: ```bash sudo rm -f /etc/apt/apt.conf.d/99ros-proxy ```