Getting Started with Turtlebot-ROS System Installation

    I recently came into contact with Turtlebot and found that some of the experience posts on Baidu are rather one-sided. Here is a fool-proof guide.

    Update:http://wiki.ros.org/indigo/Installation/Ubuntu

Ubuntu and ROS version and installation method selection

    Specific ROS versions can only be installed on the corresponding Ubuntu version. The corresponding relationship is as follows -

    

Picture source:http://f.dataguru.cn/thread-903259-1-1.html

    Generally speaking, the ROS Indigo version has the most complete modules.

    There are compatibility issues between various versions of Ubuntu software packages, and there are also compatibility issues between various versions of ROS. In other words, we can only install the specified version of the ROS system, and it must be installed on the corresponding Ubuntu system.

    Before I had Ubuntu 16.04 (Xenial) version system. Due to the requirements of the course, the Indigo version of ROS must be installed, so I tried to find a way to use a higher version of Ubuntu to simplify part of the installation process. Unfortunately, the method does not exist.

    In the end, I chose the installation method of VMware virtual machine + Ubuntu 14.04 (Trusty) under Windows. However, if you rely heavily on this system in the future, it is still recommended to install an independent system (dual/multiple systems). After all, relying on someone else's virtual machine is not a long-term solution.

ROS installation

    My version: Ubuntu 14.04(Trusty) + ROS Indigo

    ​Here we start from the completion of Ubuntu installation.

1. Set ROS sources (sources.list)

    Set the ROS source to packages.ros.org to automatically obtain ROS software packages.

    Enter the following command in the Ubuntu command line (Terminal) (the same below)

sudo sh -c 'echo "deb http://packages.ros.org/ros/ubuntu $(lsb_release -sc) main" > /etc/apt/sources.list.d/ros-latest.list'

    http://wiki.ros.org/ROS/Installation/UbuntuMirrors, http://wiki.ros.org/DebianPackageSources  These two sources can also be used.

2. Set keys

sudo apt-key adv --keyserver hkp://ha.pool.sks-keyservers.net:80 --recv-key 421C365BD9FF1F717815A3895523BAEEB01FA116

    If there is a problem with the connection, you can try two keyservers: hkp://pgp.mit.edu:80 and hkp://keyserver.ubuntu.com:80 in the above command.

3. Update the package index of the ROS source

sudo apt-get update

4. Download ROS

    It is recommended to download the deluxe full set of ROS. Other references http://wiki.ros.org/indigo/Installation/Ubuntu

sudo apt-get install ros-indigo-desktop-full

    The installation takes a long time...please wait patiently...

    In this part, you may encounter the problem of missing dependent packages. For Ubuntu Trusty 14.04.2, try the following command to install dependent packages——

sudo apt-get install libgl1-mesa-dev-lts-trusty

    Try other versions (note, Trusty 14.04.2 is not applicable)——

sudo apt-get install xserver-xorg-dev-lts-trusty mesa-common-dev-lts-trusty libxatracker-dev-lts-trusty libopenvg1-mesa-dev-lts-trusty libgles2-mesa-dev-lts-trusty libgles1-mesa-dev-lts-trusty libgl1-mesa-dev-lts-trusty libgbm-dev-lts-trusty libegl1-mesa-dev-lts-trusty

5. Initialize rosdep

sudo rosdep init
rosdep update

6. Environment settings

    Make ROS environment variables automatically loaded every time before running the program.

echo "source /opt/ros/indigo/setup.bash" >> ~/.bashrc
source ~/.bashrc

    For other optional operations, see http://wiki.ros.org/indigo/Installation/Ubuntu

7. rosinstall

    rosinstall is a commonly used command line tool in ROS, but it is packaged independently. It implements a single command to download many related sources of a ROS package. Use the following command to get rosinstall -

sudo apt-get install python-rosinstall

Conclusion

    At this point, the software preparation for ROS has been completed.

おすすめ

転載: blog.csdn.net/hizcard/article/details/82954084