Burger Pro(ONAD)ROS2教程-3.快速部署环境

PC设置

警告:本章内容用于初始化 Remote PC 将用于控制TurtleBot3的(台式机或笔记本电脑)。请勿在TurtleBot3平台本身上完成这些说明。 

注:此指令已在Ubuntu 22.04运行的Linux发行版上进行了测试 ROS2 Humble Hawksbill  

在远程PC上下载并安装Ubuntu

从下面的链接下载适用于您电脑的Ubuntu 22.04 LTS Desktop 镜像

Ubuntu 22.04 LTS桌面映像(64位)   

按照以下说明安装Ubuntu

安装Ubuntu桌面

在远程PC上安装ROS 2 

请按照官方ROS2文档安装ROS2 Humble

对于大多数Linux用户来说,强烈推荐Debian包安装方法。  

单击此处展开有关如何安装ROS2的更多详细信息。

这里推荐一键安装ROS2  

wget http://fishros.com/install -O fishros && . fishros

测试ROS2

ROS2_test.png 

安装ROS 2的依赖包 

在远程PC上使用 Ctrl +Alt+T打开终端。    

安装Gazebo

[远程电脑]

sudo apt install ros-humble-gazebo-*

gazebo_install1.png 

安装Cartographer

[远程电脑]

sudo apt install ros-humble-cartographer

sudo apt install ros-humble-cartographer-ros

slam_install1.png 

安装Navigation2

[远程电脑]

sudo apt install ros-humble-navigation2

sudo apt install ros-humble-nav2-bringup

nav_install1.png 

安装TurtleBot3软件包   

安装所需的TurtleBot3包。

[远程电脑]

mkdir -p ~/turtlebot3_ws/src

cd ~/turtlebot3_ws/src/

workspace1.png 

git clone -b humble https://ghfast.top/https://github.com/ROBOTIS-GIT/DynamixelSDK.git

git clone -b humble https://ghfast.top/https://github.com/ROBOTIS-GIT/turtlebot3_msgs.git

git clone -b humble https://ghfast.top/https://github.com/ROBOTIS-GIT/turtlebot3.git

sudo apt install python3-colcon-common-extensions

cd ~/turtlebot3_ws

colcon build --symlink-install

echo 'source ~/turtlebot3_ws/install/setup.bash' >> ~/.bashrc

source ~/.bashrc

环境配置 

为远程PC设置ROS环境。

[远程PC]

echo 'export ROS_DOMAIN_ID=30 #TURTLEBOT3' >> ~/.bashrc

echo 'source /usr/share/gazebo/setup.sh' >> ~/.bashrc

source ~/.bashrc

 

Arduino

 arduino1.png

安装ROS2 openCR驱动程序