A Beginner’s Guide to SLAM in Robotics ??
How robots use SLAM to map their environment. Credit: aslteam on YT

A Beginner’s Guide to SLAM in Robotics ??

Simultaneous Localization and Mapping (SLAM) is a technique used in robotics that allows the machines to create a map of an unknown environment (mapping) while simultaneously keeping track of the robot’s location (localization) within said map.

It turns out that roboticists are pretty straightforward with their naming conventions ??

SLAM is the bridge between a robot’s perception and navigation stack. It allows them to ingest sensory data from the real world and transform it into information about how it should interact with its environment.

By continuously updating their map and location, robots can move safely and efficiently, avoiding obstacles and adapting to changes. As we’ll see, SLAM is one of the crucial components of autonomous robotics.

Let’s dive into the three core concepts of SLAM: localization, mapping, and loop closure.

Localization ??


Localization is the process that a robot takes to determine its position and orientation in its environment. It’s not enough to know where the robot is on the map. It also needs to know its direction, speed, and acceleration.

Some techniques used in Localization are GPS for absolute positioning, odometry for change in relative positioning, and sensor fusion to combine data from multiple sources (cameras, LIDAR, IMUs).

Localization does face some challenges. Real-world environments are dynamic and noisy, impacting a robot’s ability to localize. Sensors can also suffer from data drift over time, which can compound to cause large deviations in a robot’s estimated vs. real location.

Mapping ???


Mapping is the process that creates a representation of a robot’s environment that can be used for path planning, obstacle avoidance, and decision-making.

There are two approaches to establishing a map:

Grid-Based:

In this approach, the space is represented by a fixed-size grid. Each cell in the grid has information about whether the cell is occupied or empty.

Grid-based approaches are popular because they are intuitive (imagine a chessboard) and simple to implement. However, in large environments, it can become computationally expensive to maintain and update the grid.

Grid-based map, Credit: ResearchGate


Graph-based:

In this approach, the robot’s position and orientation (poses) are nodes on a graph. The edges are observations or movements between these poses. This helps the robot establish its relative position on the map.

This turns the mapping into a graph optimization problem, where we seek to minimize the error between observed data and the graph structure. Graph-based approaches are more flexible and scalable than their grid-based counterparts but struggle to respond to sparse environments that lack many landmarks.

Difference between Grid and Graph-based maps, Credit: Science Direct

Loop Closure ??


When humans navigate our surroundings, we don’t start from scratch every time. Instead, we use reference points from our previous experiences to inform where we are, i.e., “I just crossed the bakery, which means I’m 2 minutes away from home!”

Similarly, robots use loop closure to recognize previous locations they’ve visited, using this information to correct the robot’s position and update the map, effectively closing the loop.

To detect these landmarks, robots use feature matching and place recognition techniques. Both rely on inputs from sensor data and machine learning to do this pattern matching.

Graph-based mapping and loop closures connect nicely. The nodes of the graph-based map are informed by loop closures, which in turn helps optimize the graph.

The Chicken or The Egg Problem ????


A debate as old as time is the discussion regarding what came first, the chicken or the egg? In SLAM, the challenge is quite similar: which should come first, mapping or localization?

Because both mapping and localization rely on each other for pieces of the information that they need, the interdependence can create a loop where errors are magnified and accuracy is difficult to attain.

Fortunately, in the real world, robotics teams can manipulate the environment to better prepare the robot to accomplish both tasks simultaneously:

  • Bootstrapping the environment by providing the robot with rough parameters on what it will be seeing
  • Incrementally mapping and localizing, which continually reduces error as the robot proceeds on its mission
  • Using ML to input semantic information, like object recognition and scene understanding, which provides richer data

Semantic SLAM with object detection, Credit: QUT Center for Robotics

Conclusion ??


I hope you enjoyed this brief, beginner’s guide to SLAM in robotics.

This week, I’ll be posting a few tutorials on how to set up SLAM simulations in ROS2. These will be great ways to learn about how robots interact with their environment via SLAM!

Follow me Vedant Nair for more blogs, technical walkthroughs, and news about everything robotics ????


Tarun Khelani, MBA, CSM

Strategy | Technology | Product & Program Management | Agile Leader | MBA | MS

4 个月

I really enjoyed this article. Thank you for writing one, looking forward to more content from you!

要查看或添加评论,请登录

社区洞察

其他会员也浏览了