Open access peer-reviewed chapter

Control Barrier Functions and LiDAR-Inertial Odometry for Safe Drone Navigation in GNSS-Denied Environments

Written By

Halil Utku Unlu, Dimitris Chaikalis, Vinicius Gonçalves and Anthony Tzes

Submitted: 14 July 2023 Reviewed: 21 July 2023 Published: 12 October 2023

DOI: 10.5772/intechopen.1002654

From the Edited Volume

Motion Planning for Dynamic Agents

Zain Anwar Ali and Amber Israr

Chapter metrics overview

68 Chapter Downloads

View Full Metrics

Abstract

This chapter is concerned with drone navigation in unknown, indoor environments. This necessitates using the onboard LiDAR and IMU sensors to solve the simultaneous localization and mapping (SLAM) problem. Control barrier functions (CBFs) augmented with circulation constraints are designed for motion planning. CBFs ensure that the drone can safely navigate the unknown environment by avoiding obstacle collisions. The FAST-LIO package is used for SLAM and the generated OctoMap data are transmitted to the CBF-module motion planning algorithm. Simulation studies using the Gazebo Physics Engine with a coaxial hexarotor drone are provided to validate the efficacy of the suggested algorithm.

Keywords

  • SLAM
  • control barrier functions
  • motion planning
  • unmanned aerial vehicles
  • safe navigation

1. Introduction

1.1 Motivation

Navigation in unknown environments [1] using Unmanned Aerial Vehicles (UAVs) is an important research area. This task requires integrating many different techniques and algorithms in obstacle avoidance, localization, mapping, and control. For a UAV operating outdoors [2], the integration of a Global Navigation Satellite System (GNSS) can provide accurate position information. When we consider indoor exploration, we cannot assume a consistent presence of GNSS signals. UAVs navigating in unknown indoor confined environments without GNSS coverage [3] provide significant challenges that jeopardize a safe autonomous mission.

1.2 Recent work

Previous works that handled this problem include [4], in which the UAV navigates in an unknown environment while requiring prior knowledge of certain features. Furthermore, Matos-Carvalho et al. [5] presents an algorithm for accurate indoor UAV navigation, using several fixed radio stations to improve the UAV positioning. Such solutions are however not applicable to navigation of purely unknown environments. In the case of multiple deployed agents, relative measurements have been used to guarantee formation control without external positioning [6], but the global planning problem remains unsolved.

The overall problem of safe navigation can be essentially divided into three different problems: (i) to map and locate the robot in the environment, (ii) to plan a movement that achieves the goal given the map, and (iii) to manipulate the lower-level controllers to follow the given plan.

For problem (i), the mapping and localization problem, we need the vehicle to be able to keep an estimate of its position with respect to the environment and integrate sensor information at a given position to generate a representation of the surrounding environment. However, simply relying on odometry will lead to inconsistencies for a lengthy mapping session [7], requiring the algorithm to recognize that the vehicle has been at a particular location more than once. The recognition and subsequent correction of the map is termed loop closure.

With regard to odometry, vision provides an abundance of information, making it very useful for odometry estimation in UAVs. Camera-only [8] and vision-inertial sensor coupled odometry [9, 10] are viable options. In [11], a hybrid point-line feature-based localization is proposed for UAVs, without needing an IMU sensor. Similarly, deep neural networks are leveraged in [12] for UAV localization in emergency situations. A recent example of visual-inertial localization implementation aimed towards UAVs is described in [13].

Mapping entails storing a representation of the environment for future retrieval. Different representations that have been studied include visual features [11, 14], depth measurements [15, 16], and semantic descriptions [17]. For a more thorough coverage of issues pertaining to the SLAM problem at large, we direct the reader to [18], which covers both the front-end (sensor modality) and the back-end (representation and optimization) aspects of SLAM.

The problem (ii), the motion planning problem, has been widely studied. For example, we have optimization-based [19] or classical probabilistic algorithms as Rapid Random Trees [20] and Probabilistic Roadmaps [21], algorithms capable of planning the shortest possible paths [22, 23, 24, 25], among others. However, these algorithms often require that the map is known a priori, which is often not the case in many practical situations. There are works that use artificial intelligence in order to achieve autonomous navigation of unknown areas [26, 27]. However, such methods often do not offer guarantees.

Algorithms for motion planning in unknown environments have to handle two main problems: (a) providing efficient exploration strategies and (b) planning safe paths along this exploration. In this work, we provide a motion planning algorithm that achieves exploration through a careful selection of frontier points, that is, points in the border between the known and unknown areas. The algorithm has a metric to select promising points—considering we aim to achieve a fixed target—and accomplish the high-level planning to these points using a graph structure built while navigating. We then need a low-level planner, that is, an algorithm that plans a safe path towards these points. This problem is usually handled by considering a straight line between the points and verifying if they are safe. In this work, this is attained using the combination of several strategies. We leverage the properties of control barrier functions (CBF) [28] to generate a safe path by solving a sequence of Quadratic Programs (QP). These QPs include a modification proposed in [29] that enhances the obstacle-avoidance capabilities of the planner. This safe path is then converted into a linear velocity command to the lower-level controllers using a vector field approach proposed into [30].

For problem (iii), the low-level controller problem, most commercial UAVs come with autopilot software capable of controlling the motors of the vehicle and allow the users to provide inputs to dictate the flight of the system [31]. In order to keep the developed planners applicable to UAVs with standard autopilots, the control of the UAV is maintained as a simple cascade PID structure in this work. The planner module provides linear velocities which are turned into desired attitude and thrust with a simple PID. Another series of PID controllers are tasked with achieving attitude control of the vehicle, emulating the performance of commonly available flight controllers.

The mission is to control a drone in an indoor environment to achieve a desired position while avoiding collision with the environment, under the following assumptions:

  • The coordinates of the target are known, specified in a world frame W.

  • The drone maintains a given height during its flight, that is, that the mission is achievable by selecting a suitable plane parallel to the ground. The z vector of the world frame W is orthogonal to the ground, and thus a constant height means a constant z component when the position is measured in the world frame. Given this planarity assumption, the desired 2D position is termed pGLOBAL.

  • The drone is equipped with a LiDAR and IMU.

  • The drone’s lower-level inputs (motors’ thrust) can be controlled.

1.3 Contributions

Figure 1 shows schematics of the suggested approach. The “Algorithm” is divided into three modules: “SLAM”, “global planner” and “lower-level controller”. Each one of the modules will be discussed separately in the next subsections, but, overall, the “SLAM” module (Section 2) receives data from the sensors, providing the 2D position p and current map M to the “global planner” module (Section 3). This module is responsible to generate the 2D linear velocity ṗd to accomplish the mission, and send it to the “lower-level controller” (Section 4) to manipulate the low-level command τ (the motors’ thrust) to follow this reference. This is sent to the drone, which then provides the data, closing the loop.

Figure 1.

Schematics of the algorithm.

More concretely, the contributions of this chapter include the use of CBFs with additional QP constraints to yield collision-free velocity commands. By keeping the outputs of the algorithm vehicle agnostic, the algorithm can be applied to any platform.

1.4 Organization

In Sections 2–4 the three modules displayed in Figure 1 are discussed. Then, in Section 5 simulation studies in the Gazebo environment showcase the algorithm’s operation. Finally, in Section 6 we give our concluding remarks.

Advertisement

2. Simultaneous localization and mapping (SLAM) module

The indoor navigation sensor suite is comprised of a 3D LiDAR sensor, attached on top of the UAV, as shown in Figure 2, an Inertial Measurement Unit (IMU) on the flight controller, and a downward-facing rangefinder placed underneath the UAV. The addition of the rangefinder provides a robust estimate of absolute distance to the ground since the LiDAR sensor is not expected to sense the floor due to its placement on the top of the vehicle.

Figure 2.

Depiction of UAV agent with relevant coordinate frames.

The LiDAR point cloud and corresponding IMU measurements are fed to the FAST-LIO algorithm [32], which estimates odometry in a tightly-coupled iterated extended Kalman filter by fusing 3D feature points from LiDAR and measurements from IMU. Odometry from FAST-LIO is reliable for orientation and motion on the xy-plane.

An extended Kalman filter (EKF) [33] fuses IMU linear accelerations and angular velocities, rangefinder relative height measurements, and LiDAR-inertial odometry, resulting in an estimate of the UAV state. Let a world-fixed inertial frame be W and a body-fixed frame be B on the UAV IMU. Then the UAV’s state, as maintained at the EKF, is χ=qTq̇TFTT, where q=xyzT the UAV’s 3D-position in W and F=ϕθψT the roll, pitch, and yaw Euler angles of the UAV respectively.

Odometry estimates of the UAV are used as the basis for 3D occupancy grid mapping. Poses of LiDAR sensor measurements are integrated into a 3D occupancy grid map M¯3DR3×01 with OctoMap [34] as its backbone. OctoMap framework stores the probability of occupancy of a 3D grid with an arbitrary size efficiently in an octree data structure. Let Zt=LrR3 be the point cloud of LiDAR measurement at time t, corrected for the motion of the sensor and expressed in the frame coinciding with sensor’s origin, and TL=RLqL01×31SE3 be the pose of the LiDAR sensor in the world frame, with RLSO3 denoting a rotation matrix and qLR3 as the origin of the sensor. Probability of occupancy is reduced for every grid cell in M¯3D that lie in the line defined as

ldqL+dRLLrRLLr;0dminRLLrdmaxE1

If the point is within a certain distance from the sensor origin, denoted as dmax, then the probability of occupancy of the grid cell containing the endpoint is increased. The reason for including a maximum distance is mainly for efficiency purposes, as ray casting every point in Zt at every time step is an expensive process.

Instead of working with pure probabilities, the maximum likelihood estimate of the map M¯3D is obtained to classify the map into three distinct classes: occupied (1), free (−1), and unknown (0). The maximum likelihood map is denoted as M3DR3×1,0,1. Let the function Class:R31,0,1 provide the class information for points in the 3D occupancy map.

For a continuous mapping mission with insufficient feature variety in an environment, a loop closure module to account for odometry drifts may be required. Minuscule errors in pose estimation via visual or visual-inertial odometry accumulate to introduce large inconsistencies. However, the odometry estimation obtained via the aforementioned EKF formulation provides sufficient accuracy for an indoor environment. Indoor spaces are seldom larger than the coverage a commercial 3D LiDAR sensor can provide. Therefore, a loop closure module is omitted, and the odometry estimates are relied on solely for mapping. However, it is possible to implement a 3D map-based loop closure module, similar to the vision-based approaches [35] using an equivalent global descriptor for depth data [36].

In this work, the navigation requirements of the UAV are limited to 2D. As such, only the occupancy of a subset of the 3D grid in M3D that lies within a height range zhminhmax is of importance. To consolidate the information contained in the given height range, the occupancy information is reduced to a 2D grid via the projection of each point coordinate onto xy-plane. More concretely, let the coordinates of an arbitrary grid center in M be denoted as gi=xiyiT, and the set of grid centers with the same xy-coordinates in M3D be denoted as riz=xiyizT. Note that the xy-coordinates of the points are shared between gi and riz. We defined the projection function Proj:R21,0,1 as

Projgi1rizM3D,zhminhmax,Classriz=11rizM3D,zhminhmax,Classriz=10otherwise.E2

The projection function given in (2) is conservative: the 2D coordinates are considered occupied even if a single point in the column of all points within the given height range is occupied, and the cell is considered free only if all of the points in the same column are free.

An example projection from a 3D map to a 2D map is provided in Figure 3(a). On the left is the binary OctoMap occupancy representation of the environment, color-coded based on the obstacle height. Upon projecting a height range of the map onto a 2D plane, the map representation on the right is obtained. Occupied, free, unknown, and frontier cells are represented in red, green, black, and magenta colors, respectively.

Figure 3.

A 3D rendering of the occupancy grid view, denoting the occupied cells with color coding, along with a sample 2D projection of the occupancy map. Occupied, free, unknown, and frontier cells are depicted in red, green, black, and magenta colors respectively. A zoomed-in view of the 2D occupancy map is provided for clarity.

Advertisement

3. “Global planner” module

Important concepts and subroutines will be clarified prior to the motion planning algorithm.

3.1 Map and distance functions

For the motion planning, the map M implies a collection of points R2 that represent the geometry of the environment detected so far using the LiDAR sensor. As this information evolves as the drone navigates the environment, it changes continuously, the term Mt emphasizes the map up to a specific time t.

It is essential for the motion planning algorithm to compute distances between the drone and the map in order to plan a safe path. Furthermore, distance gradients are also necessary for the approach. Before considering the geometry of the robot, we will be concerned with the distance between a point pR2 and an obstacle. Since we have a collection of points MR2, described as g, a first idea is to compute the point-to-map distance EPpM as the minimum Euclidean distance between p and the points g. However, there is an issue with this approach: the function EPpM is not differentiable in p due to two reasons: the fact that the individual Euclidean distances pg are non-differentiable on p and also the fact the minimum function is non-differentiable at some points. The first issue can be easily solved by using the squared Euclidean distance pg2, and the second can be addressed by using an approximated version of the minimum that can be guaranteed to be differentiable. The softmin function [37] is a good candidate, defined (with an averaging term) as

minhg1g2gmhln1mk=1mexpgkh.E3

This function is always differentiable in the arguments gi and approximates the minimum when h is positive and close to 0. With softmin as the minimum, the point-to-map squared distance is defined

EPpMmingMhpg2E4

in which h is a parameter. With this definition, the gradient of EPpM is computed as

pEPpM=pgMexppg2/hggMexppg2/h.E5

The drone is modeled by a sphere of radius RROB. Thus, using the previously-defined point-to-map distance, the robot-to-map squared distance is defined as EpMEPpMRROB2, in which pR2 given by p=xyT is the drone’s 2D position. Note that this is different than q=xyzT introduced in the previous section: p is the projection of q in a plane parallel to the ground. Since the planner is 2D only, it does not require the height z. Nevertheless, we can easily compute the gradient of this function as pEpM=pEPpM, in which pEPpM is computed according to (5).

3.2 Control barrier functions with circulation constraints

The utilized global planner needs a local planner that plans a (usually short) path from one point to another while avoiding obstacles. It is common to plan using a straight line, and the planner is successful if this line does not cross any obstacle within a safety margin. Although this strategy is simple to implement, it may be inefficient because the path may be often blocked by obstacles, requiring many calls to the local planner until a path (formed by line segments) is found. We will propose another approach that, although not as simple to implement as a straight line, provides successful paths more often because it is able to deviate from the obstacles.

Suppose the existence of a point p in which its velocity ṗ=u is controlled. This control input u should guide p from its starting position to a final position pGR2, while avoiding collision with the map M. During the planning phase starting at time t0, the map Mt is assumed to be constant, being Mt0.

ṗ is computed using control barrier functions with circulation constraints [29]. At each point p the velocity up is computed by solving a QP problem that guides the point towards the target while avoiding obstacles. This QP has two constraints: one directly from the CBF, and another derived from it, that induces a circulation behavior. The circulation behavior is a novelty introduced in [29] that helps deviate from obstacles with a negligible increase in the cost of the algorithm.

The following parameters of this formulation are defined:

  • Let ΩR2×2 be a skew-symmetric matrix, that determines how the environment is circulated;

  • Let α:RR be a continuous, decreasing function with α0=0, that determines how fast obstacles can be approached given how close are;

  • Let β:RR be a continuous, decreasing function such with β0>0 and βEpGM<0, that determines how much an obstacle is forced to be circulated given how close to it the robot is.

  • Let KC be a positive constant that determines the approach speed to the target.

Furthermore, define the normal and tangent vectors:

NppEpMpEpMandTpΩpEpMΩpEpME6

Both are well defined (i.e pEpM and ΩpEpM are non-null vectors). Finally, define udpKCppG. Then the CBF + QP formulation to compute up is as follows [29]:

up=argminμμudp2E7
suchthat:NpTμαEpME8
TpTμβEpM.E9

This is a QP problem that always has a solution, and furthermore, this solution is unique because it is a strictly convex problem. Care must be taken when the problem is not well defined. This can be divided into three mutually exclusive conditions:

  • ΩpE=0 but pE=0. In this case, we just discard the tangent constraint. This is especially important because Ω being the 2×2 null matrix is a possibility.

  • pE=0 and E>0. In this case, we can disregard the normal and tangential constraints and just use up=udp.

  • pE=0 and E0. In this case, we have to stop, since we do not have distance gradient information and we are dangerously close to obstacles.

The planner can fail in three different cases: (i) because the third condition is reached, (ii) because the robot has reached a point in which up=0 but ppG or (iii) because a limit cycle has been reached.

3.3 Local planner function

With the description given in the previous subsection, we can define the CBFCircPlanOne function:

PSCBFCircPlanOnep0pGMΩTE10

which is at the core of the motion planning algorithm. It takes as arguments a starting point p0R2, a goal point pGR2, a map M, a circulation Ω and a time period T, and tries, using the procedure described in the previous subsection, to plan a collision-free path from p0 to pG while avoiding the obstacles detected in the map and using as a circulation parameter Ω, while integrating the dynamical system ṗ=up from t=0 to t at most T time units. Note that the algorithm can halt before it reached t=T in the integration, either because it detects one of the failure conditions described in the previous subsection or because it reached the goal. Nevertheless, it returns the path P it obtained until it halted and also a signal STRUEFALSE saying if it was successful or not. Naturally, the resulting differential equation cannot be solved analytically except in very simple cases, and the path is computed using a numerical integration scheme. Related to this function, we define the CBFCircPlanMany function:

PΩBESTSCBFCircPlanManyp0pGMTE11

which plans many paths from p0 to pG, with the map M and with each one of them integrating until at most t=T, using different previously-defined rotations Ω. Thus, this function calls CBFCircPlanOne many times. It returns the shortest path P among all the successful paths, the best circulation matrix ΩBEST that achieved this smallest successful path and a signal STRUEFALSE saying if at least one of the paths was successful or not. In the proposed approach, three different matrices Ω were used, representing clockwise rotation, counter-clockwise rotation, and a non-rotation. More precisely, let

ΩZ0110,Ω00000E12

then +ΩZ (counter-clockwise), ΩZ (clockwise) and Ω0 (no induced rotation) is used.

3.4 Vector field path tracking

The global planner periodically revises its plan and eventually commits the drone to a path P. Once a path is given, the robot’s low-level control input is computed - its linear velocity (see Section 4) - to track this path. For this, the vector field methodology is used [30]. The function ṗvectorFieldpP will return the linear velocity ṗ to be sent to the lower level controllers given the current position p and the committed path P.

3.5 Exploration graph generation

In order to run the motion planning algorithm, as the drone moves, a graph G is incrementally generated that represents the connectivity of the environment in a simplified and structured way when compared to the map M. Each “node” N of the graph is associated with a position in the map. Two nodes/points pA and pB are connected if and only if a safe path is secured between pA and pB. As this graph is updated/built as the drone moves, it is also time-variant, described by Gt.

Associated with this graph, the following functions can be found:

  • GupdateGraphpGM, which updates the current graph G, given the current position p and the current known map M, returning the updated graph G'. It tries to insert a new node associated with the current position p by trying to connect this node to another one already on G (the closest one in which the connection is possible), taking into consideration the obstacles codified into the map M. The graph is undirected and weighted by the distance between the two nodes.

  • NgetNearestNodespG returns a sorted list of all the nodes N of the graph G sorted by their Euclidean distance to the point p in ascending order.

  • NLgetNearestReachableNodepGM returns a node N of the graph G such that there is a path from p to N, considering the obstacles codified into M. It also returns the length L of this path. This function can be implemented as follows: getNearestNodes is used to get a list of nodes, sorted by the Euclidean distance to p. Then CBFCircPlanMany is used in each one of them until the planner is successful. The first successful node is returned as N. The assumption is that this algorithm never fails, i.e., the graph G is a good enough representation of the map M and the local planner is good enough to always move from the current position to one of the nodes of the graph.

  • NLgetPathNANBG returns a list of nodes N containing the shortest path from node NA to node NB given the graph G, and also the length (sum of the weights between the edges) of this path. This shortest path considers only the weights codified into the edges of the graph, does not take into consideration the map M, and can be computed using (for example) Dijkstra’s algorithm. Note that, given the nature of the graph building scheme described here, such a path always exists between two given nodes, since it only adds a node to the graph (using the updateGraph function) if a path between that node and another node (already in the graph) exists.

3.6 Frontier points and frontier exploration

Eventually, the motion planner should request the robot to go to an unexplored region of the map [33]. For this, a function FgetAllFrontiersM is implemented that obtains a set of representative frontier points F from the currently-known map M.

A frontier point is defined as a coordinate in 2D binary occupancy map M which is classified as a free cell, is in the 8-neighborhood of a cell that is marked unknown, and is not in the 8-neighborhood of a cell that is marked occupied. To this end, standard image processing tools are utilized by treating the 2D binary occupancy as a binary image with 2 channels (maps): an occupied channel, denoted Oc:N201, with pixel value of 1 if the coordinate is occupied, and a free channel, denoted as Fr:N201, whose coordinates take the value 1 for free coordinates. Due to the definition of the projection as given in (2), a coordinate cannot have both values in the two channels be 1. Implicitly, any coordinate at which both channels have a 0 value is unknown.

The occupied channel Oc is firstly dilated by 1 pixel to obtain the image O¯c. Then the internal and external contours of the free channel Fr are extracted, denoted as CN2. For every contour point g, the corresponding value in O¯c is checked at the pixel coordinate given by g. All the points gC that have a 0 value in O¯c constitute the frontier, F. More concretely:

F=gCO¯cg=0.E13

A sample of frontier points is marked in Figure 3(b), which can be seen as the magenta points in the zoomed-in view.

Once these points are obtained, an algorithm decides which point it is going to explore next. This is achieved by function NSselectExplorationFrontierpMFG that processes the current position p, the current map M, the frontier points F and the graph G, and returns the path one should travel from the points of the graph G to reach one of the frontier points (if one is found) and a signal STRUEFALSE if it was successful.

The algorithm’s structure is:

  • Step 1: For each point pFF the CBFCircPlanMany function is used to try to connect NTRY (a parameter) different nodes of G to the point pF. The NTRY closest nodes from pF, obtained from the getNearestNodes functions are tried. The points in which it was not possible to connect none of these NTRY nodes to pF are discarded, meaning that these frontier points are most likely unreachable, obtaining a new set F'F. For each point in pFF', this procedure also allows us to create two maps: NclosestSuccesfulNodepF that maps the frontier point into the node N of the graph G that has the shortest successful path from it, and LshortPathLengthFromGraphToFrontierpF that gives the length of this shortest successful path.

    • If F'=, the algorithm ends, since most likely anything anymore can be explored.

    • Otherwise, proceed to Step 2.

  • Step 2: For each one of the positions in pFF', the CBFCircPlanMany function is used to try to connect this point to the global target pGLOBAL. Those points in which we were successful are aggregated into a set F, and this procedure allows us to create a map LshortPathLengthFromFrontierToGoalpF with this smallest length.

    • If F=, proceed to Step 3.

    • Otherwise, proceed to Step 4.

  • Step 3: For each one of the positions in pFF, a metric is computed that decides which point is going to be explored. This metric is given by the sum of

    • The path length LpGStart from p to a node NGStart in the graph, obtained from NGStartLpGStartgetNearestReachableNodepGM;

    • The path length LGStartGEnd from NGStart to the node NGEnd=closestSuccesfulNodepF, obtained from getPath NGStartNGEnd;

    • The path length LGEndF from NGEnd to the frontier point pF using the shortest planned path, which is LGEndF=shortPathLengthFromGraphToFrontierpF;

    • The path length LFGLOBAL, which is

      LFGLOBAL=shortPathLengthFromFrontierToGoalpF.

      The point pF is returned with the smallest such metric, the list of nodes from NGStart and NGEnd as N, together with a dummy node at the end (that is not on G) that represents the frontier point pF, and thus the algorithm ends. This metric is an estimate of how long the optimistic path from the current point p to the global target pGLOBAL is, assuming that the current map is the final map, and thus the most promising frontier points are selected to explore;

  • Step 4: If F=, Step 3 is reproduced but with F instead of F and without the last term, LFGLOBAL (since it was not possible to plan a path from the frontier to the goal).

3.7 The motion planning algorithm

With all the necessary functions introduced, the motion planning algorithm can be explained. Let the state variables of the planner, be internal variables that must be stored all the time and that are read and modified by the flow of the algorithm:

  • The current committed path PC that the vector field algorithm needs to follow, which is empty in the beginning.

  • The current graph G, starting with a graph with a single node, representing the starting position p0;

  • The current rotation parameter Ω. This can be initialized as any one of the three possible rotations described in (12) (e.g: Ω0);

  • The current goal pG, which starts with the global goal pGLOBAL;

  • The current navigation mode V, that can be either goingToGlobal or goingToFrontier. It starts with goingToGlobal;

  • The current list of nodes from G that we should track, NC, along with the current node on this list, NCN. These two states are only used when V=goingToFrontier, and since V starts with goingToGlobal, it does not matter how they are initialized.

As shown in Figure 1, the inputs of the algorithm are the current position p and map M from the SLAM algorithm, and the output is the desired linear velocity ṗd to be provided to the lower level controller. It has three different sub-algorithms, labeled as A, B, and C, that runs in different frequencies (and the latter asynchronously as well) and reads and modifies the state variables.

In a given frequency fA—which is the frequency in which the algorithm is going to output the linear velocity—the planner uses the vector field algorithm to track the committed path PC, providing ṗ, and also check if the current target pG was reached. In a frequency fB<fA, it replans the committed path PC based on the current goal pG, and, finally, in a frequency fC<fB, it updates the graph, replans the goal pG itself, the current Ω and the current navigation mode V.

A more detailed description of each sub-algorithm is shown in the sequel:

  • Algorithm A: running at a frequency fA. This algorithm is responsible to verify if the target was achieved, changing the flow of the algorithm if it is the case. It may call Algorithm C below. It also sends commands to the lower-level controller.

    • Step 1.A: Check whether the current goal is reached by checking if ppGδ for a parameter δ.

      1. If this is false, go to Step 2.A;

      2. If this is true and V==goingToGlobal, the mission is accomplished and the whole algorithm ends.

      3. If this is true and V==goingToFrontier, check whether the node NC is the last on the list NC, or not.

        1. If not, set NC to the next of the list and set pGNC. Call Algorithm C and, when it halts, go to Step 2.A.

        2. If it was the last node of the list, set V goingToGlobal, set pGpGLOBAL. Call Algorithm C and, when it halts, go to Step 2.A.

    • Step 2.A: compute ṗdvectorFieldpPC and output it to the lower level controller. Algorithm A then ends.

  • Algorithm B: running at a frequency fB. This algorithm is responsible for updating the path that is being tracked. It consists of a single step, running

    PCSCBFCircPlanOnep0pGMΩTBE14

    for a fixed time TB (a parameter), updating PC. Irrelevant on whether it failed or not, since it is a small local path that is unlikely to reach the current target unless the drone is very close to it. Thus, disregard S. Algorithm B then ends.

  • Algorithm C: running at a frequency fC, and asynchronously (when called by Algorithm A). It is responsible to replan the target pG and also updating the graph.

    • Step 1.C: Run GupdateGraphpGM to update the graph. Go to Step 2.C.

    • Step 2.C: Replan the path to the current goal by running

      PΩBESTSCBFCircPlanManyppGMTCE15

      for a fixed time TC (a parameter).

      • If the algorithm was a success (S==TRUE), set ΩΩBEST and Algorithm C ends (do not care about P).

      • If the algorithm fails (S==FALSE), it means that very likely it is no use to try to go to the current target point pG, and there is no need to change it. Explore a frontier point, and thus run FgetAllFrontiersM, and then NES selectExplorationFrontierpMFG.

        • If S == TRUE, set V goingToFrontier, NCNE, NC to the first node of NC, and pGNC. Try to replan, going back to Step 2.C;

        • If S == FALSE, the whole algorithm ends with failure, because there is nothing to explore anymore and the global goal was not found;

Advertisement

4. “Low-level controller” module

Given the desired 2D linear velocity ṗd commanded by the global planner, this vector is augmented with a 0—since we want to maintain a constant height—at the end to obtain the 3D desired linear velocity q̇d. The velocity controller computes a desired acceleration vector as

αd=gKpq̇q̇dKI0tq̇q̇d,E16

where Kp,KI are positive gains and g=0,0,9.81Tms2.

A low-level attitude controller runs on the UAV autopilot, relying on the ArduCopter firmware, controlling the vehicle’s orientation and commanding the signals to the motors. Using the vehicle mass m, the desired acceleration vector α is turned into thrust, roll, and pitch commands for the attitude controller as:

T=mαdTe3cosϕcosθ,ϕd=mαdTe1T,θd=mαdTe2TE17

where ei is a unit vector along axis i. For the purposes of this work, the commanded yaw angle ψd is always kept at zero.

The ArduCopter autopilot uses a cascade PID structure to transform the desired orientation commands into angular velocities and subsequently desired moments, which are combined with the desired thrust result into throttle level commands for the motors, which is the vector τR4 depicted into Figure 1. The structure of the low-level attitude controller is illustrated in Figure 4. The output of the motor mixer is PWM-values for the Electronic Speed Controllers of the UAV motors, controlling the speed of each motor. Current attitude Φ is available from the EKF, while current angular rate Φ̇ is provided directly by the gyroscope.

Figure 4.

Cascade PID structure of low-level attitude controller.

Advertisement

5. Simulation studies

To showcase the results of the algorithm, a warehouse-like Gazebo environment is used, depicted in Figure 5 in which the objective is to move from the starting position (magenta circle to the right) to the end position (green circle to the left). The goal is to go from a starting position p0=00Tm to a global goal position pGLOBAL=6.5,1.0Tm, all written in a world-frame which is the starting body drone frame. The drone keeps a constant height value of 1.0m. The parameters used were:

  • For the map generation: Both FAST-LIO and OctoMap build their respective maps with a voxel grid size of 0.05m. Furthermore, dmax that controls the range of updates on occupancy probabilities is set to 5.0m.

  • For the global planner: h=0.07m2, RROB=0.9m, KC=0.50s1, NTRY=5, fA=100s1, fB=5s1, fC=0.5s1, TB=2s, TC=240s, δ=0.13m. Furthermore, αE was used such that APOSE when E0 and ANEGE when E<0 with APOS=0.05s1m0.5 and ANEG=0.60s1m0.5. Also, the function βE=vCIRC1E/DCIRC2 was employed with vCIRC=0.20ms1 and DCIRC=0.32m.

  • For the UAV controllers: For the first stage PID (angle) the ArduCopter has P=11.6,12.0,5.4s1 for roll, pitch, and yaw respectively with 0 integral and derivative gains. For the second stage (angular rate) the gains were P=0.089,0.13,0.88s1, I=0.08,0.078,0.088s2, D=0.0024,0.004,0 (dimensionless) respectively. For the velocity controller, the gains used were Kp=0.5s1, KI=0.05s2. The mass of the UAV is m=3.5kg.

Figure 5.

Environment in two different perspectives.

Figures 6 and 7 show some snapshots of the algorithm at different times. Figure 7 also shows the graph G at the end of the algorithm. The drone’s current position is represented as a magenta circle, the target position pGLOBAL as a green circle, the current goal pGOAL as a red square, the points discovered so far as blue dots, the frontier points as gray dots, the current planned path with a red dashed line, the traced path in black. When the algorithm is in goingToFrontier mode, the graph nodes in orange and the selected frontier point pF is represented by a black dot. Each one of the snapshots is further described:

  • Figure 6 left-top: at the start, the drone is at gointToGlobal mode and, given the current map information (blue points), plan to go using a simple path (red dashed path) towards the global target (green start). Figure 6 right-top: the point is still at the same mode. Figure 6 left-middle: The robot still has hope to achieve the target. Figure 6 right-middle: after realizing that it cannot go to the global target, the drone decides that the best plan is to try to go from above since so far it did not discover that it is impossible to go from there. It changes the circulation mode and goes to the top, still in the gointToGlobal mode. Figure 6 left-bottom: after reaching the top, it realizes that it is blocked there as well: it is a dead-end. It decides to explore a frontier point (black dot) and enter the goingToFrontier mode to approach this point. Figure 6 right-bottom: after it travels all the nodes, it plans to go to the frontier point.

  • Figure 7 left-top: the drone reaches the frontier point and switches back to the gointToGlobal, hoping to achieve the target given its current information of the map. Figure 7 right-top: eventually it realizes that it is not possible using the planned path. It plans to explore again. Figure 6 left-middle: it finds a point to explore and enters the goingToFrontier mode. Note that there are no orange points this time: the list of the nodes to be traveled only contains the frontier point pF, since the robot was already close to it. Figure 6 right-middle: it goes back to gointToGlobal, hoping to achieve the target given its current information on the map. Figure 6 left-bottom: the robot completed the mission successfully. Figure 6 right-bottom: graph structure G on the map.

Figure 6.

Snapshots of the simulation.

Figure 7.

Snapshots of the simulation and of the graph structure G.

Advertisement

6. Conclusion

In this chapter, a framework is provided for the autonomous navigation of a drone in a GNSS-denied and unknown environment, aiming to reach a target point while avoiding obstacles and being equipped with only a LiDAR and IMU. The 2D-navigation algorithm is divided into three modules, that were discussed in detail. We showcased how the algorithm works through a Gazebo simulation physics engine, in which the simulated drone successfully navigated safely towards the goal.

Advertisement

Acknowledgments

This work was partially supported by the NYUAD Center for Artificial Intelligence and Robotics (CAIR), funded by Tamkeen under the NYUAD Research Institute Award CG010.

References

  1. 1. Arvanitakis I, Tzes A, Giannousakis K. Synergistic exploration and navigation of mobile robots under pose uncertainty in unknown environments. International Journal of Advanced Robotic Systems. 2018;15(1):1729881417750785
  2. 2. Ilyas M, Ali ME, Rehman N, Abbasi AR. Design, development & evaluation of a prototype tracked mobile robot for difficult terrain. Sir Syed University Research Journal of Engineering & Technology. 2013;3(1):7-7
  3. 3. Tzes M, Papatheodorou S, Tzes A. Visual area coverage by heterogeneous aerial agents under imprecise localization. IEEE Control Systems Letters. 2018;2(4):623-628
  4. 4. Wang F, Wang K, Lai S, Phang SK, Chen BM, Lee TH. An efficient UAV navigation solution for confined but partially known indoor environments. In: 11th IEEE International Conference on Control & Automation (ICCA). Taichung, Taiwan: IEEE; 2014. pp. 1351-1356
  5. 5. Matos-Carvalho JP, Santos R, Tomic S, Beko M. GTRS-based algorithm for UAV navigation in indoor environments employing range measurements and odometry. IEEE Access. 2021;9:89120-89132
  6. 6. Evangeliou N, Chaikalis D, Tsoukalas A, Tzes A. Visual collaboration leader-follower UAV-formation for indoor exploration. Frontiers in Robotics and AI. 2022;8:777535
  7. 7. Papatheodorou S, Tzes A, Giannousakis K, Stergiopoulos Y. Distributed area coverage control with imprecise robot localization: Simulation and experimental studies. International Journal of Advanced Robotic Systems. 2018;15(5):1729881418797494
  8. 8. Aqel MO, Marhaban MH, Saripan MI, Ismail NB. Review of visual odometry: Types, approaches, challenges, and applications. Springerplus. 2016;5:1-26
  9. 9. Huang G. Visual-inertial navigation: A concise review. In: 2019 International Conference on Robotics and Automation (ICRA). Montreal, Canada: IEEE; 2019. pp. 9572-9582
  10. 10. Zeng B, Song C, Jun C, Kang Y. DFPC-SLAM: A dynamic feature point constraints-based SLAM using stereo vision for dynamic environment. Guidance, Navigation and Control. 2023;3(01):2350003
  11. 11. Wang H, Wang Z, Liu Q, Gao Y. Multi-features visual odometry for indoor mapping of UAV. In: 2020 3rd International Conference on Unmanned Systems (ICUS). Harbin, China: IEEE; 2020. pp. 203-208
  12. 12. Steenbeek A, Nex F. CNN-based dense monocular visual SLAM for real-time UAV exploration in emergency conditions. Drones. 2022;6(3):79
  13. 13. Moura A, Antunes J, Dias A, Martins A, Almeida J. Graph-SLAM approach for indoor UAV localization in warehouse logistics applications. In: 2021 IEEE International Conference on Autonomous Robot Systems and Competitions (ICARSC). Santa Maria, Portugal: IEEE; 2021. pp. 4-11
  14. 14. Campos C, Elvira R, Rodrguez JJG, Montiel JM, Tardós JD. ORB-SLAM3: An accurate open-source library for visual, visual–inertial, and multimap slam. IEEE Transactions on Robotics. 2021;37(6):1874-1890
  15. 15. Xin C, Wu G, Zhang C, Chen K, Wang J, Wang X. Research on indoor navigation system of UAV based on lidar. In: 2020 12th International Conference on Measuring Technology and Mechatronics Automation (ICMTMA). Phucket, Thailand: IEEE; 2020. pp. 763-766
  16. 16. Santos MC, Santana LV, Brandao AS, Sarcinelli-Filho M. UAV obstacle avoidance using RGB-D system. 2015 International Conference on Unmanned Aircraft Systems (ICUAS). IEEE; 2015. pp. 312–319
  17. 17. Kostavelis I, Gasteratos A. Semantic mapping for mobile robotics tasks: A survey. Robotics and Autonomous Systems. 2015;66:86-103
  18. 18. Cadena C, Carlone L, Carrillo H, Latif Y, Scaramuzza D, Neira J, et al. Past, present, and future of simultaneous localization and mapping: Toward the robust-perception age. IEEE Transactions on Robotics. 2016;32(6):1309-1332
  19. 19. Ali ZA, Zhangang H, Hang WB. Cooperative path planning of multiple UAVs by using max–min ant colony optimization along with cauchy mutant operator. Fluctuation and Noise Letters. 2021;20(01):2150002
  20. 20. LaValle SM, Kuffner Jr JJ. Randomized kinodynamic planning. The International Journal of Robotics Research. 2001;20(5):378-400
  21. 21. Kavraki LE, Svestka P, Latombe JC, Overmars MH. Probabilistic roadmaps for path planning in high-dimensional configuration spaces. IEEE Transactions on Robotics and Automation. 1996;12(4):566-580
  22. 22. Aggarwal S, Kumar N. Path planning techniques for unmanned aerial vehicles: A review, solutions, and challenges. Computer Communications. 2020;149:270-299
  23. 23. Yang L, Qi J, Song D, Xiao J, Han J, Xia Y. Survey of robot 3D path planning algorithms. Journal of Control Science and Engineering. 2016;2016:1-22
  24. 24. Maini P, Sujit P. Path planning for a UAV with kinematic constraints in the presence of polygonal obstacles. In: 2016 International Conference on Unmanned Aircraft Systems (ICUAS). Arlington, VA, USA: IEEE; 2016. pp. 62-67
  25. 25. Delamer JA, Watanabe Y, Chanel CP. Safe path planning for UAV urban operation under GNSS signal occlusion risk. Robotics and Autonomous Systems. 2021;142:103800
  26. 26. Padhy RP, Verma S, Ahmad S, Choudhury SK, Sa PK. Deep neural network for autonomous navigation in indoor corridor environments. Procedia Computer Science. 2018;133:643-650
  27. 27. Walker O, Vanegas F, Gonzalez F, Koenig S. A deep reinforcement learning framework for UAV navigation in indoor environments. In: 2019 IEEE Aerospace Conference. IEEE; 2019. pp. 1–14
  28. 28. Ames AD, Coogan S, Egerstedt M, Notomista G, Sreenath K, Tabuada P. Control barrier functions: Theory and applications. In: 2019 18th European Control Conference. 2019. pp. 3420-3431
  29. 29. Gonçalves VM, Krishnamurthy P, Tzes A, Khorrami F. Avoiding undesirable equilibria in control barrier function approaches for multi-robot planar systems. In: 2023 31st Mediterranean Conference on Control and Automation (MED). Limassol, Cyprus: IEEE; 2023. pp. 376-381
  30. 30. Rezende AMC, Goncalves VM, Pimenta LCA. Constructive time-varying vector fields for robot navigation. IEEE Transactions on Robotics. 2022;38(2):852-867
  31. 31. Chaikalis D, Evangeliou N, Nabeel M, Giakoumidis N, Tzes A. Mechatronic design and control of a hybrid ground-air-water autonomous vehicle. In: 2023 International Conference on Unmanned Aircraft Systems (ICUAS). 2023. pp. 1337-1342
  32. 32. Xu W, Zhang F. Fast-LIO: A fast, robust lidar-inertial odometry package by tightly-coupled iterated Kalman filter. IEEE Robotics and Automation Letters. 2021;6(2):3317-3324
  33. 33. Unlu HU, Chaikalis D, Tsoukalas A, Tzes A. UAV indoor exploration for fire-target detection and extinguishing. Journal of Intelligent & Robotic Systems. 2023;108(3):54
  34. 34. Hornung A, Wurm KM, Bennewitz M, Stachniss C, Burgard W. OctoMap: An efficient probabilistic 3D mapping framework based on octrees. Autonomous Robots. 2013;34:189-206
  35. 35. Labbé M, Michaud F. RTAB-Map as an open-source LiDAR and visual simultaneous localization and mapping library for large-scale and long-term online operation. Journal of Field Robotics. 2019;36(2):416-446
  36. 36. Kim G, Kim A. Scan context: Egocentric spatial descriptor for place recognition within 3d point cloud map. In: 2018 IEEE/RSJ International Conference on Intelligent Robots and Systems (IROS). Madrid, Spain: IEEE; 2018. pp. 4802-4809
  37. 37. Gao B, Pavel L. On the properties of the Softmax function with application in game theory and reinforcement learning. ArXiv:1704.00805. 2017

Written By

Halil Utku Unlu, Dimitris Chaikalis, Vinicius Gonçalves and Anthony Tzes

Submitted: 14 July 2023 Reviewed: 21 July 2023 Published: 12 October 2023