{'fraction_non_alphanumeric': 0.03318011510680212, 'fraction_numerical': 0.009540731584842983, 'mean_word_length': 4.52732707087959, 'pattern_counts': {'":': 0, '<': 0, '<?xml version=': 0, '>': 0, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 5, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
PlaneSLAM: Plane-based LiDAR SLAM for Motion Planning in Structured 3D Environments

LiDAR sensors are a powerful tool for robot simultaneous localization and mapping (SLAM) in unknown environments, but the raw point clouds they produce are dense, computationally expensive to store, and unsuited for direct use by downstream autonomy tasks, such as motion planning. For integration with motion planning, it is desirable for SLAM pipelines to generate lightweight geometric map representations. Such representations are also particularly well-suited for man-made environments, which can often be viewed as a so-called"Manhattan world"built on a Cartesian grid. In this work we present a 3D LiDAR SLAM algorithm for Manhattan world environments which extracts planar features from point clouds to achieve lightweight, real-time localization and mapping. Our approach generates plane-based maps which occupy significantly less memory than their point cloud equivalents, and are suited towards fast collision checking for motion planning. By leveraging the Manhattan world assumption, we target extraction of orthogonal planes to generate maps which are more structured and organized than those of existing plane-based LiDAR SLAM approaches. We demonstrate our approach in the high-fidelity AirSim simulator and in real-world experiments with a ground rover equipped with a Velodyne LiDAR. For both cases, we are able to generate high quality maps and trajectory estimates at a rate matching the sensor rate of 10 Hz.


I. INTRODUCTION
Simultaneous localization and mapping (SLAM) is a core functionality necessary for autonomous robots operating in unknown environments. For robot navigation and obstacle avoidance, maps generated by SLAM may be used by downstream motion planning algorithms to plan collision-free paths through the environment, bridging the perception and planning layers of the autonomy stack. Successful integration requires maps to be generated in real-time from sensor data, occupy minimal memory, and support fast and precise collision-checking.
LiDAR (Light Detection and Ranging) has emerged as a powerful sensor for spatial mapping and SLAM due to its ability to provide highly accurate depth information under a wide range of lighting and weather conditions. However, operating directly on LiDAR point clouds can quickly become computationally expensive as the number of points increases, and point cloud maps created by LiDAR SLAM rapidly grow in memory as the robot explores more area. One way to address this challenge is to leverage structure, and represent points which lie on the same plane with a single object, which saves memory and compute for later (a) AirSim Blocks environment.
(b) Map generated from our approach by drone flying through Blocks environment along the ground-truth trajectory shown in red. The trajectory estimated by our algorithm is shown in orange. operations. This strategy is particularly effective for manmade urban and indoor environments, which consist primarily of mutually orthogonal planes. These environments can be modeled as Manhattan worlds [1] and are conducive to lightweight geometric map representations. Maintaining such minimal memory maps is especially important for embedded or resource-constrained robotic applications and for multirobot settings, in which maps must be shared between robots over limited communication bandwidth.
Furthermore, converting point clouds to planar representations is beneficial for operations such as collision checking, which are essential to motion planning. Planes allow for continuous representation of boundaries in space, which can be described with concise mathematical expressions, whereas point clouds may visually form a surface, but mathematically are still only a discrete collection of points which, by themselves, do not define a boundary. Traditionally, mapping and planning algorithms are designed separately, where maps produced by SLAM may not be compatible with motion planners, and planners may assume a map representation which is difficult to construct from real sensor data. SLAM map representations which enable rapid collision checking allow for direct integration with downstream motion planning for autonomous mobile robots, and design of a fluid, realtime autonomy stack.
In this work, we present an approach for LiDAR-based SLAM in Manhattan worlds that extracts planes from point clouds for registration and map creation. Contrary to most prior works in SLAM, our approach is designed with the task of motion planning in mind, as our geometric planebased map representation enables fast and precise collision checking. Furthermore, by registering sets of planes instead of dense point clouds, we speed up registration while maintaining accuracy, enabling faster odometry and loop closure. We leverage the Manhattan world assumption to extract orthogonal planes, and by merging these planes sequentially, we are able to create lightweight maps based on geometric primitives which capture the overarching 3D structure of the environment while occupying significantly less storage than their point cloud counterparts (an example such map is shown in Fig. 1). Finally, we integrate our plane-based frontend with a pose graph backend for loop closure and global consistency, and demonstrate real-time localization and mapping, as well as rapid motion planning within our map with an RRT example.

II. RELATED WORK
LiDAR SLAM has been well studied, and established methods such as LOAM [2] and its variations (LeGO-LOAM [3], F-LOAM [4]) rely on point clouds as a natural choice for registration and map representation. These methods achieve accurate real-time localization and mapping, but the maps they produce are still point clouds, which grow rapidly in memory and are unsuited for direct use by motion planners. Although point cloud maps are able to capture high levels of detail, for predominantly planar environments such as Manhattan worlds, they encode highly redundant information when compared to a direct plane representation.
Extracting planes from point clouds is not a new idea [5]- [7]. One general strategy is to search for best-fit planes to the point cloud, which can be accomplished via RANSAC [5], [8] or the Hough transform [6], [9]. Another strategy involves segmenting the point cloud into clusters of points which belong to the same plane, then extracting planes for each of these clusters. Point cloud segmentation is commonly done using region growing [10], in which clusters of points are grown based on local surface normal similarity. These region growing methods rely on computing surface normals of local neighborhoods via principal component analysis (PCA). An alternative method for normal estimation is meshing the point cloud and computing normals for each triangle or polygon in the mesh. Polylidar3D [7] introduced an algorithm for fast non-convex polygon extraction from depth sensor data which relies on triangulation and region growing. One can also use meshes to construct lightweight scene representations, as in [11].
Prior works have also explored plane-based registration and SLAM. Pathak et al. [12] demonstrate plane-based registration and SLAM in real-world scenarios, generating maps that are orders of magnitude smaller than their point cloud equivalents. However, their approach lacks solutions . By multiplying the plane parameters by −1 , we map it to 2D such that it lies solely within the plane.
for merging planes together and is not suitable for realtime operation, as their core registration takes around 10 seconds. More recently, Grant et al. [13] introduced Velodyne SLAM using point and plane features, extracting planes when possible to lower computation, while leveraging raw points when necessary to fully constrain the registration problem. Their approach generates maps consisting of polygonal planar patches and is shown to work well on a variety of indoor and outdoor environments, outperforming both Generalized ICP and LOAM, while running at rates between 2 and 10 Hz (depending on the number of points vs. planes used). Favre et al. [14] also present an approach for plane-based point cloud registration which is shown to outperform traditional point-based methods while running at 1-3 Hz on various datasets, but does not consider the problem of SLAM and map generation. Additionally, a variety of approaches for generating plane-based maps from dense depth information exist [8], [15], [16]. However, prior works in plane-based SLAM only present their maps for visualization, and do not consider the problem of motion planning within their plane maps. In contrast, our work highlights the advantage of plane maps for fast and efficient motion planning. Additionally, through our plane extraction and merging approach, we are able to produce more structured and organized maps for Manhattan world environments.

III. PROBLEM STATEMENT AND PRELIMINARIES
Given a robot equipped with a LiDAR sensor traveling through an unknown environment, our task is to accurately estimate the robot's trajectory while simultaneously constructing a sparse geometric map of the environment. At frame our method takes as input an unorganized 3D point cloud We represent the trajectory as a sequence of poses ( , t ), where ∈ R 3×3 is a rotation matrix describing orientation and t ∈ R 3 is a translation vector describing position. For our approach we represent the map as a collection of rectangular bounded planes (which we henceforth refer to simply as planes).
We parameterize a plane P with center point c and a pair of orthogonal vectors P , P ∈ R 3 which span its area (see Fig. 2). We define a plane's basis as Note that b is also the plane's normal vector n. This basis can be used to map the plane to 2D, as shown in Fig. 2. The 2D plane representation is essential to our plane extraction process, Fig. 3: Approach overview (inputs are boxed in red and outputs are boxed in green). First planes are extracted from the input point cloud, and these planes are then registered with previous planes for odometry. A pose graph is maintained using the odometry estimates, and map maintained and updated by merging newly detected planes in. and for operations used later in plane merging and collision checking.

IV. APPROACH
As with most SLAM pipelines, our approach consists of a frontend which performs feature extraction and registration, and a backend which maintains and optimizes a pose graph and handles map generation. Our approach overview is shown in Fig. 3. We now describe the components of our approach in detail.

A. Plane Extraction
When we receive a new point cloud from our LiDAR sensor (Fig. 4a), the first step is to extract planar features from it. Our extraction approach uses region growing for point cloud clustering, with meshing for surface normal estimation and graph structure.
1) Meshing: In order to mesh the point cloud, we first reparameterize each point in spherical coordinates relative to the scan-centered coordinate frame: We then compute the Delaunay triangulation [17] of the ( , ) points. The result of the triangulation is a set of simplices ( , , ), where , , ∈ {1, . . . , } are indices of points which form a triangle in the triangulation. Lastly, we prune the mesh to remove triangles with side lengths which exceed a certain threshold and smooth the mesh with a Laplacian filter [18] to reduce noise. Fig. 4b shows an example of point cloud meshing.
2) Clustering: Next, we cluster the triangles in the mesh according to their surface normal and locality. We do this through breadth-first graph search over the mesh triangles. First, we compute a surface normal vector for each triangle in the mesh by taking the cross product of two of its edge vectors n = e 1 × e 2 . We then randomly select a root triangle to begin the cluster and initialize a search queue with its neighbors. At each iteration, a new triangle is removed from , and its normal vector is compared to the root triangle's normal by taking their dot product. If the normals are close enough (i.e., their dot product exceeds a threshold), the triangle is added to the current cluster, and Once we have a clustering of the mesh triangles, we can use it to extract a clustering over the points themselves. Fig.  4c shows an example of clustered points.
3) Extraction: Given clusters of points { (1) , . . . , ( ) } with associated average normals {n (1) , . . . , n ( ) } (computed as the normalized average of the normal vectors of all the mesh triangles in the cluster), we now aim to extract a plane for each cluster. First we determine a basis = [b , b , b ] for the ground plane. Then, leveraging the Manhattan world assumption, all planes are extracted such that their normals aligns with either b , b or b , and the resulting set of extracted planes are mutually orthogonal.
To find , we first identify the ground plane as the largest cluster with normal closest to the direction (i.e., (0, 0, 1)), and set its normal to b . Next, the largest cluster with normal approximately orthogonal to the ground plane is found, and b is chosen as the orthogonal projection of its normal onto the ground plane.
Once we have the extraction basis, the plane extraction procedure for each cluster ( ) (with average normal n ( ) ) is as follows. First we project ( ) onto to obtain ( ) = −1 ( ) . Next we find the basis vector closest to n ( ) and extract a 2D bounding box over the points in the remaining dimensions (e.g. if n ( ) is closest to b , then the bounding box is extracted over and ). Once the 2D bounding box over ( ) is found, the center point and the vectors which span the bounding box are projected back to the standard basis to obtain the parameters c, P and P for the final extracted plane.
The output of the extraction is a plane set P = {P 1 , . . . , P } (example shown in Fig. 4d). For plane P , n is its normal vector, c is its center point, and is its distance to origin (computed as = n T c ).

B. Plane Registration
Next, in order to perform odometry and loop closure, we must be able to perform registration between two plane sets. Given a source plane set P and target plane set P with known correspondences denoted by the common index , we formulate the registration problem as min.
1) Correspondences: In order to determine correspondences, we compute a similarity cost metric for each pair of source and target planes based on their normal vectors and center-to-center distance (P , P ) = ||n − n || + ||c − c || where and are user-specified scaling parameters. We then form a cost matrix from the (P , P ), and select the minimum value from each row (i.e., lowest cost assignment for each source plane to a target plane). Additionally, if different source planes are assigned to the same target plane, we choose only the lowest cost assignment. In this way, each plane in both the source and target is uniquely corresponded, which we observed to reduce false correspondences.
2) Registration: As shown in [8], [12], the rotation and translation components of (2) can be decoupled. For rotation estimation, we define the rotation residual ( ) = n − n and use the Gauss-Newton method to solve Since ∈ SO(3), we use the Lie algebra parameterization [19] to map the problem to an unconstrained optimization over R 3 . The Gauss-Newton update proceeds as = r( ( ) ) (5a) where and are the update step and regularization parameters respectively, exp is the SO(3) exponential map, r is the stacked rotation residual, and J is the Jacobian of r where ∧ denotes the skew symmetric operator. The derivation of J can be achieved using chain rule with Equation 10.8 from [19].
After we obtain a rotation estimateˆfrom Gauss-Newton, we set =ˆand solve for t min.
We can formulate this as a least squares problem with The least squares solution is thus given byt = ( T ) −1 T . Note that the least squares problem is rank deficient unless there are at least three correspondences whose normals span R 3 . Our current implementation assumes this condition is always satisfied, although this issue has been addressed in priors works [12].
3) Outlier Correspondence Removal: As the computed correspondences are not always perfect, there is a need to make our registration robust to faulty correspondences. We employ an outlier removal method inspired by residualbased fault detection and exclusion [20], in which first the magnitude of the translation residual is computed to determine if a fault is present. If so, then the correspondence associated with the largest component of the residual is iteratively removed until the optimization yields a solution under the desired threshold.

C. Pose Graph
We employ the standard pose-graph formulation presented in [21], in which nodes of the graph represent the pose of the robot at different time frames, and edges between nodes represent measurements. The pose graph is initialized with some initial pose ( 0 , t 0 ). At frame , a new LiDAR scan is taken and plane set P is extracted, which is registered with P −1 to compute relative transformation ( −1 , t −1 ). This transformation is used to compute the new absolute pose estimate for current frame : which is then used to initialize the new node , and ( −1 , t −1 ) is also used to create an odometry edge between node − 1 and . After node is added to the graph, we search nearby nodes for loop closure. If the distance between nonconsecutive nodes and is below our search radius, their plane sets are registered to compute the relative transformation for a loop closure edge. Since in loop closure situations, scans can have large relative transformations, the absolute poses of the nodes are used to first transform P and P to the world frame to obtain correspondences, before the registration is run on the original planes in the local frame. After a loop closure edge is added, the pose graph is optimized as in [21].

D. Plane Set Merging
Our map is formed through a recursive merging process, in which the first plane set is initialized as the map, and successive plane sets are merged in. Once a plane set has been registered and its absolute pose estimated, it is transformed and merged with the current version of the map. The merging process takes as input two plane sets P and P , and iterates through the planes in P . For each plane P ∈ P , we then iterate through each plane P ∈ P and check three conditions: 1) The two planes are approximately coplanar.
2) The plane-to-plane distance is below a threshold.
3) The 2D projections of P and P onto P 's basis overlap. If these conditions are satisfied, then P is added to P 's correspondence set. After we have iterated through all planes in P , the corresponding planes are projected onto P 's basis, and the 2D bounding box over P and all its corresponding planes is found. This box is then projected back to the standard basis to obtain the new merged plane. In this way, all corresponding planes in P and P are merged to form a new overall merged plane set.
Following merging, we also clean up the map by removing planes with small area and fusing the edges of planes near each other. In the event of loop closure and pose graph optimization, the map must be regenerated by transforming all plane sets P 0 , . . . , P based on the newly re-optimized trajectory and re-merging them all together.

E. Collision Checking
We briefly describe a fast collision check procedure for a plane and line segment. Although we focus on this specific example, which is used to generate an RRT later in our results, the plane representation also supports efficient collision checking with other types of trajectory representations and parameterizations.
Given a line segment ℓ represented by two points a, b ∈ R 3 and plane P with normal n and center c, we wish to determine if ℓ intersects with P. First we project both ℓ and P to P's basis. Since the remainder of the intersection check process deals only with projected versions of ℓ and P, we will hereby refer to the projected versions as ℓ and P.
Next we compute the intersection of the infinite line formed by extending ℓ with the infinite plane that P lies in. The infinite plane can be represented as {x | n T x = c}, and the infinite line can be represented as Thus we can find the intersection by solving for ∈ R such that n T ( v+a) = c. Furthermore, since we have projected to P's basis, we know that the projected plane lies in the plane, and n = (0, 0, 1). Thus we have 3 + 3 = c 3 so = (c 3 − 3 )/ 3 . If 3 = 0 then ℓ is parallel to the plane and there is no intersection. Otherwise, we then proceed to check if the intersection point v + a lies within the line segment and plane boundaries. To check the line segment constraint, we simply check if 0 ≤ ≤ 1. To check the plane constraint, we check if the 2D box defined by dimensions of contains v + a. If both of these conditions are satisfied, then ℓ and P intersect, otherwise, they do not intersect.

V. RESULTS
We evaluate our algorithm both in simulation and on hardware. For simulation, we use AirSim [22] to simulate a drone flying through an environment and collecting LiDAR measurements. For our hardware tests, we use a ground rover equipped with a Velodyne Puck LITE LiDAR shown in Fig.  6a. Our method is implemented in python with documented code available online 1 . The python-graphslam library [23] is used for pose graph creation and optimization.

A. AirSim Experiments
We use the "Blocks" environment, shown in Fig. 1a, which consists of several rectangular blocks placed in an open space. The AirSim LiDAR is configured with 16 channels, 60 • vertical field of view (FOV), 360 • horizontal FOV, 10 rotations per second, and 100,000 points per second, and the experiments are run on a 6-core, 3.6 GHz desktop with 32 GB RAM.
We show results for a trajectory in which the drone traverses the central area of the environment while LiDAR point clouds are collected at 10 Hz. Fig. 1 shows the final map generated by our approach along with the ground-truth and estimated trajectories. For trajectory of total length 603.6 m, the RMSE translational error is 1.3 m with standard deviation (std.) 0.6 m, and the average rotational error (computed as the angle between the estimated and ground-truth rotational frames) is 0.30 degrees with std. 0.14 degrees. Table I shows a breakdown of the average runtime of each module of our method in milliseconds. Note that loop closure has a high standard deviation as it is not run every iteration. Our overall algorithm has an average runtime of 88.8 ms with standard deviation 24.6 ms, which is comparable to LeGO-LOAM and F-LOAM, and is fast enough to be run at the LiDAR rate of 10 Hz.   We also compare the size of our plane map in Fig. 1b with the size of an equivalent point cloud map. The plane map occupies 41.9 kB of memory, whereas a point cloud map generated from superimposing every 10th point cloud together occupies 34.5 MB of memory. Thus we see that by using a plane map representation, we are able to reduce memory usage by approximately three orders of magnitude.
In order to demonstrate the suitability of our plane map for motion planning, we implement a naive straight-line RRT [24] using the collision check process described in Section IV-E. An RRT with 1000 nodes is shown in Fig.  5, and takes only 0.5 s to generate.

B. Rover Experiments
For our hardware tests, we use a ground rover equipped with a Velodyne Puck LITE LiDAR, which has 16 channels, 30 • vertical FOV, 360 • horizontal FOV, and generates 300,000 points per second. We manually drive the rover through an environment made up of cardboard boxes, shown in Fig. 6a, and ground-truth pose information is logged using motion capture. The estimated map and trajectory from our algorithm are shown in Fig. 6b. The RMSE translational error for the trajectory is 0.063 m (std. 0.039 m), and the average rotational error is 0.71 degrees (std. 0.40 degrees).
All computation is done onboard the rover on an Intel NUC 7 mini PC (2-core, 3.5 GHz, 16 GB RAM), with total average runtime of 124 ms (std. 37 ms). Although the Velodyne LiDAR produces scans at 10 Hz, we run our algorithm at 5 Hz (every other scan) to ensure sufficient compute time available.
We observe that for real-world noisy LiDAR data, the frontend is susceptible to error, with some planes being slightly over-approximated. Additionally, errors in the trajectory and map can be contributed to the rotation of the LiDAR during the rover's motion, which is not accounted for. Nevertheless, (a) Ground rover in cardboard box environment.
(b) Generated plane map for cardboard box environment with ground-truth trajectory in red and estimated trajectory in orange. Fig. 6: We validate our method with a ground rover equipped with Velodyne LiDAR in a Manhattan world environment. Our method is able to estimate the rover's trajectory and construct a plane-based map of the environment in real-time.
our method is still able to reconstruct the overall structure of the cardboard box environment.

VI. CONCLUSION
In this paper, we present plane-based LiDAR SLAM for real-time lightweight map generation and localization. Traditionally, SLAM algorithms are not designed with the requirements of downstream motion planning algorithms in mind, and motion planning algorithms are often designed assuming a map of the environment exists in a convenient form. Our work takes a step towards bridging this gap, proposing a SLAM pipeline that can be tightly integrated with motion planning through its plane-based map representation. Additionally, our map requires much less memory to store than a point cloud equivalent, enabling applications involving extensive mapping on resource-constrained systems, or multirobot applications in which robots must communicate map information between each other over limited bandwidth.