Identifying the environment's structure, through detecting core components such as rooms and walls, can facilitate several tasks fundamental for the successful operation of indoor autonomous mobile robots, including semantic environment understanding. These robots often rely on 2D occupancy maps for core tasks such as localisation and motion and task planning. However, reliable identification of structure and room segmentation from 2D occupancy maps is still an open problem due to clutter (e.g., furniture and movable objects), occlusions, and partial coverage. We propose a method for the RObust StructurE identification and ROom SEgmentation (ROSE2) of 2D occupancy maps thatmay be cluttered and incomplete. ROSE2 identifies the main directions of walls and is resilient to clutter and partial observations, allowing to extract a clean, abstract geometrical floor-plan-like description of the environment, which is used to segment, i.e., to identify rooms in, the original occupancy grid map. ROSE2 is tested in several real-world publicly available cluttered maps obtained in different conditions. The results show that it can robustly identify the environment structure in 2D occupancy maps suffering fromclutter and partial observations, while significantly improving room segmentation accuracy. Thanks to the combination of clutter removal and robust room segmentation, ROSE2 consistently achieves higher performance than the state-of-the-art methods, against which it is compared.