在乌班图上下载ROS系统。
时间: 2024-11-03 13:21:02 浏览: 35
要在Ubuntu上安装ROS(Robot Operating System),你需要首先更新你的系统并添加官方的ROS软件源。以下是安装ROS的步骤:
1. **更新系统**:
```bash
sudo apt update && sudo apt upgrade
```
2. **添加ROS软件源**:
-c 'echo "deb http://packages.ros.org/ros/ubuntu $(lsb_release -sc) main" > /etc/apt/sources.list.d/ros-latest.list'
```
- 然后,为了获取ROS的关键密钥:
```bash
wget https://raw.githubusercontent.com/ros/rosdistro/master/ros.key -O - | sudo apt-key add -
```
3. **刷新软件包列表**:
```bash
sudo apt update
```
4. **选择ROS版本**:
ROS有不同的版本,如Kinetic、Melodic等。你可以查看可用版本,例如:
```bash
rosdistro --list-distributions
```
根据你的需求选择一个版本,然后设置为首选:
```bash
sudo apt install software-properties-common
sudo apt-add-repository "deb [arch=amd64] http://<your_ros_version>/ <your_ros_distribution> main"
```
将 `<your_ros_version>` 和 `<your_ros_distribution>` 替换为你选择的具体版本(如kinetic, melodic等)。
5. **安装ROS**:
```bash
sudo apt-get install ros-<distribution>-desktop-full
```
6. **启动ROS核心服务**:
安装完成后,你可以通过运行 `source /opt/ros/<distribution>/setup.bash` 来激活ROS环境,并使用`roslaunch`命令开始工作。
阅读全文
相关推荐

















