Close

myAGV | SLAM-based autonomous localization and navigation for robots

A project log for myAGV a robotic platform

The highest cost-performance mobile robotic platform for individual developers.

Elephant Robotics - Robotic ArmsElephant Robotics - Robotic Arms 09/30/2022 at 03:520 Comments

Program: Map creation and automatic navigation with myAGV
Equipment:
1 myAGV:
myAGV is an autonomous navigation smart vehicle from Elephant Robotics. It uses the competition-level Mecanum wheels and a full wrap design with a metal frame. There are two built-in slam algorithms to meet the learning of mapping and navigation directions.
0_1664506213493_agv.jpg
2 PC:
A normal computer.

The autonomous robot positioning and navigation technology include two parts: position&map creation (SLAM), and path planning&motion control. SLAM only completes the robot's positioning and map creation.

The main solution for implementing localization and navigation technology is SLAMpath planning, and motion control.

The process that a robot describes the environment and recognizes the environment mainly depends on the map. It uses environmental maps to describe its current environmental information and adopts different forms of map descriptions with the algorithm and sensor differences used.

We use the gmapping algorithm in the SLAM algorithm. The gmapping algorithm builds the map based on the raster map.

Gmapping:

Gmapping is a SLAM algorithm based on 2D LiDAR using RBPF (Rao-Blackwellized Particle Filters) algorithm to complete 2D raster map construction. 

 Advantages: 

gmapping can build indoor environment maps in real-time, with less computation in small scenes and higher map accuracy, and requires less LIDAR scanning frequency. 

 Disadvantages:

 As the environment grows larger, the memory and computation required to build the map become huge, so gmapping is unsuitable for large scene composition. An intuitive feeling is that for a range of 200x200 meters, if the raster resolution is 5cm and each raster occupies one byte of memory, then each particle carries 16M of RAM for the map, and if it is 100 particles, it is 1.6G of RAM.


Raster Map:
The most common way for robots to describe the environment is Grid Map or Occupancy Map, which divides the environment into a series of grids, where each grid is given a possible value indicating the probability that the grid will be occupied.
0_1664506385274_1.png

Start the project:
Because myAGV has a built-in Raspberry Pi computer, controlling myAGV requires leaving the keyboard and mouse, and monitor, so a computer is needed to control myAGV's computer. We use the VNC remote control.
VNC:
VNC (Virtual Network Console) stands for Virtual Network Console. It is an excellent remote control tool software developed by the famous AT&T's European research labs.VNC is a free open source software based on UNIX and Linux operating systems with powerful remote control capabilities, efficient and practical, and its performance is comparable to any remote control software in Windows and MAC. 
0_1664506459759_23.png
Place the myAGV on a level surface.


The launch file will start the odometer and IMU sensor of myAGV.
Enter the command in the terminal

roslaunch myagv_odometry myagv_active.launch

0_1664506614777_建图1.png
After turning on the odometer and IMU sensors, we then turn on the radar and gmapping algorithms to start the map creation.
Enter the command in the terminal:

roslaunch myagv_navigation myagv_slam_laser.launch

0_1664506673304_建图2.png
This is the page we just started, then we move myAGV and we can draw the map out. To control myAGV movement, Elephant Robotics gives us keyboard control.
0_1664506699010_12346.jpg
Saved the map.
Enter the command in the terminal

rosrun map_server map_saver

0_1664506764839_建图3.png
The next step is to make myAGV able to navigate automatically on the map, where myAGV can avoid obstacles to its destination (navigation) automatically by clicking on it.
First, we load the map and modify the path into our startup file.
Path planning + motion control:
Movement planning is a big concept. For example, the movement of robotic arms, the flight of vehicles, and the path planning of myAGVs we are talking about here, all are in motion planning.
Let's talk about motion planning for these types of wheeled robots. The basic capability required here is path planning, that is, the ability to perform what is generally called target point navigation after completing SLAM. In short, it means planning a path from point A to point B, and then make the robot move over it.

1. Global Planning.
To achieve this process, motion planning has to implement at least two levels of modules, and one is called global planning, which is a bit like our car navigator. It needs to pre-plan a route on the map and also the current robot's position. This is provided by our SLAM system. The industry typically uses an algorithm called A* to implement this process, which is a heuristic search algorithm that is excellent. It is mostly used in games, such as real-time strategy games like Starcraft and Warcraft, which use this algorithm to calculate the movement trajectory of units.

2. Partial Planning
Of course, just planning the path is not enough. There are many unexpected situations in reality. For example, a small child is in the way, so the original path needs to be adjusted. Of course, sometimes, this adjustment does not require a recalculation of the global path, and the robot may be able to make a slight detour. In this case, we need another level of planning called local planning. It may not know where the robot will end up, but it is particularly good at getting around the obstacles in front of it.
Next, we start the program and open the saved maps and the autopilot function.
Enter the command in the terminal

roslaunch myagv_navigation navigation_active.launch

Use keyboard control to make myAGV rotate in place for positioning. After the positioning is completed and the point cloud converges, proceed to the next navigation step.
0_1664507046384_建图4.jpg
Click "2D Nav Goal" on the top, click the point on the map you want to reach, and myAGV will set off towards the target point. You can also see a planned path of myAGV between the starting point and the target point in RVIZ, and myAGV will move along the route to the target point.
0_1664507107724_建图5.jpg
This is the end of the project
Summary:
The navigation demonstrated at present is only a relatively basic situation. There are many mobile robots on the market, such as sweeping robots. It needs to plan paths according to different environments, which is more complicated. For the problem of path planning in different environments, there is a unique called space coverage, which also proposes a lot of algorithms and theories.
There is still a lot of work to be done to navigate the SLAM algorithm in the future.
If you have good ideas to express welcome to discuss with us in the comments below ~
About Elephantrobotics:
Home
GitHub
Gitbook for myAGV

Discussions