ROS system is usually composed of a large number of nodes, any of which can communicate with other nodes by publishing/subscribing. For example, position sensors on robots, such as radar units, can be used as nodes of ROS. The radar unit can release the information obtained by radar in the form of information flow, and the released information can be obtained by other nodes, such as navigation unit and path planning unit.
Communication mechanism of ROS:
Some function packages of SLAM in ROS (Robot Operating System) are also some commonly used SLAM algorithms, such as Gmapping, Karto, Hector, Cartographer and so on. We will not pay attention to the mathematical principle behind the algorithm, but pay more attention to the engineering implementation method, telling you how the SLAM algorithm package works and how to quickly build the SLAM algorithm.
Map: The map in ROS is easy to understand, just an ordinary gray image, usually in pgm format. In this figure, black pixels represent obstacles, white pixels represent feasible areas, and gray is unexplored areas.
Maps are maintained and presented in the form of themes in ROS, and this theme is called /map. Because /map actually stores a picture, in order to reduce unnecessary expenses, this topic is often published in a latched way. If the map is not updated, the last published content will remain unchanged. At this time, if a new subscriber subscribes to the message, he will only receive a message of /map, which is the last published message. Only when the map is updated (for example, SLAM creates a new map) will /map publish new content. This method is very suitable for slow-changing and relatively fixed data (such as maps), and then only publish it once. Compared with issuing the same uncertain message, the latching method can not only reduce the bandwidth occupation in communication, but also reduce the overhead of message resource maintenance.
Gmapping and Gmapping algorithms are relatively reliable and mature algorithms based on lidar and odometer schemes at present. It is based on particle filtering, and the effect of RBPF method is stable. Many robots based on ROS are running gmapping_slam.
Gmapping's function is to construct an environmental map and estimate its own state according to the information of lidar and odometer. So its input should include lidar and odometer data, and its output should have its own location and map.
This paper supports: R-Lins:Robo central lidar-an inert state estimator for robust and effective navigation.
6-axis IMU: high frequency, focusing on its own movement and not collecting external environmental data.
3D LiDAR: Low frequency, focusing on car body movement and collecting external environmental data.
R-LINS uses the above two sensors to estimate the motion posture of the robot. For any sensor, it is difficult to build a map only by its own data. For example, the sensor used in the pure radar model is lidar, which can detect the external environment information well. But it will also be interfered by these information, which will produce certain accumulated errors in long-term operation. In order to prevent this error from interfering with the subsequent map construction, it is necessary to use another sensor to correct the pose information of the robot itself, that is, IMU sensor. Because IMU sensor is a sensor for its own motion estimation, it collects all the attitude information of its own motion. It can well correct the position and attitude information of lidar odometer. Therefore, lidar and inertial navigation are usually used to fuse data and correct attitude information.
A * * * is divided into three big pieces: