ubuntu18.04下安装ROS melodic和turtlebot3的脚本指南。以下是安装的详细流程:
- 系统更新:在终端输入以下命令,确保系统软件包为最新版本:
```
sudo apt update && sudo apt upgrade
```
-
安装ROS Melodic:
-
添加ROS源并安装ROS:
```
sudo sh -c 'echo \"deb http://packages.ros.org/ros/ubuntu $(lsb_release -sc) main\" > /etc/apt/sources.list.d/ros-latest.list'
sudo apt install ros-melodic-desktop-full
```
- 初始化ROS:
```
source /opt/ros/melodic/setup.bash
sudo apt install python-rosdep
sudo rosdep init
rosdep update
```
-
安装Turtlebot3依赖:
-
通过命令安装所需的依赖项:
```
sudo apt install ros-melodic-turtlebot3
```
- 编辑Turtlebot3模型配置文件:
```
echo \"export TURTLEBOT3_MODEL=burger\" >> ~/.bashrc
source ~/.bashrc
```
- 运行示例:确保一切安装完成后,运行以下命令启动仿真环境:
```
roslaunch turtlebot3_gazebo turtlebot3_empty_world.launch
```
至此,turtlebot3已在Ubuntu18.04和ROS Melodic环境下安装完成。
暂无评论