ROS learning experience - Linux environment construction and ROS system installation

write before starting

The ROS system was used for SLAM and navigation in the project. It was the first time I came into contact with the Linux system and the ROS system. After reading some books and articles, I found the two very interesting, so I recorded them for later review.

Introduction to ROS system

A robot is a comprehensive platform that integrates mechanical equipment, sensors, drivers, and algorithms. In order to avoid the problem of repeated wheel creation in the development of robots and shorten the development cycle of robots, the Robot Operating System (Robot Operating System, ROS) emerged as an open source cross-platform robot development environment. The ROS system is not an independent operating system, but a development environment based on Windows, Linux and other operating systems. In fact, ROS is not responsible for the code writing of specific functions. The implementation of specific functions still requires the use of computer languages ​​such as C++ and Python. However, ROS can package the functions that have been tested in the form of function packages, which is convenient for developers to share their own function packages, and they are all open source and free.
The core function of ROS is to make the functions written by the software into nodes. Nodes can communicate by sending information. These nodes can be distributed on one host or on different hosts, and are uniformly scheduled by the master node (master is canceled in ROS2).

ROS's official community:
View various instructions for use: http://wiki.ros.org/
You can search for solutions to various problems or ask questions directly: https://answers.ros.org/questions/
Chinese communication platform: http://fishros.com/#/fish_homehttps://www.guyuehome.com/

Books currently read by individuals:
"ROS Educational Robot Training Course" Northwestern Polytechnical University Press Jiang Jianjun et al.
"Robot SLAM Navigation Core Technology and Practical Combat" Machinery Industry Press Zhang Hu "
Mobile Robot Synchronous Positioning and Map Construction" National Defense Industry Press Juan-Antonio et al.
"ROS Robot Development Technology Basics" Chemical Industry Press Jiang Changjiang et al.

Linux environment construction: Ubuntu

ROS supports multiple operating systems, but the support for its native Ubuntu Linux is the best, so it is recommended to install ROS on the Ubuntu system.
The ROS system is updated with the update of the Ubuntu system, and each Ubuntu version corresponds to the corresponding ROS version, as shown in the following figure: *
Correspondence between ROS version and Ubuntu version
Image source: https://blog.csdn.net/maizousidemao/article/details/119846292
ROS is currently promoting ROS2, and the development team has announced that it will no longer launch a new ROS version, and will turn to the operation of ROS2 in the future, but learning ROS will also be of great help to learning ROS2, and there are still many application scenarios of ROS in the market.

Ubuntu system download

The development of ROS robots requires both the main control board and the workbench to be equipped with Ubuntu system. The main control board (Raspberry Pi, Jetson Nano, etc.) is responsible for the control of the robot, and the workbench (usually a laptop) is easy to operate by yourself.
My laptop is Ubuntu 18.04 installed in a virtual machine. For the construction process, refer to the following articles:

https://blog.csdn.net/qq_43377653/article/details/126877889

For version selection, refer to the table above.

ROS system installation

The installation of the ROS system can refer to the official website tutorial:

http://wiki.ros.org/ROS/Installation

You can also refer to this article:

https://blog.csdn.net/qq_43313298/article/details/124187225

A one-click installation tool that is friendly to beginners, a tool developed by Yuxiang ROS masters, one line of code to solve troubles:

https://fishros.org.cn/forum/topic/20/%E5%B0%8F%E9%B1%BC%E7%9A%84%E4%B8%80%E9%94%AE%E5%AE%89%E8%A3%85%E7%B3%BB%E5%88%97?lang=zh-CN

After the installation is complete, start a terminal ctrl+alt+t
1, start the master node:

roscore

2. Then open another terminal to start the little turtle simulation node:

rosrun turtlesim turtlesim_node

At this time, a little turtle simulation window will pop up automatically.
3. Then start another terminal to start the little turtle control node:

rosrun turtlesim turtle_teleop_key

At this time, you can use the four keys in the lower right corner of the keyboard to move up, down, left, and right.
If the above test runs successfully, it proves that the ROS installation is successful.

If you think it is too troublesome to start the terminal multiple times, share a small tool terminator, which can split the terminal window, install the command: if you are sudo apt-get install terminator
not sure, you can refer to this article:https://blog.csdn.net/qq_34761779/article/details/126801202

Many Linux operations are performed on the command line, but many commands are difficult to remember, you can refer to here:https://blog.csdn.net/weixin_44191814/article/details/120091363

Guess you like

Origin blog.csdn.net/m0_48639942/article/details/129966958