In this paper, we address the problem of generating a compact representation of 2D-lidar scans for reinforcement learning in navigation tasks. By now only little work focuses on the compactness of the provided state, which is a necessary condition to successfully and efficiently train a navigation agent. Our approach works in three stages. First, we propose a novel preprocessing of the distance measurements and compute a local, egocentric, binary grid map based on the current range measurements. We then autoencode the local map using a variational autoencoder, where the latent space serves as state representation. An important key for a compact and, at the same time, meaningful representation is the degree of disentanglement, which describes the correlation between each latent dimension. Therefore, we finally apply state-of-the-art disentangling methods to improve the representation power. Furthermore, we investige the possibilities of incorporating time-dependent information into the latent space. In particular, we incorporate the relation of consecutive scans, especially ego-motion, by applying a memory model. We implemented our approach in python using tensorflow. Our datasets are simulated with pybullet as well as recorded using a slamtec rplidar A3. The experiments show the capability of our approach to highly compress lidar data, maintain a meaningful distribution of the latent space, and even incorporate time-depended information.