myAGV | SLAM-based autonomous localization and navigation for robots

  • Program: Map creation and automatic navigation with myAGV
    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.
    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 SLAM, path 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 is a SLAM algorithm based on 2D LiDAR using RBPF (Rao-Blackwellized Particle Filters) algorithm to complete 2D raster map construction. 
    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. 
    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.

    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 (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. 
    Place the myAGV on a horizontal 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

    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

    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.
    Saved the map.
    Enter the command in the terminal

    rosrun map_server map_saver

    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.
    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.
    This is the end of the project
    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:
    Gitbook for myAGV

  • Can myAGV be equipped with an m5stack, which is used for one-key settings. For example, press one button to open the SLAM algorithm, and then press another button to open the keyboard control? Written as a one-click type.

  • Of course you can, but you need to take into account the power supply. myAGV comes with its own battery 12V 2A, and the addition of the m5stack development board will reduce the performance in terms of range.