A simple demo of random mapping method for environment modeling (occupacy mapping and terrain modeling).
scripts : A simple implementation codes for RMM with Python 3.8, numpy 1.21.2, and scipy 1.6.2
datasets : The used datasets comprising planet and lab.
The underlying mathematical proof regarding the linear property of RMM can be found in our paper.
RMM is a feature mapping method, based on the fast random construction of base functions, which can efficiently project the messy points in the low-dimensional space into the high-dimensional space where the points are approximately linearly distributed.
In the context of machine learning, by efficiently generating approximately linearly separable or distributed space at random, the RMM can accelerate the training process.
For an arbitrary set of samples
Assume that a robot has captured a data set $X = {x_i,t_i}{i=1}^{L}$ by the end points of a laser ranger finder
or depth cameras when moving in the environments. In the context of terrain modeling, $x_i$ is a 2D location and $t_i$ is its elevation.
While in the context of occupancy mapping, $x_i$ is a 2D or 3D location and $t_i$ is its occupancy state (0 or 1).
Our idea for environment modeling is to build a linear regression model for terrain modeling and a linear classifier
for occupancy mapping, between ${x_i}{i=1}^{L}$ and
Firstly, RMM can be generate a RM set with linear property, enabling the linear classifier or linear regression model.
Secondly, the occupancy mapping and terrain modeling can be treated as classification and refression task, respectively.
Unified model:
In the context of robotics mapping, the vast amount of data captured by robots in large-scale environments brings the computing and storage bottlenecks to the typical methods of modeling the spaces the robots travel in.
- The randomness and closed-form solutions make RMR very time-efficient, accelerating the terrain modeling process.
- The limited parameters makes RMR very memory-efficient, reducing the occupied storage space.
- The accurate interpolation ability make RMR can fill the terrain gaps, generating more complete and detailed terrain maps.
- RMM is sensitive to the data scale.
In our implementation, we first generate all the random weights
$W$ from the uniform distribution between [-1, 1], and the we scale$W$ using a scaling factor$\alpha$ , that is the used weight matrix$W'=\alpha W$ . Particularly, we treat the scaling factor$\alpha$ as another hyperparameter, i.e., the scaleRate. - Terrain modeling with RMM is required to extract the terrain surface first. Refer to our previous work "Liu, X.; Li, D.; and He, Y. 2021. Multiresolution Representations for Large-Scale Terrain with Local Gaussian Process Regression. In 2021 IEEE International Conference on Robotics and Automation (ICRA), 5497–5503. IEEE."