< >
Home » Turtlebot3-waffle-pi入门教程#noetic版# » Turtlebot3-waffle-pi入门教程#noetic版#-PC安装

Turtlebot3-waffle-pi入门教程#noetic版#-PC安装

Turtlebot3-waffle-pi入门教程#noetic版#-PC安装

说明:

  • 本教程介绍如何在在PC上安装对应的系统和软件===
  • 测试环境: Ubuntu 20.04 + ROS Noetic Ninjemys

相关设备

前提说明

  • 对于在创客智造上购买的Noetic版系统的tb3是已经配置好系统,不需要重复安装

  • 若已在创客智造购买相关产品,可以咨询客服获取已配置好的虚拟机的下载链接

  • 虚拟机安装使用教程:ROS与虚拟机-Windows 10下安装VMware15

  • 通常该虚拟机上已配置Noetic和Foxy的环境,可通过修改~/.bashrc的内容来切换

  • [Remote PC] 若当前需要使用到Noetic环境,需要将文档末端的环境变量全部注释,保存退出关闭此终端

$ vim ~/.bashrc
   
#source ~/tools/environment/noetic/setRosNoeticEnvironment.sh
#source ~/tools/environment/foxy/setRos2FoxyEnvironment.sh
  • [Remote PC] 打开新终端,将文档末端Noetic的环境变量的注释去掉,再保存退出
$ vim ~/.bashrc
   
source ~/tools/environment/noetic/setRosNoeticEnvironment.sh
#source ~/tools/environment/foxy/setRos2FoxyEnvironment.sh


$ source ~/.bashrc && rosversion -d
noetic

系统安装

安装ROS Noetic Ninjemys

  • [Remote PC] apt 安装
# 设置源
$ sudo sh -c 'echo "deb http://packages.ros.org/ros/ubuntu $(lsb_release -sc) main" > /etc/apt/sources.list.d/ros-latest.list'
# 设置keys
$ sudo apt install curl # if you haven't already installed curl
$ curl -s https://raw.githubusercontent.com/ros/rosdistro/master/ros.asc | sudo apt-key add -
# 安装noetic
$ sudo apt update
$ sudo apt install ros-noetic-desktop-full
# 配置环境
$ echo "source /opt/ros/noetic/setup.bash" >> ~/.bashrc
$ source ~/.bashrc
# 安装相关依赖包
$ sudo apt install python3-rosdep python3-rosinstall python3-rosinstall-generator python3-wstool build-essential
# 初始化rosdep
$ sudo rosdep init
$ rosdep update

安装TurtleBot3及相关依赖包

  • [Remote PC] 安装相关依赖包
$ sudo apt-get install ros-noetic-joy ros-noetic-teleop-twist-joy \
  ros-noetic-teleop-twist-keyboard ros-noetic-laser-proc \
  ros-noetic-rgbd-launch ros-noetic-rosserial-arduino \
  ros-noetic-rosserial-python ros-noetic-rosserial-client \
  ros-noetic-rosserial-msgs ros-noetic-amcl ros-noetic-map-server \
  ros-noetic-move-base ros-noetic-urdf ros-noetic-xacro \
  ros-noetic-compressed-image-transport ros-noetic-rqt* ros-noetic-rviz \
  ros-noetic-gmapping ros-noetic-navigation ros-noetic-interactive-markers \
  ros-noetic-slam-karto ros-noetic-hector-mapping 
  • [Remote PC] 安装TurtleBot3包
$ mkdir -p ~/turtlebot3_ws/src
$ cd ~/turtlebot3_ws/src/
$ git clone -b noetic-devel https://github.com/ROBOTIS-GIT/DynamixelSDK.git
$ git clone -b noetic-devel https://github.com/ROBOTIS-GIT/turtlebot3_msgs.git
$ git clone -b noetic-devel https://github.com/ROBOTIS-GIT/turtlebot3.git
$ git clone -b noetic-devel https://github.com/ROBOTIS-GIT/hls_lfcd_lds_driver.git
$ cd ~/turtlebot3_ws && catkin_make
$ echo "source ~/turtlebot3_ws/devel/setup.bash" >> ~/.bashrc
  • [TurtleBot] 安装LDS-02雷达包
$ sudo apt update
$ sudo apt install libudev-dev
$ cd ~/turtlebot3_ws/src
$ git clone -b develop https://github.com/ROBOTIS-GIT/ld08_driver.git
$ cd ~/catkin_ws/src/turtlebot3 && git pull
$ cd ~/turtlebot3_ws && catkin_make
  • [Remote PC] 配置模型的环境变量
$ echo "export TURTLEBOT3_MODEL=waffle_pi" >> ~/.bashrc
$ source ~/.bashrc

纠错,疑问,交流: 请进入讨论区点击加入Q群

获取最新文章: 扫一扫右上角的二维码加入“创客智造”公众号


标签: none