ROS2 learning (1) introduction, environment construction, and some suggestions for personal installation

ROS2 learning

Learn from the course of station b: https://www.bilibili.com/video/BV16B4y1Q7jQ?p=1 (up master: Gu Yueju GYH)

Introduction to ROS

Robot OS provides relatively complete middleware, tools, software, etc. for robot development.

ROS1 has many defects for embedded devices, such as real-time problems, relying on a stable network with large bandwidth, and is only suitable for a single robot.

ROS2 supports small embedded devices, supports multi-robots, supports real-time control, and supports non-ideal network environments. To a large extent, I think it is for embedded development.

Some specific agreements and other content will be learned later and then explained in detail.

ROS2 installation

The Linux kernel written by Linus, the Linux distribution is actually a package of the Linux kernel and other applications. Such as Ubuntu Centos.

ROS2 is based on the Ubuntu system. The installation of the virtual machine environment will not be repeated here.

I encountered a lot of problems during the installation of ROS2, and it took me a day to install it. However, it is also possible to summarize some common problems that arise during the installation process:

  1. Try to install according to the official website ubuntu installation ROS2 tutorial. Because although most blogs and video tutorials are very detailed, there will be many problems, such as problems with different versions of Ubuntu, and problems with different network configurations... Therefore, I think the safest solution is to install according to the official tutorial first. Any problems encountered on the way will be searched for solutions alone. The official ubuntu installation tutorial is as follows: Ubuntu (Debian packages) — ROS 2 Documentation: Rolling documentation

  2. If there is a connection problem with raw.githubusercontent.com, you need to query the ip address of raw.githubusercontent.com through www.ipaddress.com , and then add the corresponding domain ip correspondence to /etc/hosts.

image-20230813214414976

  1. Be sure to check carefully when apt update is successful. At the beginning, when I updated with the Tsinghua source, I actually reported an error, saying that the source of ros could not be found. Subsequent steps such as downloading the package have failed. My solution at the time was to try to change the source first, and then upgrade the ubuntu system.

  2. Some ros software that needs to be downloaded have different names under different versions of ubuntu. For example, ros-foxy-desktop is a desktop software adapted to ubuntu 20, while ros-humble-desktop is adapted to ubuntu 22.04. If it prompts that the software cannot be found, first check whether the source has been updated normally. Search again to see if your version does not match the problem.

After the installation is complete, the test cases for sending and receiving are as follows:

84f67ac49e13562cfa68d8c0fb20b74

The window on the left sends data, and the window on the right receives it.

Guess you like

Origin blog.csdn.net/jtwqwq/article/details/132266154