Basics before starting with Robotics — Part 3

PythonRobotics: a Python code collection of robotics algorithms

Talha Hanif Butt
4 min readOct 9, 2021

It’s about 4 weeks and I haven’t published a video on my youtube channel so to find something I thought about SLAM and just searched for SLAM python GitHub in the hope of finding something to make a video on and I found a paper on a code collection of robotics algorithms in Python, I have read it and what I learned is as follows:

Autonomous Navigation System

An autonomous navigation system is a system that can move to a goal over long periods of time without any external control by an operator. The system requires a wide range of technologies: It needs to know where it is (localization), where it is safe (mapping), where and how to move (path planning), and how to control its motion (path following). The autonomous system would not work correctly if any of these technologies is missing.

This project provides a code collection of robotics algorithms, especially focusing on autonomous navigation. The principle goal is to provide beginners with the tools necessary to understand it.

Philosophy

The PythonRobotics project is based on three main philosophies which are as follows:

Readability

The first philosophy is that the code has to be easy to read. If the code is not easy to read, Python has great libraries for matrix operation, mathematical and scientific operation, and visualization, which makes code more readable because such operations don’t need to be re-implemented. Having the core python packages allow the user to focus on the algorithms, rather than the implementations.

Practicality

The second philosophy is that implemented algorithms have to be practical and widely used in both academia and industry. For example, Kalman filters and particle filter for localization, grid mapping for mapping, dynamic programming-based approaches and sampling-based approaches for path planning, and optimal control-based approach for path tracking. These algorithms are implemented in this project.

Minimal dependencies

The last philosophy is minimal dependencies. Having few external dependencies allows us to run code samples easily and to convert the Python codes to other programming languages, such as C++ or Java for more practical applications.

Localization

Localization is the ability of a robot to know its position and orientation with sensors such as Global Navigation Satellite System: GNSS etc. In localization, Bayesian filters such as Kalman filters, histogram filter, and particle filter are widely used.

Mapping

Mapping is the ability of a robot to understand its surroundings with external sensors such as LIDAR and a camera. Robots have to recognize the position and shape of obstacles to avoid them. In mapping, grid mapping and machine learning algorithms are widely used.

SLAM

Simultaneous Localization and Mapping (SLAM) is the ability to estimate the pose of a robot and the map of the environment at the same time. The SLAM problem is hard to solve because a map is needed for localization and localization is needed for mapping. In this way, SLAM is often said to be similar to a ‘chicken-and-egg problem. Popular SLAM solution methods include the extended Kalman filter, particle filter, and Fast SLAM algorithm.

Path planning

Path planning is the ability of a robot to search feasible and efficient path to the goal. The path has to satisfy some constraints based on the robot’s motion model and obstacle positions and optimize some objective functions such as time to goal and distance to the obstacle. In path planning, dynamic programming-based approaches and sampling-based approaches are widely used.

Path tracking

Path tracking is the ability of a robot to follow the reference path generated by a path planner while simultaneously stabilizing the robot. The path tracking controller may need to account for modeling error and other forms of uncertainty. In path tracking, feedback control techniques and optimization-based control techniques are widely used.

References

--

--

Talha Hanif Butt

PhD Student -- Signal and Systems Engineering, Halmstad University, Volvo Trucks http://pk.linkedin.com/in/talhahanifbutt