03-1-PC设置

小芽科技 2022-07-26 11:35:50
Categories: Tags:

本文档由北京小芽科技翻译,原文来自于ROBOTIS官方技术文档

3. 快速入门

3.1 PC 设置

警告。本章的内容与控制TurtleBot3的 “远程电脑”(您的台式电脑或笔记本电脑)相对应。请勿将此说明应用于您的TurtleBot3。

兼容性警告

注意: 本指令在Linux上用Ubuntu 16.04ROS Kinetic Kame测试。

3.1.1 在PC上下载并安装Ubuntu

  1. 下载Ubuntu 16.04 LTS Desktop
  2. 根据下面教程安装系统:

3.1.2 在远程PC上安装ROS

Ctrl+Alt+T打开终端,逐一输入以下命令。
为了检查简易安装脚本的细节,请参考脚本文件

1
2
3
4
5
$ sudo apt-get update
$ sudo apt-get upgrade
$ wget https://raw.githubusercontent.com/ROBOTIS-GIT/robotis_tools/master/install_ros_kinetic.sh
$ chmod 755 ./install_ros_kinetic.sh
$ bash ./install_ros_kinetic.sh

If the above installation fails, please refer to the official ROS Kinetic installation guide.

3.1.3 安装ROS依赖包

1
2
3
4
5
6
7
8
9
$ sudo apt-get install ros-kinetic-joy ros-kinetic-teleop-twist-joy \
ros-kinetic-teleop-twist-keyboard ros-kinetic-laser-proc \
ros-kinetic-rgbd-launch ros-kinetic-depthimage-to-laserscan \
ros-kinetic-rosserial-arduino ros-kinetic-rosserial-python \
ros-kinetic-rosserial-server ros-kinetic-rosserial-client \
ros-kinetic-rosserial-msgs ros-kinetic-amcl ros-kinetic-map-server \
ros-kinetic-move-base ros-kinetic-urdf ros-kinetic-xacro \
ros-kinetic-compressed-image-transport ros-kinetic-rqt* \
ros-kinetic-gmapping ros-kinetic-navigation ros-kinetic-interactive-markers

3.1.4 安装 TurtleBot3 包

1
2
3
$ sudo apt-get install ros-kinetic-dynamixel-sdk
$ sudo apt-get install ros-kinetic-turtlebot3-msgs
$ sudo apt-get install ros-kinetic-turtlebot3

 Click here to expand more details about building TurtleBot3 package from source.

如果你需要下载源代码并构建它们,请使用下面的命令。 请确保删除相同的软件包以避免冗余。



$ sudo apt-get remove ros-kinetic-dynamixel-sdk
$ sudo apt-get remove ros-kinetic-turtlebot3-msgs
$ sudo apt-get remove ros-kinetic-turtlebot3
$ mkdir -p ~/catkin_ws/src
$ cd ~/catkin_ws/src/
$ git clone -b kinetic-devel https://github.com/ROBOTIS-GIT/DynamixelSDK.git
$ git clone -b kinetic-devel https://github.com/ROBOTIS-GIT/turtlebot3_msgs.git
$ git clone -b kinetic-devel https://github.com/ROBOTIS-GIT/turtlebot3.git
$ cd ~/catkin_ws && catkin_make
$ echo "source ~/catkin_ws/devel/setup.bash" >> ~/.bashrc

3.1.5 设置TurtleBot3模型名称

3.1.6 网络设置

img

  1. 将PC连接到WiFi设备,用以下命令找到分配的IP地址。

    1
    $ ifconfig

    img

  2. 打开该文件,用下面的命令更新ROS的IP设置。

    1
    $ nano ~/.bashrc
  3. Ctrl+ENDAlt+/将光标移至行尾。
    ROS_MASTER_URIROS_HOSTNAME中修改localhost的地址,使用从上述终端窗口获得的IP地址。
    img

  4. 用下面的命令对bashrc进行编程。

    1
    $ source ~/.bashrc